Hello all:
I am having trouble trying to set up mySQL connection
pooling. I am using the example straight from the Wrox
"Professional Apache Tomcat" book, which is excellent
I might add.
Unfortunately I am running into an error:
org.apache.jasper.JasperException: Cannot create
resource instance
I can't quite figure this one out.
Here is my server.xml code:
<!-- Database connection pooling -->
<ResourceParams name="jdbc/HomeLand">
<parameter>
<name>driverClassName</name>
<value>org.gjt.mm.mysql.Driver</value>
</parameter>
<parameter>
<name>url</name>
<value>jdbc:mysql://localhost/homeland</value>
</parameter>
<parameter>
<name>username</name>
<value>username</value>
</parameter>
<parameter>
<name>password</name>
<value>password</value>
</parameter>
<parameter>
<name>maxActive</name>
<value>20</value>
</parameter>
<parameter>
<name>maxIdle</name>
<value>30000</value>
</parameter>
<parameter>
<name>maxWait</name>
<value>100</value>
</parameter>
</ResourceParams>
<!-- end Database connection pooling -->
and web.xml:
<resource-ref>
<res-ref-name>jdbc/HomeLand</res-ref-name>
<res-type>javax.sql.Datasource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
and jsp db code:
<%
InitialContext initCtx = new InitialContext();
DataSource ds = (DataSource)
initCtx.lookup("java:comp/env/jdbc/HomeLand");
con = ds.getConnection();
%>
Any ideas why this would happen?
=====
------------------------
int myName() {
cout << "-Matt Fury \n";
return 0;
}
------------------------
__________________________________________________
Do you Yahoo!?
Y! Web Hosting - Let the expert host your web site
http://webhosting.yahoo.com/
--
To unsubscribe, e-mail: <mailto:tomcat-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@;jakarta.apache.org>