Cannot create JDBC driver of class '' for connect URL 'null'

1、错误描述

严重: 抛出了“org.apache.tomcat.dbcp.dbcp.SQLNestedException”异常:Cannot create JDBC driver of class ‘‘ for connect URL ‘null‘
堆栈:
org.apache.tomcat.dbcp.dbcp.BasicDataSource.createConnectionFactory(1452).
org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(1371).
org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(1044).
com.tansuosoft.discoverx.db.Database.getConnection(129).
com.tansuosoft.discoverx.dao.DBRequest.getConnection(199).
com.tansuosoft.discoverx.dao.DBRequest.sendRequest(512).
com.tansuosoft.discoverx.web.app.message.UrgeContext.init(96).
com.tansuosoft.discoverx.web.app.message.UrgeContext.<init>(50).
com.tansuosoft.discoverx.web.app.message.UrgeContext.getInstance(107).
com.tansuosoft.discoverx.web.ContextListener.contextInitialized(113).
org.apache.catalina.core.StandardContext.listenerStart(5017).
org.apache.catalina.core.StandardContext.startInternal(5531).
org.apache.catalina.util.LifecycleBase.start(150).
org.apache.catalina.core.ContainerBase.addChildInternal(901).
org.apache.catalina.core.ContainerBase.addChild(877).
org.apache.catalina.core.StandardHost.addChild(652).
org.apache.catalina.startup.HostConfig.deployDescriptor(677).
org.apache.catalina.startup.HostConfig$DeployDescriptor.run(1912).
java.util.concurrent.Executors$RunnableAdapter.call(511).
java.util.concurrent.FutureTask.run(266).
java.util.concurrent.ThreadPoolExecutor.runWorker(1142).
java.util.concurrent.ThreadPoolExecutor$Worker.run(617).
java.lang.Thread.run(745).

信息: 执行SQL语句时出现异常:,原因:Cannot create JDBC driver of class ‘‘ for connect URL ‘null‘
九月 07, 2015 4:36:04 下午 com.tansuosoft.discoverx.dao.DBRequest sendRequest
信息: SQL执行错误:“Cannot create JDBC driver of class ‘‘ for connect URL ‘null‘”,SQL语句=“
严重: 抛出了“org.apache.tomcat.dbcp.dbcp.SQLNestedException”异常:Cannot create JDBC driver of class ‘‘ for connect URL ‘null‘
堆栈:
org.apache.tomcat.dbcp.dbcp.BasicDataSource.createConnectionFactory(1452).
org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(1371).
org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(1044).
org.apache.catalina.core.StandardContext.listenerStart(5017).
org.apache.catalina.core.StandardContext.startInternal(5531).
org.apache.catalina.util.LifecycleBase.start(150).
org.apache.catalina.core.ContainerBase.addChildInternal(901).
org.apache.catalina.core.ContainerBase.addChild(877).
org.apache.catalina.core.StandardHost.addChild(652).
org.apache.catalina.startup.HostConfig.deployDescriptor(677).
org.apache.catalina.startup.HostConfig$DeployDescriptor.run(1912).
java.util.concurrent.Executors$RunnableAdapter.call(511).
java.util.concurrent.FutureTask.run(266).
java.util.concurrent.ThreadPoolExecutor.runWorker(1142).
java.util.concurrent.ThreadPoolExecutor$Worker.run(617).
java.lang.Thread.run(745).

九月 07, 2015 4:36:04 下午 org.apache.catalina.core.StandardContext listenerStart
严重: Exception sending context initialized event to listener instance of class com.tansuosoft.discoverx.web.ContextListener
common.exception.DBException: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class ‘‘ for connect URL ‘null‘
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5017)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5531)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
	at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:677)
	at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1912)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class ‘‘ for connect URL ‘null‘
	at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createConnectionFactory(BasicDataSource.java:1452)
	at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1371)
	at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)
	... 17 more
Caused by: java.sql.SQLException: No suitable driver
	at java.sql.DriverManager.getDriver(DriverManager.java:315)
	at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createConnectionFactory(BasicDataSource.java:1437)
	... 22 more

九月 07, 2015 4:36:04 下午 org.apache.catalina.core.StandardContext startInternal
严重: One or more listeners failed to start. Full details will be found in the appropriate container log file
九月 07, 2015 4:36:04 下午 org.apache.catalina.core.StandardContext startInternal
严重: Context [/osp] startup failed due to previous errors
九月 07, 2015 4:36:04 下午 com.tansuosoft.discoverx.web.ContextListener fireEvent
信息: 触发"onsystemshutdown"类型的事件处理程序:
九月 07, 2015 4:36:04 下午 com.tansuosoft.discoverx.db.Database executeScalar
信息: 执行SQL语句时出现异常:原因:Cannot create JDBC driver of class ‘‘ for connect URL ‘null‘
严重: 抛出了“org.apache.tomcat.dbcp.dbcp.SQLNestedException”异常:Cannot create JDBC driver of class ‘‘ for connect URL ‘null‘
堆栈:
org.apache.tomcat.dbcp.dbcp.BasicDataSource.createConnectionFactory(1452).
org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(1371).
org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(1044).
org.apache.catalina.core.StandardContext.listenerStop(5064).
org.apache.catalina.core.StandardContext.stopInternal(5726).
org.apache.catalina.util.LifecycleBase.stop(232).
org.apache.catalina.util.LifecycleBase.start(160).
org.apache.catalina.core.ContainerBase.addChildInternal(901).
org.apache.catalina.core.ContainerBase.addChild(877).
org.apache.catalina.core.StandardHost.addChild(652).
org.apache.catalina.startup.HostConfig.deployDescriptor(677).
org.apache.catalina.startup.HostConfig$DeployDescriptor.run(1912).
java.util.concurrent.Executors$RunnableAdapter.call(511).
java.util.concurrent.FutureTask.run(266).
java.util.concurrent.ThreadPoolExecutor.runWorker(1142).
java.util.concurrent.ThreadPoolExecutor$Worker.run(617).
java.lang.Thread.run(745).

信息: 执行SQL语句时出现异常:原因:Cannot create JDBC driver of class ‘‘ for connect URL ‘null‘
严重: 抛出了“org.apache.tomcat.dbcp.dbcp.SQLNestedException”异常:Cannot create JDBC driver of class ‘‘ for connect URL ‘null‘
堆栈:
org.apache.tomcat.dbcp.dbcp.BasicDataSource.createConnectionFactory(1452).
org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(1371).
org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(1044).
org.apache.catalina.core.StandardContext.listenerStop(5064).
org.apache.catalina.core.StandardContext.stopInternal(5726).
org.apache.catalina.util.LifecycleBase.stop(232).
org.apache.catalina.util.LifecycleBase.start(160).
org.apache.catalina.core.ContainerBase.addChildInternal(901).
org.apache.catalina.core.ContainerBase.addChild(877).
org.apache.catalina.core.StandardHost.addChild(652).
org.apache.catalina.startup.HostConfig.deployDescriptor(677).
org.apache.catalina.startup.HostConfig$DeployDescriptor.run(1912).
java.util.concurrent.Executors$RunnableAdapter.call(511).
java.util.concurrent.FutureTask.run(266).
java.util.concurrent.ThreadPoolExecutor.runWorker(1142).
java.util.concurrent.ThreadPoolExecutor$Worker.run(617).
java.lang.Thread.run(745).

九月 07, 2015 4:36:05 下午 com.tansuosoft.discoverx.web.ContextListener fireEvent
严重: 抛出了“java.lang.RuntimeException”异常:无法初始化“TotalAccessCount”对应的自增长序号!
堆栈:
org.apache.catalina.core.StandardContext.listenerStop(5064).
org.apache.catalina.core.StandardContext.stopInternal(5726).
org.apache.catalina.util.LifecycleBase.stop(232).
org.apache.catalina.util.LifecycleBase.start(160).
org.apache.catalina.core.ContainerBase.addChildInternal(901).
org.apache.catalina.core.ContainerBase.addChild(877).
org.apache.catalina.core.StandardHost.addChild(652).
org.apache.catalina.startup.HostConfig.deployDescriptor(677).
org.apache.catalina.startup.HostConfig$DeployDescriptor.run(1912).
java.util.concurrent.Executors$RunnableAdapter.call(511).
java.util.concurrent.FutureTask.run(266).
java.util.concurrent.ThreadPoolExecutor.runWorker(1142).
java.util.concurrent.ThreadPoolExecutor$Worker.run(617).
java.lang.Thread.run(745).

严重: 抛出了“org.apache.tomcat.dbcp.dbcp.SQLNestedException”异常:Cannot create JDBC driver of class ‘‘ for connect URL ‘null‘
堆栈:
org.apache.tomcat.dbcp.dbcp.BasicDataSource.createConnectionFactory(1452).
org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(1371).
org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(1044).
org.apache.catalina.core.StandardContext.listenerStop(5064).
org.apache.catalina.core.StandardContext.stopInternal(5726).
org.apache.catalina.util.LifecycleBase.stop(232).
org.apache.catalina.util.LifecycleBase.start(160).
org.apache.catalina.core.ContainerBase.addChildInternal(901).
org.apache.catalina.core.ContainerBase.addChild(877).
org.apache.catalina.core.StandardHost.addChild(652).
org.apache.catalina.startup.HostConfig.deployDescriptor(677).
org.apache.catalina.startup.HostConfig$DeployDescriptor.run(1912).
java.util.concurrent.Executors$RunnableAdapter.call(511).
java.util.concurrent.FutureTask.run(266).
java.util.concurrent.ThreadPoolExecutor.runWorker(1142).
java.util.concurrent.ThreadPoolExecutor$Worker.run(617).
java.lang.Thread.run(745).

信息: 执行SQL语句时出现异常:原因:Cannot create JDBC driver of class ‘‘ for connect URL ‘null‘
信息: SQL执行错误:“Cannot create JDBC driver of class ‘‘ for connect URL ‘null‘”,
严重: 抛出了“org.apache.tomcat.dbcp.dbcp.SQLNestedException”异常:Cannot create JDBC driver of class ‘‘ for connect URL ‘null‘
堆栈:
org.apache.tomcat.dbcp.dbcp.BasicDataSource.createConnectionFactory(1452).
org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(1371).
org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(1044).
org.apache.catalina.core.StandardContext.listenerStop(5064).
org.apache.catalina.core.StandardContext.stopInternal(5726).
org.apache.catalina.util.LifecycleBase.stop(232).
org.apache.catalina.util.LifecycleBase.start(160).
org.apache.catalina.core.ContainerBase.addChildInternal(901).
org.apache.catalina.core.ContainerBase.addChild(877).
org.apache.catalina.core.StandardHost.addChild(652).
org.apache.catalina.startup.HostConfig.deployDescriptor(677).
org.apache.catalina.startup.HostConfig$DeployDescriptor.run(1912).
java.util.concurrent.Executors$RunnableAdapter.call(511).
java.util.concurrent.FutureTask.run(266).
java.util.concurrent.ThreadPoolExecutor.runWorker(1142).
java.util.concurrent.ThreadPoolExecutor$Worker.run(617).
java.lang.Thread.run(745).

九月 07, 2015 4:36:05 下午 org.apache.catalina.core.StandardContext listenerStop
严重: Exception sending context destroyed event to listener instance of class com.tansuosoft.discoverx.web.ContextListener
common.exception.DBException: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class ‘‘ for connect URL ‘null‘
	at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5726)
	at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:160)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
	at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:677)
	at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1912)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class ‘‘ for connect URL ‘null‘
	at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createConnectionFactory(BasicDataSource.java:1452)
	at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1371)
	at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)
	... 18 more
Caused by: java.sql.SQLException: No suitable driver
	at java.sql.DriverManager.getDriver(DriverManager.java:315)
	at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createConnectionFactory(BasicDataSource.java:1437)
	... 23 more

九月 07, 2015 4:36:05 下午 org.apache.catalina.startup.HostConfig deployDescriptor
信息: Deployment of configuration descriptor E:\apache-tomcat-7.0.63\conf\Catalina\localhost\osa.xml has finished in 5,836 ms

