1 Reply Latest reply on Nov 13, 2006 4:43 PM by John

    Connecting Booking demo to MySQL

    John Newbie

      I've done this with jboss-4.0.4RC1, but I can't get it to work with 4.0.5GA. I get the following exception:

      14:37:01,354 INFO [EARDeployer] Started J2EE application: file:/C:/jboss-4.0.5.GA/server/default/deploy/workforce-planning.ear
      14:37:01,364 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
      
      --- MBeans waiting for other MBeans ---
      ObjectName: persistence.units:ear=workforce-planning.ear,jar=workforce-planning.jar,unitName=workforceDatabase
       State: NOTYETINSTALLED
       I Depend On:
       jboss.jca:name=workforceDatasource,service=DataSourceBinding
      
      ObjectName: persistence.units:ear=workforce-planning.ear,jar=workforce-planning.jar,unitName=workforceDatabase
       State: NOTYETINSTALLED
       I Depend On:
       jboss.jca:name=workforceDatasource,service=DataSourceBinding
      
      ObjectName: persistence.units:ear=workforce-planning.ear,jar=workforce-planning.jar,unitName=workforceDatabase
       State: NOTYETINSTALLED
       I Depend On:
       jboss.jca:name=workforceDatasource,service=DataSourceBinding
       Depends On Me:
       jboss.j2ee:ear=workforce-planning.ear,jar=workforce-planning.jar,name=BookingListAction,service=EJB3
       jboss.j2ee:ear=workforce-planning.ear,jar=workforce-planning.jar,name=ChangePasswordAction,service=EJB3
       jboss.j2ee:ear=workforce-planning.ear,jar=workforce-planning.jar,name=HotelBookingAction,service=EJB3
       jboss.j2ee:ear=workforce-planning.ear,jar=workforce-planning.jar,name=HotelSearchingAction,service=EJB3
       jboss.j2ee:ear=workforce-planning.ear,jar=workforce-planning.jar,name=LoginAction,service=EJB3
       jboss.j2ee:ear=workforce-planning.ear,jar=workforce-planning.jar,name=RegisterAction,service=EJB3
      
      ObjectName: jboss.j2ee:ear=workforce-planning.ear,jar=workforce-planning.jar,name=BookingListAction,service=EJB3
       State: NOTYETINSTALLED
       I Depend On:
       persistence.units:ear=workforce-planning.ear,jar=workforce-planning.jar,unitName=workforceDatabase
      
      ObjectName: jboss.j2ee:ear=workforce-planning.ear,jar=workforce-planning.jar,name=ChangePasswordAction,service=EJB3
       State: NOTYETINSTALLED
       I Depend On:
       persistence.units:ear=workforce-planning.ear,jar=workforce-planning.jar,unitName=workforceDatabase
      
      ObjectName: jboss.j2ee:ear=workforce-planning.ear,jar=workforce-planning.jar,name=HotelBookingAction,service=EJB3
       State: NOTYETINSTALLED
       I Depend On:
       persistence.units:ear=workforce-planning.ear,jar=workforce-planning.jar,unitName=workforceDatabase
      
      ObjectName: jboss.j2ee:ear=workforce-planning.ear,jar=workforce-planning.jar,name=HotelSearchingAction,service=EJB3
       State: NOTYETINSTALLED
       I Depend On:
       persistence.units:ear=workforce-planning.ear,jar=workforce-planning.jar,unitName=workforceDatabase
      
      ObjectName: jboss.j2ee:ear=workforce-planning.ear,jar=workforce-planning.jar,name=LoginAction,service=EJB3
       State: NOTYETINSTALLED
       I Depend On:
       persistence.units:ear=workforce-planning.ear,jar=workforce-planning.jar,unitName=workforceDatabase
      
      ObjectName: jboss.j2ee:ear=workforce-planning.ear,jar=workforce-planning.jar,name=RegisterAction,service=EJB3
       State: NOTYETINSTALLED
       I Depend On:
       persistence.units:ear=workforce-planning.ear,jar=workforce-planning.jar,unitName=workforceDatabase
      
      --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
      ObjectName: jboss.jca:name=workforceDatasource,service=DataSourceBinding
       State: NOTYETINSTALLED
       Depends On Me:
       persistence.units:ear=workforce-planning.ear,jar=workforce-planning.jar,unitName=workforceDatabase
       persistence.units:ear=workforce-planning.ear,jar=workforce-planning.jar,unitName=workforceDatabase
       persistence.units:ear=workforce-planning.ear,jar=workforce-planning.jar,unitName=workforceDatabase


      persistence.xml:
      <persistence>
       <persistence-unit name="workforceDatabase">
       <provider>org.hibernate.ejb.HibernatePersistence</provider>
       <jta-data-source>java:/workforceDatasource</jta-data-source>
       <properties>
       <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/>
       <property name="hibernate.case.user_query_cache" value="true"/>
       <property name="hibernate.show_sql" value="true"/>
       <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
       <property name="hibernate.connection.datasource" value="java:/workforceDatasource"/>
       </properties>
       </persistence-unit>
      </persistence>

      jboss-beans.xml:
      <?xml version="1.0" encoding="UTF-8"?>
      
      <deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="urn:jboss:bean-deployer bean-deployer_1_0.xsd"
       xmlns="urn:jboss:bean-deployer">
      
       <bean name="workforceDatasourceBootstrap" class="org.jboss.resource.adapter.jdbc.local.LocalTxDataSource">
       <property name="driverClass">org.mysql.jdbc.Driver</property>
       <property name="connectionURL">jdbc:mysql://localhost:3306/workforce</property>
       <property name="userName">root</property>
       <property name="jndiName">java:/workforceDatasource</property>
       <property name="minSize">0</property>
       <property name="maxSize">10</property>
       <property name="blockingTimeout">1000</property>
       <property name="idleTimeout">100000</property>
       <property name="transactionManager"><inject bean="TransactionManager"/></property>
       <property name="cachedConnectionManager"><inject bean="CachedConnectionManager"/></property>
       <property name="initialContextProperties"><inject bean="InitialContextProperties"/></property>
       </bean>
      
       <bean name="workforceDatasource" class="java.lang.Object">
       <constructor factoryMethod="getDatasource">
       <factory bean="workforceDatasourceBootstrap"/>
       </constructor>
       </bean>
      
      </deployment>

      workforce-ds.xml:
      <datasources>
       <local-tx-datasource>
       <jndi-name>workforceDatasource</jndi-name>
       <connection-url>jdbc:mysql://localhost:3306/workforce</connection-url>
       <driver-class>com.mysql.jdbc.Driver</driver-class>
       <user-name>root</user-name>
       <password>mypass</password>
       </local-tx-datasource>
      </datasources>


      I copied mysql-connector-java-3.1.11-bin.jar to server/default/lib. Any ideas?

      John