2 Replies Latest reply on Jan 10, 2002 9:57 PM by davidjencks

    Database not bound problem with MySQL

    fritzsolms

      Hi

      I'm new to JBoss and this is most probably a stupid question.

      I have been battling for some time trying to get MySQL going for entity bean persistence but I get the following error when deploying the bean:
      [AutoDeployer] org.jboss.deployment.J2eeDeploymentException: Error while startin
      g ContainerManagedMySQL.jar: Could not deploy file:/D:/java/jboss/JBoss-2.4.3_To
      mcat-3.2.3/jboss/tmp/deploy/Default/ContainerManagedMySQL.jar/, Cause: org.jboss
      .ejb.DeploymentException: Could not deploy file:/D:/java/jboss/JBoss-2.4.3_Tomca
      t-3.2.3/jboss/tmp/deploy/Default/ContainerManagedMySQL.jar/, Cause:org.jboss.ejb
      .DeploymentException: mySQLDS not bound

      I have tested the JDBC driver from a Java app and that works fine. No passwords have been set on the database.

      I have modified the jboss.jcml file as in the manual:

      org.hsqldb.jdbcDriver, org.gjt.mm.mysql.Driver

      code="org.jboss.jdbc.XADataSourceLoader" name="DefaultDomain:service=XADataSource,name=MySQLDS">
      MySQLDS
      org.jboss.pool.jdbc.xa.wrapper.XADataSourceImpl
      jdbc:mysql://localhost/EJBcourse


      2
      10


      My ejb-jar file has the following resource reference for the entity bean:

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

      and the jboss deployment descriptor looks like this:


      <enterprise-beans>

      <ejb-name>AccountsManager</ejb-name>
      <jndi-name>STC/AccountsManager</jndi-name>


      <ejb-name>Account</ejb-name>
      <jndi-name>STC/Account</jndi-name>
      <resource-ref>
      <res-ref-name>jdbc/MySQLDS</res-ref-name>
      <resource-name>jdbc/MySQLDS</resource-name>
      </resource-ref>

      </enterprise-beans>
      <resource-managers>
      <resource-manager res-class="org.jboss.ejb.deployment.JDBCResource">
      <res-name>jdbc/MySQLDS</res-name>
      <res-jndi-name>MySQLDS</res-jndi-name>
      </resource-manager>
      </resource-managers>


      Any help will be greatly appreciated -- otherwise psychological counselling will be required.

      Thanks
      Fritz