cannot create jdbc driver of class '' for connect url 'null'

来源:百度知道 编辑:UC知道 时间:2024/07/05 20:44:10
tomcat6.0 jdbc:mysql-connector-java-3.1.14-bin.jar

D:\Java\Tomcat 6.0\webapps\wuliuxinxi\META-INF\context.xml

<!-- The contents of this file will be loaded for each web

application -->
<Context reloadable="true" >
<Resource
auth="Container"
name="jdbc/DBPool"
type="javax.sql.DataSource"
driverClassName="com.mysql.jdbc.Driver"
password="2009"
maxIdle="2"
maxWait="1000"
username="root"
url="jdbc:mysql://localhost:3306/yeyu?

autoReconnect=true&failOverReadOnly=false"
maxActive="10"/>

</Context>

D:\Java\Tomcat 6.0\webapps\wuliuxinxi\WEB-INF\web.xml

"

找不到连接池配置,或者连接池配置有问题

ds=(DataSource)ctx.lookup("java:comp/env/jdbc/DBPool");

java:comp/env/jdbc/DBPool
找找这个连接池哪儿配的呢?

错误提示很明显了, 你的连接字符串为空,仔细检查一下你的JNDI配置部分
看看tomcat的帮助,看看JNDI的url是如何设置的