wood burning stoves*
The moose likes JDBC and the fly likes Datasource for Tomcat 4.1 and Sybase Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Datasource for Tomcat 4.1 and Sybase" Watch "Datasource for Tomcat 4.1 and Sybase" New topic
Author

Datasource for Tomcat 4.1 and Sybase

giri pal
Greenhorn

Joined: Nov 06, 2002
Posts: 3
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

Joined: Nov 06, 2002
Posts: 3
Still looking for an answer. Can any one help me?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Datasource for Tomcat 4.1 and Sybase