与Cannot load net.sourceforge.jtds.jdbc.Driver in Tomcat相同的错误,但这次解决方案不起作用。刚刚在FreeBSD 10服务器上完成了Tomcat 8.0.9到8.0.12的更新,即使jtds jar在lib文件夹中,我又一次收到了这个错误。我已经下载了一个新的jtds副本,以防旧的jtds被破坏,我还重新部署了我的WAR(以防万一)。没变。显然回滚到Tomcat 8.0.9是一个选项作为一种解决方法,但我有一些时间来处理它,并且尝试保持最新的服务器软件是明智的...想法为什么我可能再次收到此错误以及如何解决它?
22-Jul-2014 15:21:17.811 SEVERE [http-nio-443-exec-9] org.apache.catalina.core.StandardWrapperValve.invoke Ser
vlet.service() for servlet [base] in context with path [] threw exception
com.sscorp.base.exception.SystemException: org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC drive
r class 'net.sourceforge.jtds.jdbc.Driver'
at com.sscorp.base.util.DBUtils.query(DBUtils.java:175)
at com.sscorp.base.util.DBUtils.query(DBUtils.java:158)
at com.sscorp.base.util.DBUtils.findEntitiesBy(DBUtils.java:324)
at com.sscorp.base.util.DBUtils.findEntityBy(DBUtils.java:315)
at com.sscorp.base.dao.common.UserDAO.findByUsernameAndPassword(UserDAO.java:50)
at com.sscorp.base.web.AuthenticationFilter.doFilter(AuthenticationFilter.java:56)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:615)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:136)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:526)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1078)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:655)
at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:2
22)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1566)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1523)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class 'net.sourceforge.jtds.jdb
c.Driver'
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1136)
at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
at org.apache.commons.dbutils.QueryRunner.prepareConnection(QueryRunner.java:334)
at org.apache.commons.dbutils.QueryRunner.query(QueryRunner.java:483)
at com.sscorp.base.util.DBUtils.query(DBUtils.java:172)
... 24 more
Caused by: java.lang.ClassNotFoundException: net.sourceforge.jtds.jdbc.Driver
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1324)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1177)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:259)
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1130)
... 28 more
答案 0 :(得分:0)
经过几天的工作没有运气,一些更多的软件更新出来了。应用它们(甚至没有重新启动,因为它们不是服务/缓存),它现在神奇地起作用。看似无关,它是curl和python的更新。