Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@apache.org Received: (qmail 22707 invoked from network); 23 Sep 2002 14:25:42 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 23 Sep 2002 14:25:42 -0000 Received: (qmail 14329 invoked by uid 97); 23 Sep 2002 14:25:01 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-user@jakarta.apache.org Received: (qmail 14301 invoked by uid 97); 23 Sep 2002 14:25:00 -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 14266 invoked by uid 98); 23 Sep 2002 14:25:00 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) From: John M. Hollingsworth To: "Tomcat Users List" Subject: Re: Re: Cannot load JDBC driver class 'null' Date: Mon, 23 Sep 2002 10:24:13 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Message-Id: <20020923142413.TUOO16428.lakemtao03.cox.net@smtp.east.cox.net> X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N I never got mine to work with the ? in place separating the URL parameters. Something about the way the ? is read. Try underscore in its place. For some reason, that works. Maybe it's the Cocoon parser? > > From: John Walstra > Date: 2002/09/23 Mon AM 12:29:36 EDT > To: "Tomcat Users List" , > Jacob Kjome > Subject: Re: Cannot load JDBC driver class 'null' > > From the mysql-connector-java-2.0.14 README ... > > -- > A simple connection example looks like: > > Class.forName("com.mysql.jdbc.Driver").newInstance(); > > java.sql.Connection conn; > > conn = DriverManager.getConnection( > "jdbc:mysql://localhost/test?user=blah&password=blah"); > -- > > And if I un-jar their jar file, I can find it. There is also > "org.gjt.mm.mysql.Driver", which also returns the same Exception. I think > "org.gjt.mm.mysql.Driver" exists to be back-wards compatible. That is also > the driver class they use in the JNDI Datasource HOWTO. > > On Sunday 22 September 2002 11:14 pm, Jacob Kjome wrote: > > Yes, it should find it. Have you verified that the class in the > > driverClassName element actually does exist in that package in the jar file > > you just mentioned? > > > > Jake > > > > At 10:56 PM 9/22/2002 -0500, you wrote: > > >I do have mysql-connector-java-2.0.14-bin.jar in the common/lib directory. > > >Shouldn't it find the correct class being there? > > > > > >On Sunday 22 September 2002 10:39 pm, Kwok Peng Tuck wrote: > > > > Are you actually using the mysql driver? Cause if it says loading > > > > driver null, means there isn't one. > > > > > > > > John Walstra wrote: > > > > >I'm trying to set up a JNDI connection to MySQL. I'm using the binary > > > > > release of 4.1.11 with 4.0.4's jasper-compiler.jar and > > > > > jasper-runtime.jar. I'm also using mysql-connector-java-2.0.14. > > > > > > > > > >It's very similar to this thread > > > > >http://www.mail-archive.com/tomcat-user@jakarta.apache.org/msg64346.ht > > > > >ml , however I still can't get mine working after reading that thread. > > > > > I've basically followed (cut and paste) the JNDI Datasource HOWTO, > > > > > http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examp > > > > >les-h owto.html . > > > > > > > > > >Here is the Context section of my server.xml > > > > > > > > > > > > > > docBase="/usr/local/web/meta-htdocs/JWALSTRA/htdocs/jsp" > > > > > debug="5" useNaming="true" > > > > > reloadable="true" crossContext="true"> > > > > > > > > > > > > > > prefix="jkw_log." suffix=".txt" > > > > > timestamp="true"/> > > > > > > > > > > > > > > auth="Container" > > > > > type="javax.sql.DataSource"/> > > > > > > > > > > > > > > > > > > > > factory > > > > > > org.apache.commons.dbcp.BasicDataSourceFactory > > > > > > > > > > > > > > > > > > > > > > > > > > > > maxActive > > > > > 100 > > > > > > > > > > > > > > > > > > > > > > > > > maxIdle > > > > > 30 > > > > > > > > > > > > > > > > > > > > > > > > > maxWait > > > > > 10000 > > > > > > > > > > > > > > > > > > > > > > > > > > > > username > > > > > nobody > > > > > > > > > > > > > > > password > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > driverClassName > > > > > com.mysql.jdbc.Driver > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > url > > > > > > jdbc:mysql://localhost:3306/jkw?autoReconnect=true > > > > > > > > > > > > > > > > > > > > > > > > > > > >Here is my web.xml > > > > > > > > > > > > > > > > > > > > > > > > PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" > > > > > "http://java.sun.com/dtd/web-app_2_3.dtd"> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > /orataglib > > > > > > > > > > > > > > > /WEB-INF/tlds/orataglib_1_0_3.tld > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > /jkw > > > > > > > > > > > > > > > /WEB-INF/tlds/jkw-1.0.tld > > > > > > > > > > > > > > > > > > > > > > > > > MySQL DB Connection > > > > > jdbc/JKW > > > > > javax.sql.DataSource > > > > > Container > > > > > > > > > > > > > > > > > > > > > > > > >My common/lib directory ... (jasper* is from 4.0.4) > > > > > > > > > >-rw-r--r-- 1 root root 45386 Sep 19 08:30 activation.jar > > > > >-rw-r--r-- 1 root root 716139 Sep 19 08:30 ant.jar > > > > >-rw-r--r-- 1 root root 90503 Sep 19 08:30 > > > > >commons-collections.jar > > > > >-rw-r--r-- 1 root root 62998 Sep 19 08:30 > > > > > commons-dbcp.jar -rw-r--r-- 1 root root 16910 Sep 19 > > > > > 08:30 > > > > >commons-logging-api.jar > > > > >-rw-r--r-- 1 root root 28930 Sep 19 08:30 > > > > > commons-pool.jar -rw-r--r-- 1 root root 210191 Sep 22 > > > > > 21:40 > > > > > jasper-compiler.jar -rw-r--r-- 1 root root 67077 Sep 22 > > > > > 21:40 jasper-runtime.jar -rw-r--r-- 1 root root 84854 > > > > > Sep 19 08:30 jdbc2_0-stdext.jar -rw-r--r-- 1 root root > > > > > 98496 Sep 19 08:30 jndi.jar > > > > >-rw-r--r-- 1 root root 8674 Sep 19 08:30 jta.jar > > > > >-rw-r--r-- 1 root root 280984 Sep 19 08:30 mail.jar > > > > >-rw-r--r-- 1 root root 125961 Sep 22 21:27 > > > > >mysql-connector-java-2.0.14-bin.jar > > > > >-rw-r--r-- 1 root root 28664 Sep 19 08:30 > > > > > naming-common.jar -rw-r--r-- 1 root root 18222 Sep 19 > > > > > 08:30 naming-factory.jar -rw-r--r-- 1 root root 37601 > > > > > Sep 19 08:30 > > > > > naming-resources.jar -rw-r--r-- 1 root root 80054 Sep > > > > > 19 08:30 servlet.jar > > > > > > > > > >Here is my code sniplet ... > > > > > > > > > > Connection conn = null; > > > > > Statement stmt = null; > > > > > ResultSet rset = null; > > > > > > > > > > Context ctx = new InitialContext(); > > > > > if(ctx == null ) > > > > > { > > > > > throw new Exception("Boom - No Context"); > > > > > } > > > > > > > > > > DataSource ds = (DataSource)ctx.lookup( "java:comp/env/jdbc/JKW"); > > > > > > > > > > try > > > > > { > > > > > conn = ds.getConnection(); > > > > > stmt = conn.createStatement(); > > > > > > > > > >And the error message ... > > > > > > > > > >java.sql.SQLException: Cannot load JDBC driver class 'null' > > > > > at > > > > >org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSour > > > > >ce.j ava:529) at > > > > >org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource. > > > > >java > > > > > > > > > >:312) at jkw.jsp.beans.SkillTypeBean.setTypeId(SkillTypeBean.java:42) > > > > >: at > > > > > > > > > > sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at > > > > >sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.j > > > > >ava: 39) at > > > > >sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccess > > > > >orIm pl.java:25) > > > > > > > > > > > > > > >Any ideas? > > > > > > > > > >Thanks, > > > > >John > > > > > >-- > > >John Walstra > > >1002 North Stanford Street > > >Port Washington, WI 53074 > > >H: (262) 284-2395 > > >C: (847) 858-2395 > > > > > >jwalstra@spoonserver.com > > >john_walstra@yahoo.com > > >jwalstra@wi.rr.com > > > > > >It is so stupid of modern civilisation to have given up believing in the > > >devil when he is the only explanation of it. > > > -- Ronald Knox, "Let Dons Delight" > > > > > >-- > > >To unsubscribe, e-mail: > > > For additional > > > commands, e-mail: > > -- > John Walstra > 1002 North Stanford Street > Port Washington, WI 53074 > H: (262) 284-2395 > C: (847) 858-2395 > > jwalstra@spoonserver.com > john_walstra@yahoo.com > jwalstra@wi.rr.com > > The unfacts, did we have them, are too imprecisely few to warrant our > certitude. > > -- > To unsubscribe, e-mail: > For additional commands, e-mail: > > -- To unsubscribe, e-mail: For additional commands, e-mail: