Some of the parameter names seem to have changed. I suggest grabbing a recent nightly build of Tomcat 4.1 and following the instructions here:
http://marc.theaimsgroup.com/?l=tomcat-user&m=102242646003357&w=2 There I point to two other messages that I sent to the list and reference the original email where I found the solution. I also added a bit of code to one of the emails so be sure to read them all. I think the main problem is this. Compare my configuration to yours. Notice that some of the param names are different and there are some that you don't have that you need (such as "factory"): <Resource name="jdbc/utasklistDB" auth="Container" type="javax.sql.DataSource"/> <ResourceParams name="jdbc/utasklistDB"> <parameter> <name>username</name> <value>blahuser</value> </parameter> <parameter> <name>password</name> <value>blahpass</value> </parameter> <parameter> <name>driverClassName</name> <value>oracle.jdbc.driver.OracleDriver</value> </parameter> <parameter> <name>url</name> <value>jdbc:oracle:thin:@oracle.mydomain:1521:utasklst</value> </parameter> <parameter> <name>factory</name> <value>org.apache.commons.dbcp.BasicDataSourceFactory</value> </parameter> <parameter> <name>maxActive</name> <value>100</value> </parameter> <parameter> <name>maxIdle</name> <value>30000</value> </parameter> <parameter> <name>maxWait</name> <value>100</value> </parameter> <parameter> <name>validationQuery</name> <value>SELECT MAX(id) FROM Users</value> </parameter> </ResourceParams> Jake At 07:12 PM 5/28/2002 -0400, you wrote: >I was able to connect by doing: > >Class.forName("com.sybase.jdbc2.jdbc.SybDriver"); >conn = DriverManager.getConnection(....); > >However, still doesn't work if I do ds.getConnection(); > >How can I check to see if the datasource is loaded correctly besides >checking if it's null or not. > >Thanks, > >Dean Chen > > >-----Original Message----- >From: Chen, Dean (Zhun) >Sent: Tuesday, May 28, 2002 1:00 PM >To: 'Tomcat Users List' >Subject: tomcat 4.0.3 and No suitable driver SQLException > > >Hi, > >I know this has been covered before, and I've searched the archives, but >none of the solutions posted seemed to work. Am I missing something? > >I am using Tomcat 4.03, JDK 1.4, and Sybase JConn 5.5 > >Here's what I did: > >I installed the appropriate applications. >I put jconn2.jar in CATALINA_HOME/common/lib > >My settings are as follows >server.xml > <Resource name="jdbc/setsDataSource" auth="Container" > type="javax.sql.DataSource"/> > > <ResourceParams name="jdbc/setsDataSource"> > <parameter><name>driverClassName</name> > <value>com.sybase.jdbc2.jdbc.SybDriver</value> > </parameter> > <parameter><name>url</name> > <value>jdbc:sybase:Tds:servername:4946/database</value> > </parameter> > <parameter><name>user</name><value>username</value></parameter> > <parameter><name>password</name><value>password</value></parameter> > </ResourceParams> > > >web.xml > <resource-ref> > <description>Sets Database</description> > <res-ref-name>jdbc/setsDataSource</res-ref-name> > <res-type>javax.sql.DataSource</res-type> > <res-auth>Container</res-auth> > </resource-ref> > > >I have a method that has this > > Context ctx = new InitialContext(); > Context envCtx = (Context) ctx.lookup("java:comp/env/"); > DataSource ds = (DataSource) envCtx.lookup("jdbc/setsDataSource"); > > if (ds==null) > throw new DatasourceUnavailableException("Unable to obtain >datasource: "+name); > > try { > conn = ds.getConnection(); > catch { blah blah.... > > >That getConnection() part throws a SQLException.... > >java.sql.SQLException: No suitable driver > at java.sql.DriverManager.getDriver(DriverManager.java:243) > at >tyrex.jdbc.xa.EnabledDataSource.getConnection(EnabledDataSource.java:233) > at >tyrex.jdbc.xa.EnabledDataSource.getConnection(EnabledDataSource.java:204) > at >com.gs.ed.sh.SetsInitializer.getConnection(SetsInitializer.java:83) > at com.gs.ed.sh.SetsInitializer.reload(SetsInitializer.java:111) > at com.gs.ed.sh.SetsInitializer.load(SetsInitializer.java:100) > at com.gs.ed.sh.SetsInitializer.init(SetsInitializer.java:61) > at javax.servlet.GenericServlet.init(GenericServlet.java:258) > at >org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:91 >6) > at >org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:808) > at >org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java: >3266) > at >org.apache.catalina.core.StandardContext.reload(StandardContext.java:2479) > at >org.apache.catalina.loader.WebappContextNotifier.run(WebappLoader.java:1329) > at java.lang.Thread.run(Thread.java:536) > >Thanks in advance. > >Dean Chen > > > >-- >To unsubscribe, e-mail: ><mailto:[EMAIL PROTECTED]> >For additional commands, e-mail: ><mailto:[EMAIL PROTECTED]> > >-- >To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> >For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
