6
回答
改成Oralce数据库,一直报类找不到,我所有的jar包都加载了啊,各位大大帮忙看看,谢谢
百度AI开发者大赛带你边学边开发,赢100万奖金,加群:418589053   
java.lang.NoClassDefFoundError: Could not initialize class com.alibaba.druid.proxy.DruidDriver
 at java.lang.Class.forName0(Native Method)
 at java.lang.Class.forName(Unknown Source)
 at java.sql.DriverManager.getCallerClass(Unknown Source)
 at java.sql.DriverManager.getDrivers(Unknown Source)
 at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:497)
 at java.sql.DriverManager.getConnection(Unknown Source)
 at java.sql.DriverManager.getConnection(Unknown Source)
 at org.apache.ibatis.datasource.unpooled.UnpooledDataSource.getConnection(UnpooledDataSource.java:64)
 at org.apache.ibatis.datasource.pooled.PooledDataSource.popConnection(PooledDataSource.java:349)
 at org.apache.ibatis.datasource.pooled.PooledDataSource.getConnection(PooledDataSource.java:55)
 at org.apache.ibatis.session.defaults.DefaultSqlSessionFactory.openSessionFromDataSource(DefaultSqlSessionFactory.java:73)
 at org.apache.ibatis.session.defaults.DefaultSqlSessionFactory.openSession(DefaultSqlSessionFactory.java:32)
 at org.activiti.engine.impl.db.DbSqlSession.<init>(DbSqlSession.java:86)
 at org.activiti.engine.impl.db.DbSqlSessionFactory.openSession(DbSqlSessionFactory.java:80)
 at org.activiti.engine.impl.interceptor.CommandContext.getSession(CommandContext.java:179)
 at org.activiti.engine.impl.cfg.standalone.StandaloneMybatisTransactionContext.getDbSqlSession(StandaloneMybatisTransactionContext.java:77)
 at org.activiti.engine.impl.cfg.standalone.StandaloneMybatisTransactionContext.commit(StandaloneMybatisTransactionContext.java:58)
 at org.activiti.engine.impl.interceptor.CommandContext.close(CommandContext.java:114)
 at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:49)
 at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33)
 at org.activiti.engine.impl.ProcessEngineImpl.<init>(ProcessEngineImpl.java:77)
 at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.buildProcessEngine(ProcessEngineConfigurationImpl.java:283)
 at net.loyin.activiti.ActivitiServer.<clinit>(ActivitiServer.java:28)
 at java.lang.Class.forName0(Native Method)
 at java.lang.Class.forName(Unknown Source)
 at net.loyin.jFinal.plugin.ClassSearcher.findClasses(ClassSearcher.java:86)
 at net.loyin.jFinal.plugin.MyRoutesUtil.add(MyRoutesUtil.java:18)
 at net.loyin.config.JFWebConfig.configRoute(JFWebConfig.java:46)
 at com.jfinal.core.Config.configJFinal(Config.java:47)
 at com.jfinal.core.JFinal.init(JFinal.java:65)
 at com.jfinal.core.JFinalFilter.init(JFinalFilter.java:48)
 at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97)
 at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
 at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:713)
 at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
 at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1282)
 at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:518)
 at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:499)
 at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
 at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
 at org.mortbay.jetty.Server.doStart(Server.java:224)
 at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
 at com.jfinal.server.JettyServer.doStart(JettyServer.java:153)
 at com.jfinal.server.JettyServer.start(JettyServer.java:82)
 at com.jfinal.core.JFinal.start(JFinal.java:160)
 at Server.main(Server.java:20)
举报
porcupinefinal
发帖于5年前 6回/1K+阅
共有6个答案 最后回答: 4年前

我把jdbc driver 改成com.alibaba.druid.proxy.DruidDriver后报了另一个错。。。

