From: John H. <jh...@ir...> - 2002-06-08 19:57:28
|
put the driver jar file in the classpath ----- Original Message ----- From: "Jim" <ji...@pr...> Date: Thu, 6 Jun 2002 14:38:14 -0400 To: <jbo...@li...> Subject: [JBoss-user] org.jboss.util.NestedSQLException: failed to register driver > I have one remaining problem with connecting to a database on a remote > machine (occurs when I invoke a method on the bean that requests the > connection using getConnection) > > Here's the exception I get: > org.jboss.util.NestedSQLException: Failed to register driver for: > org.gjt.mm.mysql.Driver > > A little further up in the log file: > Driver not yet registered for url: > jdbc:mysql://remote.machine.org:3306/mydatabase > > I followed the examples in the 'declaring resource references' section of > the jboss manual. > > In particular, I have this in my ejb-jar.xml file: > <resource-ref> > <description>Blah</description> > <res-ref-name>jdbc/MySqlDS</res-ref-name> > <res-type>javax.sql.DataSource</res-type> > <res-auth>Container</res-auth> > </resource-ref> > > And in my jboss.xml: > <resource-ref> > <res-ref-name>jdbc/MySqlDS</res-ref-name> > <jndi-name>java:/MySqlDS</jndi-name> > </resource-ref> > > Finally, my jboss-service file has the entire mbean section from the mysql > example > (http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/jboss/jbosscx/src/etc/exampl > e-config/mysql-service.xml?rev=1.7&content-type=text/vnd.viewcvs-markup) > with the appropriate changes for my setup. > > I have also put an application-policy entry in my login-config.xml file... > > I have copied the mm.mysql jar file into my server/default/lib directory. > (it is version 2.0.14 of the driver). > > Any suggestions? > > Thanks... > Jim > > > > > > _______________________________________________________________ > > Don't miss the 2002 Sprint PCS Application Developer's Conference > August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm > > _______________________________________________ > JBoss-user mailing list > JBo...@li... > https://lists.sourceforge.net/lists/listinfo/jboss-user > -- _______________________________________________ Get your premium email from http://www.ireland.com/email |