Vimal Kansal [
https://community.jboss.org/people/vimalkansal] created the discussion
"AS 7.1.2, JBPM 5.3 persistence : Getting Large Objects may not be used in
auto-commit mode exception"
To view the discussion, visit:
https://community.jboss.org/message/738264#738264
--------------------------------------------------------------
Hi,
I am using jBPM 5.3 as embedded engine in JEE6 web application and have configured the
persistence. The application deploys and I can see jbpm tables getting created in the
database. My sample code for executing the workflow is :
//@Stateless
@Named("workFlow")
public class WorkflowManager {
@Inject @Knowledge //@Knowledge is the user defined CDI qualifier.
private KnowledgeBase kbase;
@Inject
@JBPMPeristenceFactory // my own CDI Qualifier, for typesafe Injection of
EntityManagerFactory
private EntityManagerFactory emf;
public void startWorkFlow(){
try {
TransactionManager tm = null;
tm = (TransactionManager)new InitialContext().lookup(
"java:jboss/TransactionManager" ); //lookup the transaction manager
Environment env = KnowledgeBaseFactory.newEnvironment();
env.set( EnvironmentName.ENTITY_MANAGER_FACTORY,emf); //set the entity
manager factory
env.set( EnvironmentName.TRANSACTION_MANAGER, tm); //set the transaction
manager
ksession.startProcess("demo.jbpmDemo");
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
When the startWorkFlow method is invoked, I get the following exception :
I am not sure why it is being executed in auto commit mode. Also I am not sure whether it
is PostGreSQL issue. Can somebody please help.
=============================================================================================
... 70 more
Caused by: javax.persistence.PersistenceException:
org.hibernate.exception.GenericJDBCException: Large Objects may not be used in auto-commit
mode.
at
org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1365)
[hibernate-entitymanager-4.1.3.ER1-redhat-1.jar:4.1.3.ER1-redhat-1]
at
org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1293)
[hibernate-entitymanager-4.1.3.ER1-redhat-1.jar:4.1.3.ER1-redhat-1]
at
org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1299)
[hibernate-entitymanager-4.1.3.ER1-redhat-1.jar:4.1.3.ER1-redhat-1]
at
org.hibernate.ejb.AbstractEntityManagerImpl$CallbackExceptionMapperImpl.mapManagedFlushFailure(AbstractEntityManagerImpl.java:1485)
[hibernate-entitymanager-4.1.3.ER1-redhat-1.jar:4.1.3.ER1-redhat-1]
at
org.hibernate.engine.transaction.synchronization.internal.SynchronizationCallbackCoordinatorImpl.beforeCompletion(SynchronizationCallbackCoordinatorImpl.java:109)
[hibernate-core-4.1.3.ER1-redhat-1.jar:4.1.3.ER1-redhat-1]
at
org.hibernate.engine.transaction.synchronization.internal.RegisteredSynchronization.beforeCompletion(RegisteredSynchronization.java:53)
[hibernate-core-4.1.3.ER1-redhat-1.jar:4.1.3.ER1-redhat-1]
at
com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.beforeCompletion(SynchronizationImple.java:76)
at
com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.beforeCompletion(TwoPhaseCoordinator.java:273)
at
com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:93)
at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:164)
at
com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1165)
... 73 more
Caused by: org.hibernate.exception.GenericJDBCException: Large Objects may not be used in
auto-commit mode.
at
org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:54)
[hibernate-core-4.1.3.ER1-redhat-1.jar:4.1.3.ER1-redhat-1]
at
org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:125)
[hibernate-core-4.1.3.ER1-redhat-1.jar:4.1.3.ER1-redhat-1]
at
org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:110)
[hibernate-core-4.1.3.ER1-redhat-1.jar:4.1.3.ER1-redhat-1]
at
org.hibernate.engine.jdbc.internal.proxy.AbstractStatementProxyHandler.continueInvocation(AbstractStatementProxyHandler.java:129)
[hibernate-core-4.1.3.ER1-redhat-1.jar:4.1.3.ER1-redhat-1]
at
org.hibernate.engine.jdbc.internal.proxy.AbstractProxyHandler.invoke(AbstractProxyHandler.java:81)
[hibernate-core-4.1.3.ER1-redhat-1.jar:4.1.3.ER1-redhat-1]
at $Proxy67.setBlob(Unknown Source) at
org.hibernate.type.descriptor.sql.BlobTypeDescriptor$3$1.doBind(BlobTypeDescriptor.java:91)
[hibernate-core-4.1.3.ER1-redhat-1.jar:4.1.3.ER1-redhat-1]
at org.hibernate.type.descriptor.sql.BasicBinder.bind(BasicBinder.java:92)
[hibernate-core-4.1.3.ER1-redhat-1.jar:4.1.3.ER1-redhat-1]
at
org.hibernate.type.AbstractStandardBasicType.nullSafeSet(AbstractStandardBasicType.java:305)
[hibernate-core-4.1.3.ER1-redhat-1.jar:4.1.3.ER1-redhat-1]
at
org.hibernate.type.AbstractStandardBasicType.nullSafeSet(AbstractStandardBasicType.java:300)
[hibernate-core-4.1.3.ER1-redhat-1.jar:4.1.3.ER1-redhat-1]
at
org.hibernate.type.AbstractSingleColumnStandardBasicType.nullSafeSet(AbstractSingleColumnStandardBasicType.java:57)
[hibernate-core-4.1.3.ER1-redhat-1.jar:4.1.3.ER1-redhat-1]
at
org.hibernate.persister.entity.AbstractEntityPersister.dehydrate(AbstractEntityPersister.java:2598)
[hibernate-core-4.1.3.ER1-redhat-1.jar:4.1.3.ER1-redhat-1]
at
org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2852)
[hibernate-core-4.1.3.ER1-redhat-1.jar:4.1.3.ER1-redhat-1]
at
org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3296)
[hibernate-core-4.1.3.ER1-redhat-1.jar:4.1.3.ER1-redhat-1]
at
org.hibernate.action.internal.EntityInsertAction.execute(EntityInsertAction.java:88)
[hibernate-core-4.1.3.ER1-redhat-1.jar:4.1.3.ER1-redhat-1]
at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:362)
[hibernate-core-4.1.3.ER1-redhat-1.jar:4.1.3.ER1-redhat-1]
at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:354)
[hibernate-core-4.1.3.ER1-redhat-1.jar:4.1.3.ER1-redhat-1]
at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:275)
[hibernate-core-4.1.3.ER1-redhat-1.jar:4.1.3.ER1-redhat-1]
at
org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:326)
[hibernate-core-4.1.3.ER1-redhat-1.jar:4.1.3.ER1-redhat-1]
at
org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:52)
[hibernate-core-4.1.3.ER1-redhat-1.jar:4.1.3.ER1-redhat-1]
at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1181)
[hibernate-core-4.1.3.ER1-redhat-1.jar:4.1.3.ER1-redhat-1]
at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:379)
[hibernate-core-4.1.3.ER1-redhat-1.jar:4.1.3.ER1-redhat-1]
at
org.hibernate.engine.transaction.synchronization.internal.SynchronizationCallbackCoordinatorImpl.beforeCompletion(SynchronizationCallbackCoordinatorImpl.java:104)
[hibernate-core-4.1.3.ER1-redhat-1.jar:4.1.3.ER1-redhat-1]
... 79 more
Caused by: org.postgresql.util.PSQLException: Large Objects may not be used in auto-commit
mode.
at
org.postgresql.largeobject.LargeObjectManager.createLO(LargeObjectManager.java:241)
at
org.postgresql.largeobject.LargeObjectManager.createLO(LargeObjectManager.java:228)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.setBlob(AbstractJdbc2Statement.java:2901)
at
org.jboss.jca.adapters.jdbc.WrappedPreparedStatement.setBlob(WrappedPreparedStatement.java:1073)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_31]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[rt.jar:1.6.0_31]
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[rt.jar:1.6.0_31]
at java.lang.reflect.Method.invoke(Method.java:597) [rt.jar:1.6.0_31]
at
org.hibernate.engine.jdbc.internal.proxy.AbstractStatementProxyHandler.continueInvocation(AbstractStatementProxyHandler.java:122)
[hibernate-core-4.1.3.ER1-redhat-1.jar:4.1.3.ER1-redhat-1]
... 98 more
===================================================================================================================================================
--------------------------------------------------------------
Reply to this message by going to Community
[
https://community.jboss.org/message/738264#738264]
Start a new discussion in jBPM at Community
[
https://community.jboss.org/choose-container!input.jspa?contentType=1&...]