Cannot create JDBC driver of class "" for connect URL "null" 解决方案

王朝java/jsp·作者佚名  2006-12-17
窄屏简体版  字體: |||超大  

Cannot create JDBC driver of class "" for connect URL "null" 解决方案

Cannot create JDBC driver of class "" for connect URL "null" 解决方案 方案(1)

解决:在%TOMCAT_HOME%\conf\Catalina\localhost下找到你的web应用对应的.xml文件,如test.xml,并在此文件的下添入代码:

<ResourceLink name="jdbc/mysql" global="jdbc/mysql" type="javax.sql.DataSourcer"/>

重启tomcat。

你的是服务器的全局JNDI资源,而用InitialContext去找server的resource当然找不到了,要想找到server的resource就得在web application中的context环境里加入一个指向该全局resource的ResourceLink。

global -->The name of the linked global resource in the global JNDI context.

name -->The name of the resource link to be created, relative to the java:comp/env context.?

type -->The fully qualified Java class name expected by the web application when it performs a lookup for this resource link.

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
 
© 2005- 王朝網路 版權所有 導航