Brian Knoblauch
Brian Knoblauch

Reputation: 21359

Cannot load net.sourceforge.jtds.jdbc.Driver in Tomcat

I see there are other similar questions, but none of them cover my exact situation.

I'm migrating an Eclipse based web service from FreeBSD 9.2 and Tomcat7 over to FreeBSD 10.0 and Tomcat8. I've deployed my .war on the new server and it runs, right up until it has to do a SQL access, where it fails with "cannot load net.sourceforge.jtds.jdbc.Driver". I'm not sure what's missing. We don't load a driver in lib, it's all bundled into the one .war file (which works fine on the old machine). I've searched the tomcat config files to see if there's any pointers that need to be set, but I'm coming up empty.

Upvotes: 1

Views: 5234

Answers (2)

Stefan
Stefan

Reputation: 12453

Download the jTDS driver from here. Copy it into the Tomcats lib folder. Are you sure you are not using JNDI to retreive the datasource? If thats not the case, its better to include app specific jars in your project and not on the server, to avoid version conflicts with other projects.

Upvotes: 1

hurricane
hurricane

Reputation: 6724

Download ojdbc6 or ojdbc14 (which one usefull for Tomcat8) copy to apache-tomcat-(version) >> lib file.

And in eclipse add ojdbc in Build Path >> order & export.

Upvotes: 1

Related Questions