Hi to all,

I have in webapps web application name "test1".

In server.xml i define Resource for MySQL db,

<Host name="localhost" appBase="webapps" ...>
<Context path="/test1" debug="0" reloadable="true" crossContext="true">
<Resource name="jdbc/mydb" auth="Container" type="javax.sql.DataSource" 
        removeAbandoned="true" removeAbandonedTimeout="30" 
        maxActive="100" maxIdle="30"  maxWait="10000"   
        username="user" password="pass" driverClassName="com.mysql.jdbc.Driver" 
        url="jdbc:mysql://localhost/mydb"/>
</Context>
</host>

In test1/WEB-INF/web.xml i define,

<resource-ref>
      <description>DB Connection</description>
      <res-ref-name>jdbc/mydb</res-ref-name>
      <res-type>javax.sql.DataSource</res-type>
      <res-auth>Container</res-auth>
</resource-ref>

I start my Apache tomcat 5 on port 80 and everything work good in
"http://localhost/test1";.

Now i want to access test1 from this link "http://localhost/";.
So i changed server.xml to,

<Host name="localhost" appBase="webapps" ...>
<Context path="/" debug="0" reloadable="true" crossContext="true">
<Resource name="jdbc/mydb" auth="Container" type="javax.sql.DataSource" 
        removeAbandoned="true" removeAbandonedTimeout="30" 
        maxActive="100" maxIdle="30"  maxWait="10000"   
        username="user" password="pass" driverClassName="com.mysql.jdbc.Driver" 
        url="jdbc:mysql://localhost/mydb"/>
</Context>
</host>

I can access to "http://localhost/";, but the JNDI Resource for MySQL is not
working and i get this error,
"org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver
of class '' for connect URL 'null'"

I try to put the mysql Connector jar in common/lib And server/lib And
shared/lib but still i get the same error.

I was googeling for hourse and found non.

So can any body help me here please ???

Thank you all.
(Sory about my English :) )
-- 
View this message in context: 
http://www.nabble.com/Problem-in-MySQL-JNDI-Resource..-tf3443968.html#a9603852
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to