1 Reply Latest reply on Feb 28, 2006 6:44 AM by jochen.seifarth

    Problem with running JBoss builtin CMP

      Hi my name is Bromo, newbee in JBoss application server environment.
      I'm learning CMP in JBoss, my database is MySql and my IDE is JBuilder 2006

      Before I start coding my first CMP application, I wanna make sure that
      JBoss built in CMP can running well on my MySql DB ... I set some necessary
      xml files following your JBoss 4.0 documentation, those are:

      - C:\jboss-4.0.1sp1\server\devcon\deploy\mysql-ds.xml
      - C:\jboss-4.0.1sp1\server\devcon\deploy\jms\mysql-jdbc2-service.xml
      - jbosscmp-jdbc.xml

      But when I restart the JBoss server, during starting, I found 3 blocks of
      error in Command line window, those are:

      Error 01:
      ================================================================================

      17:43:53,328 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
      Incompletely deployed packages:
      org.jboss.deployment.DeploymentInfo@c24b68fc { url=file:/C:/jboss-4.0.1sp1/serve
      r/devcon/deploy/jms/mysql-jdbc2-service.xml }
      deployer: org.jboss.deployment.SARDeployer@c39a20
      status: Deployment FAILED reason: Trying to install an already registered mbea
      n: jboss.mq:service=DestinationManager
      state: FAILED
      watch: file:/C:/jboss-4.0.1sp1/server/devcon/deploy/jms/mysql-jdbc2-service.xm
      l
      altDD: null
      lastDeployed: 1141037020281
      lastModified: 1141037020265
      mbeans:

      ===============================================================================

      Error 02:
      =================================================================================

      ObjectName: jboss.mq:service=PersistenceManager
      state: FAILED
      I Depend On: jboss.jca:service=DataSourceBinding,name=DefaultDS

      Depends On Me: jboss.mq:service=DestinationManager
      org.jboss.mq.SpyJMSException: Could not resolve uncommited transactions. Messag
      e recovery may not be accurate; - nested throwable: (java.sql.SQLException: Gene
      ral error, message from server: "Table 'testingentity.jms_messages' doesn't exi
      st")

      ================================================

      Error 03:
      ================================================

      MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM:
      ObjectName: jboss.mq:service=PersistenceManager
      state: FAILED
      I Depend On: jboss.jca:service=DataSourceBinding,name=DefaultDS

      Depends On Me: jboss.mq:service=DestinationManager
      org.jboss.mq.SpyJMSException: Could not resolve uncommited transactions. Messag
      e recovery may not be accurate; - nested throwable: (java.sql.SQLException: Gene
      ral error, message from server: "Table 'testingentity.jms_messages' doesn't exi
      st")

      ================================================

      Can anybody please help me ........?????? how should I make the JBoss built in
      CMP works for my application?????

        • 1. Re: Problem with running JBoss builtin CMP
          jochen.seifarth

          Deploy your MySQL database as C:\jboss-4.0.1sp1\server\devcon\deploy\mysql-ds.xml (as you did)

          Leave C:\jboss-4.0.1sp1\server\devcon\deploy\jms\mysql-jdbc2-service.xml ALONE !!!! This is for JMS not CMP

          Either list you MySQL database as the default in jbosscmp-jdbc.xml (as you did), or specify it explicity in your persistence.xml like this:

          <persistence>
           <persistence-unit name="jsEntities">
           <provider>org.hibernate.ejb.HibernatePersistence</provider>
           <jta-data-source>java:/bookingDatasource</jta-data-source>
           <properties>
           <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/>
           <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup"/>
           <property name="hibernate.transaction.flush_before_completion" value="true"/>
           <property name="hibernate.hbm2ddl.auto" value="update"/>
           <property name="hibernate.show_sql" value="true"/>
           </properties>
           </persistence-unit>
          </persistence>


          Obviously the <jta-data-source> name has to match the JNDI name used in mysql-ds.xml

          Hope this helps