OFBiz 9.04连接MSSQL 2000异常

OFBiz 9.04连接MSSQL 2000在初始化连接时出现如下异常:

2010-12-04 23:43:25,297 (org.ofbiz.service.job.JobPoller@118cb3a) [DBCPConnectionFactory.java:97 :ERROR] 

 

---- exception report ----------------------------------------------------------

Exception: java.lang.ClassNotFoundException

Message: Cached loader got a known bad class name: com.microsoft.sqlserver.jdbc.SQLServerDriver

---- stack trace ---------------------------------------------------------------

java.lang.ClassNotFoundException: Cached loader got a known bad class name: com.microsoft.sqlserver.jdbc.SQLServerDriver

org.ofbiz.base.util.CachedClassLoader.loadClass(CachedClassLoader.java:172)

org.ofbiz.base.util.CachedClassLoader.loadClass(CachedClassLoader.java:158)

java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)

java.lang.Class.forName0(Native Method)

java.lang.Class.forName(Class.java:242)

org.ofbiz.entity.connection.DBCPConnectionFactory.getConnection(DBCPConnectionFactory.java:95)

org.ofbiz.entity.jdbc.ConnectionFactory.getManagedConnection(ConnectionFactory.java:128)

org.ofbiz.geronimo.GeronimoTransactionFactory.getConnection(GeronimoTransactionFactory.java:85)

org.ofbiz.entity.transaction.TransactionFactory.getConnection(TransactionFactory.java:95)

org.ofbiz.entity.jdbc.ConnectionFactory.getConnection(ConnectionFactory.java:73)

org.ofbiz.entity.jdbc.SQLProcessor.getConnection(SQLProcessor.java:259)

org.ofbiz.entity.jdbc.SQLProcessor.prepareStatement(SQLProcessor.java:365)

org.ofbiz.entity.jdbc.SQLProcessor.prepareStatement(SQLProcessor.java:336)

org.ofbiz.entity.datasource.GenericDAO.updateByCondition(GenericDAO.java:323)

org.ofbiz.entity.datasource.GenericDAO.updateByCondition(GenericDAO.java:288)

org.ofbiz.entity.datasource.GenericHelperDAO.storeByCondition(GenericHelperDAO.java:186)

org.ofbiz.entity.GenericDelegator.storeByCondition(GenericDelegator.java:1277)

org.ofbiz.entity.GenericDelegator.storeByCondition(GenericDelegator.java:1247)

org.ofbiz.service.job.JobManager.poll(JobManager.java:157)

org.ofbiz.service.job.JobPoller.run(JobPoller.java:90)

java.lang.Thread.run(Thread.java:595)

 

MSSQL 2000驱动包在entity/lib目录下也存在,有点纳闷了,为什么会出现这样的异常呢!在网上搜了一下,没有发现这个问题的解决方法。后来经过查看MSSQL 2000驱动包mssqlserver.jar发现,SQLServerDriver类的包路径为com.microsoft.jdbc.sqlserver.SQLServerDriver,与entityengine.xml中默认配置com.microsoft.sqlserver.jdbc.SQLServerDriver的包路径不一直,原来是这个问题。将entityengine.xml的配置修改为com.microsoft.jdbc.sqlserver.SQLServerDriver,重新启动,OK!

 

 

你可能感兴趣的:(OFBiz,exception,class,report,2010)