2、错误原因

连接MySQL数据库时,配置数据库驱动和MySQL连接路径、账号、密码时,都是空导致报错

3、解决办法

在配置文件中配置数据库驱动、账号、密码和数据库连接路径

版权声明:本文为博主原创文章,未经博主允许不得转载。

Cannot create JDBC driver of class '' for connect URL 'null'

时间: 2024-11-05 06:24:16

Cannot create JDBC driver of class '' for connect URL 'null'的相关文章

JNDI数据源局部配置(解决Cannot create JDBC driver of class &#39;&#39; for connect URL &#39;null&#39;)

最开始,我是借鉴 孤傲苍狼的JNDI教程去做的,他讲得很详细,但是坏处也就是因为他讲的太详细.查了很多书,都是建议说不要用全局去配置JNDI,一是要修改tomcat的server.xml,容易破坏tomcat ,其次是那样吃力不讨好.我是建议用局部变量就好的. 1.步骤一:学习配置JNDI之前,介绍你一定要先掌握tomcat的配置虚拟目录(可以去看Tomcat中主目录配置与虚拟目录配置问题这样的文章,也可以去我的tomcat配置虚拟目录 -思维焦点网易博客找类似的链接).学习了tomcat的配置

Cannot create JDBC driver of class &#39;&#39; for connect URL &#39;null&#39;问题解决

Cannot create JDBC driver of class '' for connect URL 'null'问题解决方法1 严格来说也不叫错 只是不同的版本写法不一样 tomcat-5.0.28是这种形式 <Resource name="jdbc/conn" type="javax.sql.DataSource"/> <ResourceParams name="jdbc/conn"> <parameter

SQLNestedException: Cannot create JDBC driver of class &#39;&#39; for connect URL &#39;null&#39; 解决办法

当跑jndi项目时抛出:org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'异常 解决办法: 1.在Tomcat 6.0\lib下加入oracle驱动包ojdbc14_g-10.2.0.1.0.jar 2.在Tomcat 6.0\conf下的context.xml文件中加入 [javascript] view plaincopy <R

Cannot create JDBC driver of class &#39;com.p6spy.engine.spy.P6SpyDriver&#39;

Cannot create JDBC driver of class 'com.p6spy.engine.spy.P6SpyDriver' 开始不知为何报如此错,因为用IronTrackSQL已经不是一次两次了 jar包,spy.properties都应该没问题,但是就是报这个错. 后来在网上查到,把spy.properties放到tomcat/bin目录下即可解决该问题. 这种问题真想仔细检查检查到底问题出在什么地方... Cannot create JDBC driver of class

com.mysql.jdbc.Driver 和 com.mysql.cj.jdbc.Driver的区别

调试代码时,发现错误: Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary. 在网上巴拉巴拉发现,原

java.lang.ClassNotFoundException: com.mysql.cj.jdbc.Driver

java.lang.ClassNotFoundException: com.mysql.cj.jdbc.Driver at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:338) at java

tomcat启动过程报the JDBC Driver has been forcibly unregistered问题的修复过程

最近两天在整理关于flume的总结文档,没有启动过tomcat.昨天晚上部署启动,发现报了如题的错误,全文如下: 严重: The web application [/oa-deploy] registered the JBDC driver [com.microsoft.sqlserver.jdbc.SQLServerDriver] but failed to unregister it when the web application was stopped. To prevent a mem

To prevent a memory leak, the JDBC Driver has been forcibly unregistered.

1.错误描述 严重: The web application [/AMST] registered the JDBC driver [org.logicalcobwebs.proxool.ProxoolDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered. 八

registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped.

最近在用maven整合SSH做个人主页时候,在eclipse里面使用tomcat7插件发布项目是没有问题的,但当打包成war之后,使用tomcat7单独发布项目,就出现了以下的错误. 严重: Context [/wangxin] startup failed due to previous errors 八月 16, 2017 7:29:12 下午 org.apache.catalina.loader.WebappClassLoaderBase clearReferencesJdbc 严重: T