Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Connection pool in Tomcat 4.1.3

 
lekha phijo
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have specified the configuration for jdbc in the server.xml
<Resource name="jdbc/mydb" auth="Container" type="javax.sql.DataSource"/>
<ResourceParams name="jdbc/mydb">
<parameter>
<name>driverClassName</name>
<value>org.gjt.mm.mysql.Driver</value>
</parameter>
<parameter>
<name>driverName</name>
<value>jdbc:mysql//localhost/authority</value>
</parameter>
<parameter>
<name>user</name>
<value>Lekha</value>
</parameter>
<parameter>
<name>password</name>
<value>abc</value>
</parameter>
<parameter>
<name>pool</name>
<value>ON</value>
</parameter>
<parameter>
<name>loop</name>
<value>ON</value>
</parameter>
</ResourceParams>



In my code when I look up for the datasource using JNDI I get the foll error
cannot create PoolableConnectionFactory cause,
A user Id and password are required to establish a JDBC connection
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic