3 Replies Latest reply on Jul 16, 2002 12:46 AM by Todd Gould

    MySQL CLASSPATH problem

    Todd Gould Novice

      I am migrating my system from JBoss 2.4.1 to JBoss 3.0 with Catalina 4.0.3. I thought I had learned everything that I needed from the various posts concerning the changes in how database(s) are configured. However, I must still be missing something. JBOSS successfully starts and I have verified from the log file that the DataSource is successfully registered. Additionally, my bean seems to locate it under the expected JNDI name. However, whenever the bean tries to get a connection from the Data Source, I get the following exception:

      08:43:33,546 ERROR [STDERR] class HelloBean: encountered SQL error <org.jboss.util.NestedSQLException: Failed to register driver for: org.gjt.mm.mysql.Driver; - nested throwable: (java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver);
      - nested throwable: (org.jboss.resource.ResourceException: Failed to register driver for: org.gjt.mm.mysql.Driver; - nested throwable: (java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver))>

      Here is the relevant section from my $JBOSS_DIST/server/default/deploy/mysql-service.xml file:


      MySqlDbRealm

      <depends optional-attribute-name="ManagedConnectionFactoryName">
      <!--embedded mbean-->


      MyPool



      <config-property name="ConnectionURL" type="java.lang.String">jdbc:mysql://158.188.135.225:3306/mydb</config-property>
      <config-property name="DriverClass" type="java.lang.String">org.gjt.mm.mysql.Driver</config-property>




      <!--Below here are advanced properties -->
      <!--hack-->
      <depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name=JBoss LocalTransaction JDBC Wrapper





      and from my $JBOSS_DIST/server/default/conf/login-config.xml file:


      <application-policy name = "MySqlDbRealm">

      <login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule" flag = "required">
      <module-option name = "principal">myuser</module-option>
      <module-option name = "userName">myuser</module-option>
      <module-option name = "password">mypass</module-option>
      <module-option name = "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=MySqlDS</module-option>
      </login-module>

      </application-policy>


      What am I missing? How do I set the CLASSPATH for this driver?

      Thanks,

      Todd