Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@apache.org Received: (qmail 46043 invoked from network); 28 Aug 2002 21:01:57 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 28 Aug 2002 21:01:57 -0000 Received: (qmail 17183 invoked by uid 97); 28 Aug 2002 21:02:06 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-user@jakarta.apache.org Received: (qmail 17164 invoked by uid 97); 28 Aug 2002 21:02:05 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 17147 invoked by uid 98); 28 Aug 2002 21:02:05 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) Message-ID: <001901c24ed6$15590a80$5da05f18@Ceres> From: "Vance Christiaanse" To: Subject: DB2 DataSource: No suitable driver Date: Wed, 28 Aug 2002 17:01:29 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Hello, Tomcat fans, I am using Tomcat 4.0.4 and can't get a DataSource working with DB2. My attempts result in "No suitable driver", as detailed below. I have tried everything I've seen suggested for this problem, as the following steps indicate. Any help would be much appreciated. Thank you in advance, Vance Christiaanse ============================================== 1. Applied FixPack 7 (the latest fixpack) to DB2 7.2 2. Successfully ran usejava2 (to convert DB2 to use JDBC 2.0) 3. Added db2java.zip to catalina classpath by editing bin\setclasspath.bat EVIDENCE THIS MAKES THE DRIVER AVAILABLE TO CATALINA: When I omit this step and test the servlet, I get "javax.naming.NamingException: Exception creating DataSource: COM.ibm.db2.jdbc.app.DB2Driver" EVIDENCE THIS MAKES THE DRIVER AVAILABLE TO THE SERVLET: When I replace the DataSource code in the servlet with the following Class.forName("COM.ibm.db2.jdbc.app.DB2Driver"); conn = java.sql.DriverManager.getConnection( "jdbc:db2:MYDB" , "USERID", "PASSWORD"); it works with this step and doesn't work without it. 4. Updated appropriate conf\server.xml Context element to include driverClassName COM.ibm.db2.jdbc.app.DB2Driver driverName jdbc:db2:MYDB user USERID password PASSWORD EVIDENCE THIS STEP IS WORKING: If I change the driverClassName to something bogus, I get an error relating to the bogus name. The driverName, "jdbc:db2:MYDB" does work in conn = java.sql.DriverManager.getConnection( "jdbc:db2:MYDB" , "USERID", "PASSWORD"); 5. Updated appropriate web.xml to include jdbc/Alpha javax.sql.DataSource Container EVIDENCE THIS STEP IS WORKING: None. I get the same error with or without this element. 6. Visited servlet containing the following code: javax.sql.DataSource ds = (javax.sql.DataSource) ctx.lookup("java:comp/env/jdbc/Alpha"); pw.println("Get here"); conn = ds.getConnection(); pw.println("Don't get here"); 7. Got Get here 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) -- To unsubscribe, e-mail: For additional commands, e-mail: