many thanks, it works beautifully now.
what i did
1. META-INF/context.xml
<?xml version="1.0" encoding="UTF-8"?>
<Context debug="0" displayName="gallery" docBase="gallery" path="/gallery"
reloadable="true">
<Logger className="org.apache.catalina.logger.FileLogger"
prefix="Gallery." suffix=".log" timestamp="true"/>
<!-- Define a database connection pool for MYSQL -->
<Resource auth="Container" name="jdbc/galleryDB"
type="javax.sql.DataSource"
driverClassName="org.gjt.mm.mysql.Driver"
url="jdbc:mysql://localhost/jidienadmin?autoReconnect=true"
username="ada"
password="erer"
maxActive="50"
maxIdle="10"
maxWait="10000"
removeAbandoned="true"
removeAbandonedTimeout="60"
logAbandoned="true"/>
</Context>
2. in WEB-INF/web.xml
<web-app>
...
<resource-ref>
<res-ref-name>jdbc/galleryDB</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
...
</web-app>
3 remove the portion from server.xml (as we don't need it,application
specific context.xml works)
4 remove the resourcelink from ..\conf\Catalina\localhost\...xml
From: "Wang, Hansen" <[EMAIL PROTECTED]>
Reply-To: "Tomcat Users List" <users@tomcat.apache.org>
To: "Tomcat Users List" <users@tomcat.apache.org>
Subject: RE: JNDI Datasource Problem
Date: Mon, 27 Feb 2006 11:00:40 -0700
Two problems:
1. In ResourceLink, the value for attribute "golbal" should be
"jdbc/galleryDB" instead of "galleryDB".
2. The factory classname is wrong if you are using tomcat5's
naming-factory-dbcp.jar. You can just remove that line and the default
is used.
-----Original Message-----
From: lee hwaying [mailto:[EMAIL PROTECTED]
Sent: Friday, February 24, 2006 3:22 PM
To: users@tomcat.apache.org
Subject: JNDI Datasource Problem
ERROR JDBCExceptionReporter - Cannot create JDBC driver of class '' for
connect URL 'null'
I still get the above error in Tomcat 5.5.15 after doing the below.
Please help
web.xml :
...
<resource-ref>
<res-ref-name>jdbc/galleryDB</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
...
C:\apache-tomcat-5.5.15\conf\server.xml :
...
<!-- Global JNDI resources -->
<GlobalNamingResources>
<!-- Test entry for demonstration purposes -->
<Environment name="simpleValue" type="java.lang.Integer"
value="30"/>
<!-- Editable user database that can also be used by
UserDatabaseRealm to authenticate users -->
<Resource name="UserDatabase" auth="Container"
type="org.apache.catalina.UserDatabase"
description="User database that can be updated and saved"
factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
pathname="conf/tomcat-users.xml" />
<Resource auth="Container" name="jdbc/galleryDB" type="
javax.sql.DataSource"
factory="org.apache.commons.dbcp.BasicDataSourceFactory"
driverClassName="org.gjt.mm.mysql.Driver"
url="jdbc:mysql://localhost/Gallery?autoReconnect=true"
username="GalleryUser"
password="hwaying"
maxActive="50"
maxIdle="10"
maxWait="10000"
removeAbandoned="true"
removeAbandonedTimeout="60"
logAbandoned="true"/>
</GlobalNamingResources>
...
C:\apache-tomcat-5.5.15\conf\Catalina\localhost\root.xml
<Context debug="0" displayName="gallery" path="/gallery"
docbase="C:\apache-
tomcat-5.5.15\webapps\gallery" reloadable="true">
<!-- Link to the user database we will get roles from -->
<ResourceLink name="jdbc/galleryDB" global="galleryDB"
type="javax.sql.DataSource"/> </Context>
Please help
many thansk
_________________________________________________________________
Find love online with MSN Personals.
http://match.msn.com.my/match/mt.cfm?pg=channel
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_________________________________________________________________
Find love online with MSN Personals.
http://match.msn.com.my/match/mt.cfm?pg=channel
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]