4 Replies Latest reply on Jun 28, 2010 5:04 AM by rsoika

    unable to setup mysql database on JBoss 5.1.0GA

    rsoika

      Hi,

      I need some help to setup a mysql database.

      I followed this wiki

      http://community.jboss.org/wiki/SetUpAMySQLDatasource

       

      So after configuration I see in the JBoss Web console now two "Local Tx Datasources"

      The DefaultDS and a new one named "jdbc/workflow-db"

      The DefaultDS shows the Status "UP" but my new datasource shows the status "DOWN"

       

      In the log file I got error messages like this:

       

      10:53:51,772 ERROR [InventoryManager] Call to getAvailablity() on ResourceComponent for Resource[id=-9, type=Local Tx Datasource, key=DataSource:LocalTx:jdbc/workflow-db, name=jdbc/workflow-db, parent=JBoss AS 5 (imixs), version=?] failed.
      java.lang.IllegalStateException: Failed to find [ComponentType{type=DataSource, subtype=LocalTx}] ManagedComponent named [jdbc/workflow-db].
          at org.rhq.plugins.jbossas5.ManagedComponentComponent.getManagedComponent(ManagedComponentComponent.java:340)

       

      I am using mysql-connector-java-5.1.7-bin.jar and my database is up and running.

      I checked everything more than once.

       

      My mysql-ds.xml file looks like this.

       

      <?xml version="1.0" encoding="UTF-8"?>
      <datasources>
        <local-tx-datasource>
          <jndi-name>jdbc/workflow-db</jndi-name>
          <connection-url>jdbc:mysql://localhost:3306/jboss_test</connection-url>
          <driver-class>com.mysql.jdbc.Driver</driver-class>
          <user-name>xxx</user-name>
          <password>yyy</password>
          <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter</exception-sorter-class-name>
          <metadata>
             <type-mapping>mySQL</type-mapping>
          </metadata>
        </local-tx-datasource>
      </datasources>

       

      Can any body give me a hint what I did wrong?

      Thanks for any help

       

      Ralph