This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Datasource for Tomcat 4.1 and Sybase

 
giri pal
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using Tomcat as application server and Sybase as DB.
I recently migrated my application Tomcat 4.0xx to 4.1 and wanted to use the datasource/connection pool.I use JConnect (JConn2.jar) for the JDBC driver and it works fine in Tomcat 4.0.
IS there any body that uses Tomcat 4.1 and sybase? can you explain me please? or post a sample working code
here is what i did:
1)I have placed the JConn2.jar under $CATALINA_HOME/common/lib
2)In my server.xml I have modified
<GlobalNamingResources>
<Environment name="simpleValue" override="true" type="java.lang.Integer" value="30"/>
<Resource name="jdbc/TestDB" scope="Shareable" type="javax.sql.DataSource"/>
<Resource auth="Container" description="User database that can be updated and saved" name="UserDatabase" scope="Shareable" type="org.apache.catalina.UserDatabase"/>
<ResourceParams name="jdbc/TestDB">
<parameter>
<name>validationQuery</name>
<value></value>
</parameter>
<parameter>
<name>maxWait</name>
<value>5000</value>
</parameter>
<parameter>
<name>maxActive</name>
<value>2</value>
</parameter>
<parameter>
<name>password</name>
<value>xxxx</value>
</parameter>
<parameter>
<name>url</name>
<value>jdbc:sybase:Tds:localhost:3000</value>
</parameter>
<parameter>
<name>driverClassName</name>
<value>com.sybase.jdbc2.jdbc.SybDriver</value>
</parameter>
<parameter>
<name>maxIdle</name>
<value>2</value>
</parameter>
<parameter>
<name>username</name>
<value>xxxx</value>
</parameter>
---------------------------------------------
3)AND in my web.xml

4) when i run the application I get the following error:
java.sql.SQLException: Cannot load JDBC driver class 'null'
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSou
rce.java:529)
at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource
.java:312)
 
giri pal
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Still looking for an answer. Can any one help me?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic