3 Replies Latest reply on Nov 5, 2002 9:27 AM by onicom

    Can not bind mySQL with jboss-3.0.4

    irishuang

      I am running jboss-3.0.4.

      I downloaded mysql-serveice.xml file for mysql from
      http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/jboss/jbosscx/src/etc/example-config/
      I pick up the revision 1.2. I changed some properties in the file (user name, password, url) and then copy it into %JBOSS_INST%\server\default\deploy.

      I also put a jdbc driver mm.mysql-2.0.11-bin.jar into JBOSS_INST%\server\default\lib.

      After start the jboss server, I got the error as following,

      00:13:56,604 ERROR [URLDeploymentScanner] MBeanException: Exception in MBean operation 'checkIncompleteDeployments()'
      Cause: Incomplete Deployment listing:
      Packages waiting for a deployer:

      Incompletely deployed packages:

      MBeans waiting for classes:

      MBeans waiting for other MBeans:
      [ObjectName: jboss.jca:service=LocalTxCM,name=MySqlDS
      state: CONFIGURED
      I Depend On: jboss.jca:service=RARDeployer
      jboss.jca:service=LocalTxDS,name=MySqlDS
      jboss.jca:service=LocalTxPool,name=MySqlDS
      jboss.jca:service=CachedConnectionManager

      Depends On Me: , ObjectName: jboss.jca:service=LocalTxDS,name=MySqlDS
      state: CONFIGURED
      I Depend On: jboss.jca:service=RARDeployment,name=Minerva JDBC LocalTransaction ResourceAdapter

      Depends On Me: jboss.jca:service=LocalTxCM,name=MySqlDS
      , ObjectName: jboss.j2ee:jndiName=Inventory2Bean,service=EJB
      state: FAILED
      I Depend On:
      Depends On Me: org.jboss.deployment.DeploymentException: MySqlDS not bound, ObjectName: jboss.j2ee:jndiName=Inventory1Bean,service=EJB
      state: FAILED
      I Depend On:
      Depends On Me: org.jboss.deployment.DeploymentException: MySqlDS not bound]

      I checked the server.log, it shows,

      2002-11-05 00:13:38,904 INFO [org.jboss.deployment.MainDeployer] Starting deplo
      yment of package: file:/home/hhuang/jboss-3.0.4/server/default/deploy/jboss-loca
      l-jdbc.rar
      2002-11-05 00:13:39,294 WARN [org.jboss.system.ServiceController] jboss.jca:ser
      vice=RARDeployment,name=JBoss LocalTransaction JDBC Wrapper does not implement a
      ny Service methods
      2002-11-05 00:13:39,297 WARN [org.jboss.system.ServiceController] jboss.jca:ser
      vice=LocalTxDS,name=hsqldbDS does not implement any Service methods
      2002-11-05 00:13:39,300 INFO [org.jboss.resource.connectionmanager.LocalTxConne
      ctionManager] Creating
      2002-11-05 00:13:39,417 INFO [org.jboss.resource.connectionmanager.LocalTxConne
      ctionManager] Created
      2002-11-05 00:13:39,536 INFO [org.jboss.resource.connectionmanager.LocalTxConne
      ctionManager] Starting
      2002-11-05 00:13:39,673 INFO [org.jboss.resource.adapter.jdbc.local.LocalManage
      dConnectionFactory.DefaultDS] Bound connection factory for resource adapter 'JBo
      ss LocalTransaction JDBC Wrapper' to JNDI name 'java:/DefaultDS'
      2002-11-05 00:13:39,675 INFO [org.jboss.resource.connectionmanager.LocalTxConne
      ctionManager] Started
      2002-11-05 00:13:39,676 INFO [org.jboss.deployment.MainDeployer] Deployed packa
      ge: file:/home/hhuang/jboss-3.0.4/server/default/deploy/jboss-local-jdbc.rar


      I am really frustrated. I spent a lot of time on it and keep searching this forum. But until now no formal docs talking about mySQL working with jboss 3.0.x. As for the mysql-service.xml, there are so many version in CVS, I do not know which one I should pick up.

      Thanks for your help,
      Iris

        • 1. Re: Can not bind mySQL with jboss-3.0.4
          onicom

          Hi,

          Hope this helps. I have just got MYSQL and JBOSS 3.0.2 to work beautifully together here is exacly what I did.

          1. Make a copy of mysql-service.xml and place this in the deploy directory of the server you wish to boot i.e. default.

          2. Edit this file ensuring you are using the correct driver, url connection, username and password.

          If you set the JndiName attribute to MySqlDS, for instance, make sure this carries through into your other files.

          3. If you are using a .ant.properties file (see the templates you get with the Quick Start Guide) then ensure you set the datasource.name=java:/MySqlDS (i.e. this is the same as teh JndiName attribute you set in the mysql-service.xml file)

          4. Check the type.mapping attribute and set this to mySQL otherwise JBoss goes nuts!

          5. Change any other hardcoded references to the DataSource you may have in you source files for instance: if you are using XDoclet tags check that you havn't set any parameters to DefaultDS or something.

          e.g. @ejb:resource_ref res-name="jdbc/MySqlDS"

          6. Recompile your code and/or restart your server aand away you go. Enjoy!

          Cheers

          Anthony

          • 2. Re: Can not bind mySQL with jboss-3.0.4
            onicom

            Hi,

            Hope this helps. I have just got MYSQL and JBOSS 3.0.2 to work beautifully together here is exacly what I did.

            1. Make a copy of mysql-service.xml and place this in the deploy directory of the server you wish to boot i.e. default.

            2. Edit this file ensuring you are using the correct driver, url connection, username and password.

            If you set the JndiName attribute to MySqlDS, for instance, make sure this carries through into your other files.

            3. If you are using a .ant.properties file (see the templates you get with the Quick Start Guide) then ensure you set the datasource.name=java:/MySqlDS (i.e. this is the same as teh JndiName attribute you set in the mysql-service.xml file)

            4. Check the type.mapping attribute and set this to mySQL otherwise JBoss goes nuts!

            5. Change any other hardcoded references to the DataSource you may have in you source files for instance: if you are using XDoclet tags check that you havn't set any parameters to DefaultDS or something.

            e.g. @ejb:resource_ref res-name="jdbc/MySqlDS"

            6. Recompile your code and/or restart your server aand away you go. Enjoy!

            Cheers

            Anthony

            • 3. Re: Can not bind mySQL with jboss-3.0.4
              onicom

              Trying to post a reply to this message. Will try again later..

              Anthony