2013-9-7 15:45:59 org.activiti.engine.impl.cfg.standalone.StandaloneMybatisTransactionContext rollback
信息: Exception during transaction: Could not initialize class com.alibaba.druid.mock.MockDriver
2013-9-7 15:45:59 org.activiti.engine.impl.interceptor.CommandContext exception
严重: masked exception in command context. for root cause, see below as it will be rethrown later.
java.lang.NoClassDefFoundError: Could not initialize class com.alibaba.druid.mock.MockDriver
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at java.sql.DriverManager.getCallerClass(Unknown Source)
at java.sql.DriverManager.getDrivers(Unknown Source)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:497)
at com.alibaba.druid.filter.FilterChainImpl.connection_connect(FilterChainImpl.java:142)
at com.alibaba.druid.filter.encoding.EncodingConvertFilter.connection_connect(EncodingConvertFilter.java:48)
at com.alibaba.druid.filter.FilterChainImpl.connection_connect(FilterChainImpl.java:136)
at com.alibaba.druid.proxy.jdbc.DataSourceProxyImpl.connect(DataSourceProxyImpl.java:103)
at com.alibaba.druid.proxy.DruidDriver.connect(DruidDriver.java:143)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at org.apache.ibatis.datasource.unpooled.UnpooledDataSource.getConnection(UnpooledDataSource.java:64)
at org.apache.ibatis.datasource.pooled.PooledDataSource.popConnection(PooledDataSource.java:349)
at org.apache.ibatis.datasource.pooled.PooledDataSource.getConnection(PooledDataSource.java:55)
at org.apache.ibatis.session.defaults.DefaultSqlSessionFactory.openSessionFromDataSource(DefaultSqlSessionFactory.java:73)
at org.apache.ibatis.session.defaults.DefaultSqlSessionFactory.openSession(DefaultSqlSessionFactory.java:32)
at org.activiti.engine.impl.db.DbSqlSession.<init>(DbSqlSession.java:86)
at org.activiti.engine.impl.db.DbSqlSessionFactory.openSession(DbSqlSessionFactory.java:80)
at org.activiti.engine.impl.interceptor.CommandContext.getSession(CommandContext.java:179)
at org.activiti.engine.impl.cfg.standalone.StandaloneMybatisTransactionContext.getDbSqlSession(StandaloneMybatisTransactionContext.java:77)
at org.activiti.engine.impl.cfg.standalone.StandaloneMybatisTransactionContext.rollback(StandaloneMybatisTransactionContext.java:91)
at org.activiti.engine.impl.interceptor.CommandContext.close(CommandContext.java:122)
at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:49)
at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33)
at org.activiti.engine.impl.ProcessEngineImpl.<init>(ProcessEngineImpl.java:77)
at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.buildProcessEngine(ProcessEngineConfigurationImpl.java:283)
at net.loyin.activiti.ActivitiServer.<clinit>(ActivitiServer.java:28)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at net.loyin.jFinal.plugin.ClassSearcher.findClasses(ClassSearcher.java:86)
at net.loyin.jFinal.plugin.MyRoutesUtil.add(MyRoutesUtil.java:18)
at net.loyin.config.JFWebConfig.configRoute(JFWebConfig.java:46)
at com.jfinal.core.Config.configJFinal(Config.java:47)
at com.jfinal.core.JFinal.init(JFinal.java:65)
at com.jfinal.core.JFinalFilter.init(JFinalFilter.java:48)
at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:713)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1282)
at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:518)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:499)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at org.mortbay.jetty.Server.doStart(Server.java:224)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at com.jfinal.server.JettyServer.doStart(JettyServer.java:153)
at com.jfinal.server.JettyServer.start(JettyServer.java:82)
at com.jfinal.core.JFinal.start(JFinal.java:160)
at Server.main(Server.java:20)

注释掉流程相关的代码没有这个问题了,但出来新的问题,不能理解ing。。。

java.lang.RuntimeException: Error creating logger for class class com.alibaba.druid.mock.MockDriver.  Cause: java.lang.ClassCastException: com.alibaba.druid.support.logging.Log4jImpl cannot be cast to com.alibaba.druid.support.logging.Log
 at com.alibaba.druid.support.logging.LogFactory.getLog(LogFactory.java:52)
 at com.alibaba.druid.mock.MockDriver.<clinit>(MockDriver.java:46)
 at java.lang.Class.forName0(Native Method)
 at java.lang.Class.forName(Unknown Source)
 at java.sql.DriverManager.getCallerClass(Unknown Source)
 at java.sql.DriverManager.getDrivers(Unknown Source)
 at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:497)
 at com.alibaba.druid.filter.FilterChainImpl.connection_connect(FilterChainImpl.java:142)
 at com.alibaba.druid.filter.stat.StatFilter.connection_connect(StatFilter.java:198)

 

你好,该版本现在不能够下载了,能发我一份吗? 我的邮箱 tangxudim@163.com
--- 共有 1 条评论 ---
龙影目前已经迁移到我的 http://www.loyin.net 欢迎关注我的网址 4年前 回复
顶部