6 Replies Latest reply on Nov 5, 2003 2:56 PM by gerardg

    mySQL Incomplete Deployment

    gerardg Newbie

      Hello,
      I have installed JBoss 3.2.2 on RH9 using Sun Java 1.4.2-b28, and started it with the builtin Hypersonic DB and it works fine. I have mySQL installed and I can connect to it fine, create a database and uids.
      I have attempted to get JBoss to use mySQL and I'm struggling with no success.

      To setup JBoss I :
      Copied docs/examples/jca/mysql-ds.xml to server/default/deploy/mysql-ds.xml and modified the host, db, uid and pw
      Removed server/default/deploy/hsqldb-ds.xml
      Modified server/default/conf/standardjbosscmp-jdbc.xml and server/default/conf/standardjaws.xml to reflect this:
      java:/DefaultDS
      <type-mapping>mySQL</type-mapping>

      The rather lengthy log excerpt is below. Can anybody offer a suggestion please? Thanks in advance.

      Gerard

      LOG EXCERPT ---------------------------------------
      The only error to occur in the log is a caught exception:
      2003-10-28 16:59:46,258 ERROR [org.jboss.deployment.scanner.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.mq:service=InvocationLayer,type=HTTP
      state: CONFIGURED
      I Depend On: jboss.mq:service=Invoker
      jboss.web:service=WebServer

      Depends On Me: , ObjectName: jboss.mq.destination:service=Topic,name=testTopic
      state: CONFIGURED
      I Depend On: jboss.mq:service=DestinationManager
      jboss.mq:service=SecurityManager

      Depends On Me: , ObjectName: jboss.mq.destination:service=Topic,name=securedTopic
      state: CONFIGURED
      I Depend On: jboss.mq:service=DestinationManager
      jboss.mq:service=SecurityManager

      Depends On Me: , ObjectName: jboss.mq.destination:service=Topic,name=testDurableTopic
      state: CONFIGURED
      I Depend On: jboss.mq:service=DestinationManager
      jboss.mq:service=SecurityManager

      Depends On Me: , ObjectName: jboss.mq.destination:service=Queue,name=testQueue
      state: CONFIGURED
      I Depend On: jboss.mq:service=DestinationManager
      jboss.mq:service=SecurityManager

      Depends On Me: , ObjectName: jboss.mq.destination:service=Queue,name=A
      state: CONFIGURED
      I Depend On: jboss.mq:service=DestinationManager

      Depends On Me: , ObjectName: jboss.mq.destination:service=Queue,name=B
      state: CONFIGURED
      I Depend On: jboss.mq:service=DestinationManager

      Depends On Me: , ObjectName: jboss.mq.destination:service=Queue,name=C
      state: CONFIGURED
      I Depend On: jboss.mq:service=DestinationManager

      Depends On Me: , ObjectName: jboss.mq.destination:service=Queue,name=D
      state: CONFIGURED
      I Depend On: jboss.mq:service=DestinationManager

      Depends On Me: , ObjectName: jboss.mq.destination:service=Queue,name=ex
      state: CONFIGURED
      I Depend On: jboss.mq:service=DestinationManager

      Depends On Me: , ObjectName: jboss.mq:service=DestinationManager
      state: CONFIGURED
      I Depend On: jboss.mq:service=MessageCache
      jboss.mq:service=PersistenceManager
      jboss.mq:service=StateManager

      Depends On Me: jboss.mq.destination:service=Topic,name=testTopic
      jboss.mq.destination:service=Topic,name=securedTopic
      jboss.mq.destination:service=Topic,name=testDurableTopic
      jboss.mq.destination:service=Queue,name=testQueue
      jboss.mq.destination:service=Queue,name=A
      jboss.mq.destination:service=Queue,name=B
      jboss.mq.destination:service=Queue,name=C
      jboss.mq.destination:service=Queue,name=D
      jboss.mq.destination:service=Queue,name=ex
      jboss.mq:service=SecurityManager
      jboss.mq.destination:service=Queue,name=DLQ
      , ObjectName: jboss.mq:service=PersistenceManager
      state: CONFIGURED
      I Depend On: jboss.jca:service=LocalTxCM,name=DefaultDS

      Depends On Me: jboss.mq:service=DestinationManager
      , ObjectName: jboss.mq:service=InvocationLayer,type=UIL2
      state: CONFIGURED
      I Depend On: jboss.mq:service=Invoker

      Depends On Me: , ObjectName: jboss.mq:service=InvocationLayer,type=OIL
      state: CONFIGURED
      I Depend On: jboss.mq:service=Invoker

      Depends On Me: , ObjectName: jboss.mq:service=Invoker
      state: CONFIGURED
      I Depend On: jboss.mq:service=TracingInterceptor

      Depends On Me: jboss.mq:service=InvocationLayer,type=HTTP
      jboss.mq:service=InvocationLayer,type=UIL2
      jboss.mq:service=InvocationLayer,type=OIL
      jboss.mq:service=InvocationLayer,type=RMI
      jboss.mq:service=InvocationLayer,type=OIL2
      jboss.mq:service=InvocationLayer,type=JVM
      , ObjectName: jboss.mq:service=TracingInterceptor
      state: CONFIGURED
      I Depend On: jboss.mq:service=SecurityManager

      Depends On Me: jboss.mq:service=Invoker
      , ObjectName: jboss.mq:service=SecurityManager
      state: CONFIGURED
      I Depend On: jboss.mq:service=DestinationManager

      Depends On Me: jboss.mq.destination:service=Topic,name=testTopic
      jboss.mq.destination:service=Topic,name=securedTopic
      jboss.mq.destination:service=Topic,name=testDurableTopic
      jboss.mq.destination:service=Queue,name=testQueue
      jboss.mq:service=TracingInterceptor
      jboss.mq.destination:service=Queue,name=DLQ
      , ObjectName: jboss.mq.destination:service=Queue,name=DLQ
      state: CONFIGURED
      I Depend On: jboss.mq:service=DestinationManager
      jboss.mq:service=SecurityManager

      Depends On Me: , ObjectName: jboss.mq:service=InvocationLayer,type=RMI
      state: CONFIGURED
      I Depend On: jboss.mq:service=Invoker

      Depends On Me: , ObjectName: jboss.mq:service=InvocationLayer,type=OIL2
      state: CONFIGURED
      I Depend On: jboss.mq:service=Invoker

      Depends On Me: , ObjectName: jboss.mq:service=InvocationLayer,type=JVM
      state: CONFIGURED
      I Depend On: jboss.mq:service=Invoker

      Depends On Me: ]

        • 1. Re: mySQL Incomplete Deployment
          Jochen Cordes Novice

          Hi !

          I'm using mySQL as the persistence manager and that's exactly what you're missing. Have a look at the jms folder in your deploy directory. There should be a file named hsqldb-jdbc2-service.xml. You have to apply the following changes for mySQL (just copy'n'paste ;-)):


          <!-- <depends optional-attribute-name="MessageCache">jboss.mq:service=MessageCache -->
          <depends optional-attribute-name="ConnectionManager">jboss.jca:service=LocalTxCM,name=DefaultDS

          BLOB_TYPE=BLOB
          INSERT_TX = INSERT INTO JMS_TRANSACTIONS (TXID) values(?)
          INSERT_MESSAGE = INSERT INTO JMS_MESSAGES (MESSAGEID, DESTINATION, MESSAGEBLOB, TXID, TXOP) VALUES(?,?,?,?,?)
          SELECT_ALL_UNCOMMITED_TXS = SELECT TXID FROM JMS_TRANSACTIONS
          SELECT_MAX_TX = SELECT MAX(TXID) FROM JMS_MESSAGES
          SELECT_MESSAGES_IN_DEST = SELECT MESSAGEID, MESSAGEBLOB FROM JMS_MESSAGES WHERE DESTINATION=?
          SELECT_MESSAGE = SELECT MESSAGEID, MESSAGEBLOB FROM JMS_MESSAGES WHERE MESSAGEID=? AND DESTINATION=?
          MARK_MESSAGE = UPDATE JMS_MESSAGES SET TXID = ?, TXOP = ? WHERE MESSAGEID=? AND DESTINATION=?
          UPDATE_MESSAGE = UPDATE JMS_MESSAGES SET MESSAGEBLOB=? WHERE MESSAGEID=? AND DESTINATION=?
          UPDATE_MARKED_MESSAGES = UPDATE JMS_MESSAGES SET TXID=?, TXOP=? WHERE TXOP=?
          UPDATE_MARKED_MESSAGES_WITH_TX = UPDATE JMS_MESSAGES SET TXID=?, TXOP=? WHERE TXOP=? AND TXID=?
          DELETE_ALL_MESSAGE_WITH_TX = DELETE FROM JMS_MESSAGES WHERE TXID=?
          DELETE_TX = DELETE FROM JMS_TRANSACTIONS WHERE TXID = ?
          DELETE_MARKED_MESSAGES = DELETE FROM JMS_MESSAGES WHERE TXID=? AND TXOP=?
          DELETE_MARKED_MESSAGES_WITH_TX = DELETE FROM JMS_MESSAGES USING JMS_MESSAGES AS M, JMS_TRANSACTIONS AS T WHERE M.TXID=T.TXID AND M.TXOP=?
          DELETE_MESSAGE = DELETE FROM JMS_MESSAGES WHERE MESSAGEID=? AND DESTINATION=?
          CREATE_MESSAGE_TABLE = CREATE TABLE JMS_MESSAGES ( MESSAGEID INTEGER NOT NULL, \
          DESTINATION VARCHAR(50) NOT NULL, TXID INTEGER, TXOP CHAR(1), \
          MESSAGEBLOB BLOB, PRIMARY KEY (MESSAGEID, DESTINATION) )
          CREATE_TX_TABLE = CREATE TABLE JMS_TRANSACTIONS ( TXID INTEGER )




          HTH,

          Jochen.

          • 2. Re: mySQL Incomplete Deployment
            gerardg Newbie

            Thank you Jochen, that changed things some. I received an error after making the change that was the result of the data source setup name I used was MySqlDS. I fixed that and now I get the following error:

            10:40:51,754 INFO [DefaultDS] Bound connection factory for resource adapter for ConnectionManager 'jboss.jca:service=LocalTxCM,name=DefaultDS to JNDI name 'java:/DefaultDS'
            10:40:51,755 INFO [TxConnectionManager] Started jboss.jca:service=LocalTxCM,name=DefaultDS
            10:40:52,322 WARN [JBossManagedConnectionPool] Throwable while attempting to get a new connection:
            org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (java.sql.SQLException: Server configuration denies access to data source)
            ...

            Forgive my ignorance, does this mean I have permission problems with accessing MySql?

            Thanks in advance!

            • 3. Re: mySQL Incomplete Deployment
              martin_kersten Newbie

              Just take a look at jboss/docs/examples/jms there you will find a mysql-jdbc2-service.xml file. Copy this to deploy/jms and remove the old hypersonic service file. (dont forget to check the name of the db source defined within the xml file)

              Your new exeption looks like you are missconfigured the server properties of the database, username or password jboss uses to log in.

              • 4. Re: mySQL Incomplete Deployment
                Kevin J Citron Newbie

                When using the SQL that you have supplied. I receive an SQL syntax error
                from this line
                DELETE_MARKED_MESSAGES_WITH_TX = DELETE FROM JMS_MESSAGES USING JMS_MESSAGES AS M, JMS_TRANSACTIONS AS T WHERE M.TXID=T.TXID AND M.TXOP=?

                Which version of MySQL are you using. I'm currently running
                3.2.53.

                Thanks in advance.

                • 5. Re: mySQL Incomplete Deployment
                  Jochen Cordes Novice

                  The SQL above applies to MySQL 4.x (never tried it with 3.2.x :-(). Maybe the version provided in docs/examples/mysql-jdbc-service.xml that comes with JBoss 3.2.2 will work for you.

                  HTH,

                  Jochen.

                  • 6. Re: mySQL Incomplete Deployment
                    gerardg Newbie

                    I have made the change as described above. I have turned logging on on mysql and receive no log messages when attempting to connect. I continue to get the following error, is there any Java grant stuff I need to setup in JBoss? THanks in advance.

                    Gerard

                    2003-11-05 13:32:21,303 INFO [org.jboss.resource.connectionmanager.TxConnectionManager] Started jboss.jca:service=LocalTxCM,name=DefaultDS
                    2003-11-05 13:32:21,641 WARN [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] Throwable while attempting to get a new connection:
                    org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (java.sql.SQLException: Server configuration denies access to data source)
                    at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:160)
                    at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:451)
                    at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:212)
                    at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:496)
                    at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:425)
                    at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:318)
                    at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:477)
                    at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:814)