1 Reply Latest reply on May 28, 2015 12:35 PM by Maciej Swiderski

    Jbpm 6.2 with Oracle persistence

    Manvendra Prasad Newbie

      I am trying to write Java jbpm program to use Oracle as persistence. I have created all the required tables in oracle I am able to access them using Datasource, but during test I am getting below error.

      I am attaching Java Program as well as persistence.xml file.

      Can some body help me on this? Urgent.

       

      NFO: HHH000228: Running hbm2ddl schema update

      May 28, 2015 2:03:17 PM org.hibernate.tool.hbm2ddl.SchemaUpdate execute

      INFO: HHH000102: Fetching database metadata

      May 28, 2015 2:03:17 PM org.hibernate.tool.hbm2ddl.SchemaUpdate execute

      ERROR: HHH000319: Could not get database metadata

      java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist

       

       

        at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:91)

        at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:112)

        at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:173)

        at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455)

        at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:413)

        at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1030)

        at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:183)

        at oracle.jdbc.driver.T4CStatement.executeForDescribe(T4CStatement.java:774)

        at oracle.jdbc.driver.T4CStatement.executeMaybeDescribe(T4CStatement.java:849)

        at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1186)

        at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:1377)

        at oracle.jdbc.driver.OracleStatementWrapper.executeQuery(OracleStatementWrapper.java:386)

        at bitronix.tm.resource.jdbc.JdbcStatementHandle.executeQuery(JdbcStatementHandle.java:83)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

        at java.lang.reflect.Method.invoke(Unknown Source)

        at bitronix.tm.resource.jdbc.BaseProxyHandlerClass.invoke(BaseProxyHandlerClass.java:64)

        at com.sun.proxy.$Proxy3.executeQuery(Unknown Source)

        at org.hibernate.tool.hbm2ddl.DatabaseMetadata.initSequences(DatabaseMetadata.java:177)

        at org.hibernate.tool.hbm2ddl.DatabaseMetadata.<init>(DatabaseMetadata.java:91)

        at org.hibernate.tool.hbm2ddl.DatabaseMetadata.<init>(DatabaseMetadata.java:83)

        at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:221)

        at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:203)

        at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:509)

        at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1799)

        at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:96)

        at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:915)

        at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:900)

        at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:59)

        at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:63)

        at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:47)

        at com.sample.TaskPersistenceExample.createRuntimeManager(TaskPersistenceExample.java:174)

        at com.sample.TaskPersistenceExample.main(TaskPersistenceExample.java:128)

       

       

      May 28, 2015 2:03:17 PM org.hibernate.tool.hbm2ddl.SchemaUpdate execute

      ERROR: HHH000299: Could not complete schema update

      java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist

       

       

        at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:91)

        at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:112)

        at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:173)

        at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455)

        at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:413)

        at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1030)

        at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:183)

        at oracle.jdbc.driver.T4CStatement.executeForDescribe(T4CStatement.java:774)

        at oracle.jdbc.driver.T4CStatement.executeMaybeDescribe(T4CStatement.java:849)

        at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1186)

        at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:1377)

        at oracle.jdbc.driver.OracleStatementWrapper.executeQuery(OracleStatementWrapper.java:386)

        at bitronix.tm.resource.jdbc.JdbcStatementHandle.executeQuery(JdbcStatementHandle.java:83)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

        at java.lang.reflect.Method.invoke(Unknown Source)

        at bitronix.tm.resource.jdbc.BaseProxyHandlerClass.invoke(BaseProxyHandlerClass.java:64)

        at com.sun.proxy.$Proxy3.executeQuery(Unknown Source)

        at org.hibernate.tool.hbm2ddl.DatabaseMetadata.initSequences(DatabaseMetadata.java:177)

        at org.hibernate.tool.hbm2ddl.DatabaseMetadata.<init>(DatabaseMetadata.java:91)

        at org.hibernate.tool.hbm2ddl.DatabaseMetadata.<init>(DatabaseMetadata.java:83)

        at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:221)

        at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:203)

        at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:509)

        at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1799)

        at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:96)

        at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:915)

        at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:900)

        at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:59)

        at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:63)

        at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:47)

        at com.sample.TaskPersistenceExample.createRuntimeManager(TaskPersistenceExample.java:174)

        at com.sample.TaskPersistenceExample.main(TaskPersistenceExample.java:128)

       

       

      SLF4J: Failed to load class "org.slf4j.impl.StaticMDCBinder".

      SLF4J: Defaulting to no-operation MDCAdapter implementation.

      SLF4J: See http://www.slf4j.org/codes.html#no_static_mdc_binder for further details.

      May 28, 2015 2:03:21 PM org.hibernate.engine.jdbc.spi.SqlExceptionHelper logExceptions

      WARN: SQL Error: 0, SQLState: null

      May 28, 2015 2:03:21 PM org.hibernate.engine.jdbc.spi.SqlExceptionHelper logExceptions

      ERROR: unable to get a connection from pool of a PoolingDataSource containing an XAPool of resource jdbc/jbpm-ds with 1 connection(s) (1 still available) -failed-

      java.lang.RuntimeException: Unable to commit transaction

        at org.drools.persistence.jta.JtaTransactionManager.commit(JtaTransactionManager.java:229)

        at org.jbpm.services.task.persistence.TaskTransactionInterceptor.execute(TaskTransactionInterceptor.java:56)

        at org.drools.core.command.impl.AbstractInterceptor.executeNext(AbstractInterceptor.java:41)

        at org.drools.persistence.jta.TransactionLockInterceptor.execute(TransactionLockInterceptor.java:79)

        at org.jbpm.services.task.commands.TaskCommandExecutorImpl.execute(TaskCommandExecutorImpl.java:40)

        at org.jbpm.services.task.impl.TaskDeadlinesServiceImpl.initialize(TaskDeadlinesServiceImpl.java:367)

        at org.jbpm.services.task.HumanTaskConfigurator.getTaskService(HumanTaskConfigurator.java:155)

        at org.jbpm.runtime.manager.impl.factory.LocalTaskServiceFactory.newTaskService(LocalTaskServiceFactory.java:60)

        at org.jbpm.runtime.manager.impl.SingletonRuntimeManager.init(SingletonRuntimeManager.java:85)

        at org.jbpm.runtime.manager.impl.RuntimeManagerFactoryImpl.newSingletonRuntimeManager(RuntimeManagerFactoryImpl.java:64)

        at org.jbpm.runtime.manager.impl.RuntimeManagerFactoryImpl.newSingletonRuntimeManager(RuntimeManagerFactoryImpl.java:55)

        at com.sample.TaskPersistenceExample.createRuntimeManager(TaskPersistenceExample.java:183)

        at com.sample.TaskPersistenceExample.main(TaskPersistenceExample.java:128)

      Caused by: bitronix.tm.internal.BitronixRollbackException: transaction was marked as rollback only and has been rolled back

        at bitronix.tm.BitronixTransaction.commit(BitronixTransaction.java:265)

        at bitronix.tm.BitronixTransactionManager.commit(BitronixTransactionManager.java:143)

        at org.drools.persistence.jta.JtaTransactionManager.commit(JtaTransactionManager.java:226)

        ... 12 more