2 Replies Latest reply on Apr 14, 2016 8:48 AM by Abhijit Humbe

    Trying to use MySQL Database instead of H2 to retrieve Process Info [in AS7]--jbpm-console NOT being deployed

    Tajiri Ujasiri Newbie

      Greetings All,

       

      This has been a very frustrating few days trying to get this to work.  In trying to get failed processes restarted, I was not able to retrieve process instance information from the H2 tables which hold the data.  I've decided to use another DBMS to which I have access to--MySQL.


      I've configured my package to use a MySQL database instead of the default in-memory database to record process info data.  I've followed a few examples to get the point where I am now.  The main documentation I'm using is


      https://zorq.net/b/2011/07/12/adding-a-mysql-datasource-to-jboss-as-7/#comments

      +         

      https://developer.jboss.org/wiki/DataSourceConfigurationinAS7#Installing_a_JDBC_driver_as_a_deploymentI


      I have

       

      1.) Downloaded the MySQL driver from dev.mysql.com, and realized after DAYS of trying to get it to work that it was JDBC-4 compliant and it had to be manipulated in order for it to work

      2.)  Installed the driver as a module by creating the module file in jboss<release>/modules/com/mysql/main:

       

           <module xmlns="urn:jboss:module:1.0" name="com.mysql">

                   <resources>

                          <resource-root path="mysql-connector-java-5.1.35-bin_COMPLIANT.jar"/>

                   </resources>

                   <dependencies>

                           <module name="javax.api"/>

                           <module name="javax.transaction.api"/>

                    </dependencies>

           </module>

       

       

      3.) Defined the datasource in the standalone configuration jboss<release>/standalone/configuration/standalone-full.xml:

       

             <datasources>

                      <datasource jta="true" jndi-name="java:jboss/datasources/jbpmDS" pool-name="jbpmDS" enabled="true" use-java-context="true" use-ccm="true">

                          <connection-url>jdbc:mysql://localhost:3306/jbpm6</connection-url>

                          <driver>mysql</driver>

                          <security>

                              <user-name>root</user-name>

                              <password>pass</password>

                          </security>

                      </datasource>

                      <drivers>

                          <driver name="mysql" module="com.mysql">

                              <driver-class>com.mysql.jdbc.Driver</driver-class>

                              <xa-datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</xa-datasource-class>

                          </driver>

                      </drivers>

                  </datasources>

       

       

      5.) The JBPM DB has also been created with the scripts provided in jbpm-installer/db/ddl-scripts/mysql.  All of the persistence tables seem to be there.

       

      I'm launching AS7 with  . jboss<release>/bin/standalone.sh --server-config=standalone-full.xml&

       

      This installation has not been successful and I think this (recurring) exception is preventing my jbpm-console from being launched:

       

      11:52:46,592 ERROR [org.hibernate.tool.hbm2ddl.SchemaUpdate] (MSC service thread 1-12) HHH000319: Could not get database metadata: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown table 'sequences' in information_schema

              at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [rt.jar:1.7.0_60]

              at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) [rt.jar:1.7.0_60]

              at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [rt.jar:1.7.0_60]

              at java.lang.reflect.Constructor.newInstance(Constructor.java:526) [rt.jar:1.7.0_60]

              at com.mysql.jdbc.Util.handleNewInstance(Util.java:389)

              at com.mysql.jdbc.Util.getInstance(Util.java:372)

              at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:980)

              at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3835)

              at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3771)

              at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2435)

              at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2582)

              at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2531)

              at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2489)

              at com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1446)

              at org.jboss.jca.adapters.jdbc.WrappedStatement.executeQuery(WrappedStatement.java:340)

              at org.hibernate.tool.hbm2ddl.DatabaseMetadata.initSequences(DatabaseMetadata.java:149) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]

              at org.hibernate.tool.hbm2ddl.DatabaseMetadata.<init>(DatabaseMetadata.java:70) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]

              at org.hibernate.tool.hbm2ddl.DatabaseMetadata.<init>(DatabaseMetadata.java:63) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]

              at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:196) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]

              at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:178) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]

              at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:457) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]

              at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1737) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]

              at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:84) [hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final]

              at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:904) [hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final]

              at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:889) [hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final]

              at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:73) [hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final]

              at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.createContainerEntityManagerFactory(PersistenceUnitServiceImpl.java:162) [jboss-as-jpa-7.1.1.Final.jar:7.1.1.Final]

              at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.start(PersistenceUnitServiceImpl.java:85) [jboss-as-jpa-7.1.1.Final.jar:7.1.1.Final]

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)

              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_60]

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_60]

              at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_60]

       

       

      My server.log (snippet) is attached.