dcsimg
db connection pooling to mssql server from tomcat 4.0.6
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Razvan_Droscaru
Posted On:   Saturday, May 15, 2004 06:10 AM

Hello, I know this was a very debated problem and often resolved. Db connection pooling to MSSQL Server from Tomcat 4.0.6. The error is: org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null', cause: No suitable driver I have put the commons-collections-3.0.jar, commons-dbcp-1.1.jar, commons-pool-1.1.jar, jtds-0.8-rc1.jar files in %TOMCAT_HOME%commonlib My configuration files looks like: suffix=".txt" timestamp="true"/> factory org.apache.commons.dbcp.BasicDataSourceFactory    More>>

Hello,



I know this was a very debated problem and often resolved. Db connection pooling to MSSQL Server from Tomcat 4.0.6. The error is:



org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null', cause: No suitable driver



I have put the commons-collections-3.0.jar, commons-dbcp-1.1.jar, commons-pool-1.1.jar, jtds-0.8-rc1.jar files in %TOMCAT_HOME%commonlib

My configuration files looks like:













suffix=".txt" timestamp="true"/>







factory

org.apache.commons.dbcp.BasicDataSourceFactory





user

razvan





password

razvan





driverClassName

net.sourceforge.jtds.jdbc.Driver





url

jdbc:jtds:sqlserver://localhost:1433/test;User=razvan;Password=razvan

















testWEB

MSSQL Test App



jdbc/mspool

javax.sql.DataSource

Container







3. and Conn.java:



Context initCtx = new InitialContext();

DataSource ds = (DataSource)initCtx.lookup("java:comp/env/jdbc/mspool");

if (ds != null)

{

dbConnection = ds.getConnection();

}







If you have a solution, please give some feedback.





Thank you



Razvan Droscaru

   <<Less
About | Sitemap | Contact