tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin Hart <kevin.h...@stanford.edu>
Subject NamingException: Cannot create resource instance
Date Thu, 07 Sep 2006 19:12:45 GMT
Hello,

I'm trying to get a jsp to access a mysql database.  I'm using the
"preferred" JNDI resources approach with Tomcat, but I keep getting the
NamingException: Cannot create resource instance error.  I know others
have posted with this error.  I've read some of those posts, but
the solutions don't seem to fix the problem in my case.

I'm using FC5, MySql 5.0.22 and Apache Tomcat 5.5.15.  I attach the
following files:

exception.report is a copy of the html page showing the error.

common.lib.contents is the output of a script session to show the
contents of my /usr/share/tomcat5/common/lib directory.  I have at least the
following in there: mysql-connector-java-5.0.3-bin.jar, commons-pool.jar,
common-collections.jar, naming-factory.jar and naming-resources.jar.

server.xml is my /usr/share/tomcat5/conf/server.xml file.  I have a
<Resource> tag inside a <DefaultContext> tag inside the <host> element
(see the end of the file).

web.xml is from the jsp-examples/WEB-INF directory.  (I'm just tacking
my jdbctest.jsp onto the existing jsp-examples webapp.)  The
<resource-ref> tag is at the end of that file.

Having no experience with Tomcat, I'm basically following instructions
from Wrox's book "Professional Apache Tomcat 5."  I must be misreading it.

Thanks in advance,
Kevin


Mime
View raw message