1 Reply Latest reply on Jul 12, 2002 11:42 AM by dipens

    Simple Entity Bean not deploying due to incorrect mysql clas

    dipens

      I am using JBoss 3 (downloaded earlier in the week).

      I get the following error when deploying an entity bean:

      org.jboss.util.NestedSQLException: Apparently wrong driver class specified for URL: class: org.gjt.mm.mysql.Driver, url:

      jdbc:mysql://localhost:3306/mysql;

      The URL is correct since I have tested it using an independant class.
      The class is correct since I have tried using mysql JDBC drivers 2.04 through to 2.14 (same problem).
      This class is also referenced from the independant test class I used to test the URL.


      standardjaws.xml includes:


      java:/MySqlDS
      <type-mapping>mySQL</type-mapping>
      false
      <default-entity>
      <create-table>true</create-table>
      <remove-table>false</remove-table>
      <tuned-updates>true</tuned-updates>
      <read-only>false</read-only>
      <time-out>300</time-out>
      <row-locking>false</row-locking>
      <read-ahead>false</read-ahead>
      </default-entity>
      etc


      standardjbosscmp-jdbc.xml includes:

      <jbosscmp-jdbc>

      java:/MySqlDS
      <datasource-mapping>mySQL</datasource-mapping>
      <create-table>true</create-table>
      <remove-table>false</remove-table>
      <read-only>false</read-only>
      <time-out>300</time-out>
      <pk-constraint>true</pk-constraint>
      <fk-constraint>false</fk-constraint>
      <row-locking>false</row-locking>
      <preferred-relation-mapping>foreign-key</preferred-relation-mapping>
      <read-ahead>
      on-load
      <page-size>1000</page-size>
      <eager-load-group>*</eager-load-group>
      </read-ahead>
      <list-cache-max>1000</list-cache-max>


      mysql-service.xml includes:



      <config-property name="ConnectionURL" type="java.lang.String">
      jdbc:mysql://localhost:3306/mysql</config-property>
      <config-property name="DriverClass" type="java.lang.String">org.gjt.mm.mysql.Driver</config-property>
      <!--set these only if you want only default logins, not through JAAS -->
      <config-property name="UserName" type="java.lang.String">aUserName</<config-property>
      <config-property name="Password" type="java.lang.String">aPassword</<config-property>



      The MySQLDS loads properly when I start Jboss:

      11:55:39,936 INFO [MainDeployer] Starting deployment of package: file:/D:/jboss/server/default/deploy/jboss-local-jdbc.
      rar
      11:55:40,097 WARN [ServiceController] jboss.jca:service=RARDeployment,name=JBoss LocalTransaction JDBC Wrapper does not
      implement any Service methods
      11:55:40,097 WARN [ServiceController] jboss.jca:service=LocalTxDS,name=MySqlDS does not implement any Service methods
      11:55:40,107 INFO [LocalTxConnectionManager] Creating
      11:55:40,307 INFO [LocalTxConnectionManager] Created
      11:55:40,337 INFO [LocalTxConnectionManager] Starting
      11:55:41,118 INFO [MySqlDS] Bound connection factory for resource adapter 'JBoss LocalTransaction JDBC Wrapper' to JNDI
      name 'java:/MySqlDS'
      11:55:41,128 INFO [LocalTxConnectionManager] Started


      ejb-jar.xml - I have tried including and excluding:

      <resource-ref>
      The default DS
      <res-ref-name>jdbc/MySQLDS</res-ref-name>
      <res-type>javax.sql.DataSource</res-type>
      <res-auth>Container</res-auth>
      </resource-ref>

      I can't think of anything else I need to modify to ensure my simple entity bean deploys.

      Can anyone make any suggestions?

      Many Thanks in advance!

      Dipen