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

1 resposta
J

Galer,

To usando Tomcat 5.5, java 1.6

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

configurei o contexto no server.xml:

<Context path="/estudos" docBase="C:\Documents and Settings\usuario\workspace\contextTomcat\WebContent" debug="0">
  <Resource name="jdbc/TesteDB" auth="Container" type="javax.sql.DataSource"
     maxActive="100" maxIdle="30" maxWait="10000"
     username="root" password="12345678" driverClassName="com.mysql.jdbc.Driver"
     url="jdbc:mysql://localhost:3306/test?autoReconnect=true"/>
</Context>

web.xml:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app id="WebApp_ID">
	<display-name>contextTomcat</display-name>
	<welcome-file-list>
		<welcome-file>index.html</welcome-file>
		<welcome-file>index.htm</welcome-file>
		<welcome-file>index.jsp</welcome-file>
		<welcome-file>default.html</welcome-file>
		<welcome-file>default.htm</welcome-file>
		<welcome-file>default.jsp</welcome-file>
	</welcome-file-list>
	
	<resource-ref>
	  <description>Conexao MySQL</description>
	  <res-ref-name>jdbc/TesteDB</res-ref-name>
	  <res-type>javax.sql.DataSource</res-type>
	  <res-auth>Container</res-auth>
	</resource-ref>
</web-app>
E o jar já esta no projeto:
mysql-connector-java-5.1.5-bin.jar

Alguem sabe oque pode ser?

1 Resposta

_fs

Tente colocar o jar do driver no diretório server/lib do Tomcat.

Criado 1 de novembro de 2007
Ultima resposta 1 de nov. de 2007
Respostas 1
Participantes 2