[JBoss Messaging] - How to list or monitor messages in a Queue which is already under use
by Aneesh Sebastian
Aneesh Sebastian [https://community.jboss.org/people/aneeshsebastian] created the discussion
"How to list or monitor messages in a Queue which is already under use"
To view the discussion, visit: https://community.jboss.org/message/720125#720125
--------------------------------------------------------------
I have a requirement to monitor a JBoss messaging queue, where users should be able to delete posted messages dynamically. The application has a MDPOJO registered and is up and running at server start up.
My requirement is, users should be able to delete a posted message any time he wishes. I tried below proto codes :
*Option1*
public void listAllJMS_Messages()
{
try {
ObjectName objectName=new ObjectName("jboss.messaging.destination:name=XXX,service=Queue");
List ls = (List) server.invoke(objectName, "listMessages" , null, null);
List<javax.jms.Message> messages=(List<javax.jms.Message>)server.invoke(objectName, "listAllMessages" , null, null);
int count=0;
for(javax.jms.Message msg : messages) {
System.out.println((++count)+"t"+msg.getJMSMessageID());
if(msg.getJMSType() != null && msg.getJMSType().equalsIgnoreCase("Text")) {
TextMessage text = (TextMessage)msg;
System.out.println(text.getText());
}
}
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
// System.out.println((++count)+"t"+msg.getText());
}
*Option2*
public void listMsg() {
String destinationName = "queue/XXX";
Context ic = null;
ConnectionFactory cf = null;
Connection connection = null;
try {
ic = getInitialContext();
cf = (ConnectionFactory)ic.lookup("/ConnectionFactory");
Queue queue = (Queue)ic.lookup(destinationName);
connection = cf.createConnection();
Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
QueueBrowser qbrowser = session.createBrowser(queue);
Enumeration<?> qamsgs = qbrowser.getEnumeration();
while (qamsgs.hasMoreElements()){
Message msg = (Message)qamsgs.nextElement();
}
connection.start();
}
catch(Exception e)
{
System.out.println(e);
}
finally
{
if(ic != null)
{
try
{
ic.close();
}
catch(Exception e1)
{
System.out.println(e1);
}
}
}
}
In both the options,messages are getting listed in case of no message consumers at present.If have a live message consumer MDB, then list is returned as null.
I defintely need MDB consumer up and running.But still need to monitor messages.I should be able to do below :
1. List messages]
2. Delete a particular message
3. Change priority
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/720125#720125]
Start a new discussion in JBoss Messaging at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 4 months
[jBPM] - Commit transaction after each service task?
by Richard Evans
Richard Evans [https://community.jboss.org/people/r3vans] created the discussion
"Commit transaction after each service task?"
To view the discussion, visit: https://community.jboss.org/message/742450#742450
--------------------------------------------------------------
Hello there,
JBPM 5.1 on Tomcat, persistence configured in Spring
I have a number of processes, each with a series of service tasks punctuated by timers.
I would like to persist process data after every service task to be confident that it is recoverable on catastrophic failure. I find, though, that data is committed only at timers and end of process. Is it possible to take control of transactions at a more granular level to get jbpm to commit more regularly?
My config..
<bean class="org.springframework.orm.jpa.JpaTransactionManager"
id="transactionManager">
<property name="entityManagerFactory" ref="entityManagerFactory" />
</bean>
<tx:annotation-driven mode="aspectj"
transaction-manager="transactionManager" />
<bean class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"
id="entityManagerFactory">
<property name="persistenceUnitName" value="persistenceUnit" />
<property name="dataSource" ref="dataSource" />
</bean>
<bean class="org.springframework.orm.jpa.JpaTransactionManager"
id="transactionManager">
<property name="entityManagerFactory" ref="entityManagerFactory" />
</bean>
<drools:jpa-persistence>
<drools:transaction-manager ref="transactionManager" />
<drools:entity-manager-factory ref="entityManagerFactory" />
</drools:jpa-persistence>
Thanks,
Richard
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/742450#742450]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 4 months
[JBoss Web Services] - java.lang.Error: Undefined operation name <x>, when <x> was removed from interface (wsdl)
by Barry Schader
Barry Schader [https://community.jboss.org/people/barryaz1] created the discussion
"java.lang.Error: Undefined operation name <x>, when <x> was removed from interface (wsdl)"
To view the discussion, visit: https://community.jboss.org/message/742537#742537
--------------------------------------------------------------
What I did:
* Removed two completely unused methods from a class that represents a web service interface (we had a sloppy contractor who left his trash in the interface code...)
* Updated the WSDL file to remove the methods
* Committed those changes into our local SVN
* Ran a complete regression test (using Hudson, JUnit) -> PASSED
But when I attempt to run any of the *same JUnit tests* within the JBoss Dev Studio environment, I get a stack trace that begins with:
junit.framework.AssertionFailedError: Exception in constructor: testFetchProduct_PRE001_01 (java.lang.Error: Undefined operation name checkDMAS
at com.sun.xml.ws.model.JavaMethodImpl.freeze(JavaMethodImpl.java:305)
at com.sun.xml.ws.model.AbstractSEIModelImpl.freeze(AbstractSEIModelImpl.java:73)
at com.sun.xml.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:230)
at com.sun.xml.ws.client.WSServiceDelegate.addSEI(WSServiceDelegate.java:588)
at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:291)
at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:274)
at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:267)
at javax.xml.ws.Service.getPort(Service.java:92)
at com.medtronic.mes.FacadeService_Service.getFacadeServicePort(FacadeService_Service.java:50)
I seem to be unable to make eclipse (or JBDS?) *forget* about the "checkDMAS" method. There are no references to it anywhere that I can find within the JUnit code, yet *every* JUnit test case causes the same stack trace. I have 'cleaned' the project in every way that I know how -- but I will admit that my experience with eclipse (and JBDS) is weak.
Thanks in advance for any help you can provide.
Barry Schader
Phoenix, AZ
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/742537#742537]
Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 4 months
[jBPM] - Cannot view a task form in jbpm-console (5.4.0-SNAPSHOT) on EAP 6.0, PostgreSQL and Hibernate 4
by Jiri Svitak
Jiri Svitak [https://community.jboss.org/people/jsvitak] created the discussion
"Cannot view a task form in jbpm-console (5.4.0-SNAPSHOT) on EAP 6.0, PostgreSQL and Hibernate 4"
To view the discussion, visit: https://community.jboss.org/message/751316#751316
--------------------------------------------------------------
Hello,
I cannot view a task form in jbpm-console:
19:08:28,750 ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (Thread-69) Large Objects may not be used in auto-commit mode.
19:08:28,751 ERROR [stderr] (Thread-69) org.hibernate.exception.GenericJDBCException: Large Objects may not be used in auto-commit mode.
19:08:28,752 ERROR [stderr] (Thread-69) at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:54)
19:08:28,752 ERROR [stderr] (Thread-69) at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:125)
19:08:28,752 ERROR [stderr] (Thread-69) at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:110)
19:08:28,752 ERROR [stderr] (Thread-69) at org.hibernate.engine.jdbc.internal.proxy.AbstractResultSetProxyHandler.continueInvocation(AbstractResultSetProxyHandler.java:108)
19:08:28,752 ERROR [stderr] (Thread-69) at org.hibernate.engine.jdbc.internal.proxy.AbstractProxyHandler.invoke(AbstractProxyHandler.java:81)
19:08:28,752 ERROR [stderr] (Thread-69) at $Proxy136.getClob(Unknown Source)
19:08:28,753 ERROR [stderr] (Thread-69) at org.hibernate.type.descriptor.sql.ClobTypeDescriptor$4.doExtract(ClobTypeDescriptor.java:108)
19:08:28,753 ERROR [stderr] (Thread-69) at org.hibernate.type.descriptor.sql.BasicExtractor.extract(BasicExtractor.java:65)
19:08:28,753 ERROR [stderr] (Thread-69) at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:269)
19:08:28,753 ERROR [stderr] (Thread-69) at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:265)
19:08:28,753 ERROR [stderr] (Thread-69) at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:238)
19:08:28,753 ERROR [stderr] (Thread-69) at org.hibernate.type.AbstractStandardBasicType.hydrate(AbstractStandardBasicType.java:357)
19:08:28,753 ERROR [stderr] (Thread-69) at org.hibernate.persister.entity.AbstractEntityPersister.hydrate(AbstractEntityPersister.java:2704)
19:08:28,753 ERROR [stderr] (Thread-69) at org.hibernate.loader.Loader.loadFromResultSet(Loader.java:1541)
19:08:28,753 ERROR [stderr] (Thread-69) at org.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:1473)
19:08:28,754 ERROR [stderr] (Thread-69) at org.hibernate.loader.Loader.getRow(Loader.java:1373)
19:08:28,754 ERROR [stderr] (Thread-69) at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:640)
19:08:28,754 ERROR [stderr] (Thread-69) at org.hibernate.loader.Loader.doQuery(Loader.java:850)
19:08:28,754 ERROR [stderr] (Thread-69) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:289)
19:08:28,754 ERROR [stderr] (Thread-69) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259)
19:08:28,754 ERROR [stderr] (Thread-69) at org.hibernate.loader.Loader.loadCollection(Loader.java:2150)
19:08:28,754 ERROR [stderr] (Thread-69) at org.hibernate.loader.collection.CollectionLoader.initialize(CollectionLoader.java:61)
19:08:28,754 ERROR [stderr] (Thread-69) at org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:622)
19:08:28,754 ERROR [stderr] (Thread-69) at org.hibernate.event.internal.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:82)
19:08:28,754 ERROR [stderr] (Thread-69) at org.hibernate.internal.SessionImpl.initializeCollection(SessionImpl.java:1805)
19:08:28,755 ERROR [stderr] (Thread-69) at org.hibernate.collection.internal.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:379)
19:08:28,755 ERROR [stderr] (Thread-69) at org.hibernate.collection.internal.AbstractPersistentCollection.read(AbstractPersistentCollection.java:112)
19:08:28,755 ERROR [stderr] (Thread-69) at org.hibernate.collection.internal.AbstractPersistentCollection.readSize(AbstractPersistentCollection.java:137)
19:08:28,755 ERROR [stderr] (Thread-69) at org.hibernate.collection.internal.PersistentBag.size(PersistentBag.java:242)
19:08:28,755 ERROR [stderr] (Thread-69) at org.jbpm.task.utils.CollectionUtils.writeI18NTextList(CollectionUtils.java:234)
19:08:28,755 ERROR [stderr] (Thread-69) at org.jbpm.task.Task.writeExternal(Task.java:91)
19:08:28,755 ERROR [stderr] (Thread-69) at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1429)
19:08:28,755 ERROR [stderr] (Thread-69) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1398)
19:08:28,755 ERROR [stderr] (Thread-69) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
19:08:28,756 ERROR [stderr] (Thread-69) at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1346)
19:08:28,756 ERROR [stderr] (Thread-69) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1154)
19:08:28,756 ERROR [stderr] (Thread-69) at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
19:08:28,756 ERROR [stderr] (Thread-69) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
19:08:28,756 ERROR [stderr] (Thread-69) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
19:08:28,756 ERROR [stderr] (Thread-69) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
19:08:28,756 ERROR [stderr] (Thread-69) at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
19:08:28,756 ERROR [stderr] (Thread-69) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
19:08:28,756 ERROR [stderr] (Thread-69) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
19:08:28,756 ERROR [stderr] (Thread-69) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
19:08:28,757 ERROR [stderr] (Thread-69) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
19:08:28,757 ERROR [stderr] (Thread-69) at org.jbpm.task.service.hornetq.HornetQSessionWriter.write(HornetQSessionWriter.java:44)
19:08:28,757 ERROR [stderr] (Thread-69) at org.jbpm.task.service.TaskServerHandler.messageReceived(TaskServerHandler.java:134)
19:08:28,757 ERROR [stderr] (Thread-69) at org.jbpm.task.service.hornetq.HornetQTaskServerHandler.messageReceived(HornetQTaskServerHandler.java:43)
19:08:28,757 ERROR [stderr] (Thread-69) at org.jbpm.task.service.hornetq.BaseHornetQTaskServer.run(BaseHornetQTaskServer.java:104)
19:08:28,757 ERROR [stderr] (Thread-69) at java.lang.Thread.run(Thread.java:662)
19:08:28,758 ERROR [stderr] (Thread-69) Caused by: org.postgresql.util.PSQLException: Large Objects may not be used in auto-commit mode.
19:08:28,758 ERROR [stderr] (Thread-69) at org.postgresql.largeobject.LargeObjectManager.open(LargeObjectManager.java:198)
19:08:28,758 ERROR [stderr] (Thread-69) at org.postgresql.largeobject.LargeObjectManager.open(LargeObjectManager.java:170)
19:08:28,758 ERROR [stderr] (Thread-69) at org.postgresql.jdbc2.AbstractJdbc2BlobClob.(AbstractJdbc2BlobClob.java:45)
19:08:28,758 ERROR [stderr] (Thread-69) at org.postgresql.jdbc2.AbstractJdbc2Clob.(AbstractJdbc2Clob.java:23)
19:08:28,758 ERROR [stderr] (Thread-69) at org.postgresql.jdbc3.AbstractJdbc3Clob.(AbstractJdbc3Clob.java:18)
19:08:28,758 ERROR [stderr] (Thread-69) at org.postgresql.jdbc4.AbstractJdbc4Clob.(AbstractJdbc4Clob.java:18)
19:08:28,758 ERROR [stderr] (Thread-69) at org.postgresql.jdbc4.Jdbc4Clob.(Jdbc4Clob.java:16)
19:08:28,759 ERROR [stderr] (Thread-69) at org.postgresql.jdbc4.Jdbc4ResultSet.getClob(Jdbc4ResultSet.java:40)
19:08:28,759 ERROR [stderr] (Thread-69) at org.postgresql.jdbc2.AbstractJdbc2ResultSet.getClob(AbstractJdbc2ResultSet.java:393)
19:08:28,759 ERROR [stderr] (Thread-69) at org.jboss.jca.adapters.jdbc.WrappedResultSet.getClob(WrappedResultSet.java:783)
19:08:28,759 ERROR [stderr] (Thread-69) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
19:08:28,759 ERROR [stderr] (Thread-69) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
19:08:28,759 ERROR [stderr] (Thread-69) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
19:08:28,759 ERROR [stderr] (Thread-69) at java.lang.reflect.Method.invoke(Method.java:597)
19:08:28,759 ERROR [stderr] (Thread-69) at org.hibernate.engine.jdbc.internal.proxy.AbstractResultSetProxyHandler.continueInvocation(AbstractResultSetProxyHandler.java:104)
19:08:28,760 ERROR [stderr] (Thread-69) ... 46 more
19:08:28,760 ERROR [org.jbpm.task.service.TaskServerHandler] (Thread-69) Large Objects may not be used in auto-commit mode.: 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.Final-redhat-1.jar:4.1.3.Final-redhat-1]
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:125) [hibernate-core-4.1.3.Final-redhat-1.jar:4.1.3.Final-redhat-1]
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:110) [hibernate-core-4.1.3.Final-redhat-1.jar:4.1.3.Final-redhat-1]
at org.hibernate.engine.jdbc.internal.proxy.AbstractResultSetProxyHandler.continueInvocation(AbstractResultSetProxyHandler.java:108) [hibernate-core-4.1.3.Final-redhat-1.jar:4.1.3.Final-redhat-1]
at org.hibernate.engine.jdbc.internal.proxy.AbstractProxyHandler.invoke(AbstractProxyHandler.java:81) [hibernate-core-4.1.3.Final-redhat-1.jar:4.1.3.Final-redhat-1]
at $Proxy136.getClob(Unknown Source) at org.hibernate.type.descriptor.sql.ClobTypeDescriptor$4.doExtract(ClobTypeDescriptor.java:108) [hibernate-core-4.1.3.Final-redhat-1.jar:4.1.3.Final-redhat-1]
at org.hibernate.type.descriptor.sql.BasicExtractor.extract(BasicExtractor.java:65) [hibernate-core-4.1.3.Final-redhat-1.jar:4.1.3.Final-redhat-1]
at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:269) [hibernate-core-4.1.3.Final-redhat-1.jar:4.1.3.Final-redhat-1]
at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:265) [hibernate-core-4.1.3.Final-redhat-1.jar:4.1.3.Final-redhat-1]
at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:238) [hibernate-core-4.1.3.Final-redhat-1.jar:4.1.3.Final-redhat-1]
at org.hibernate.type.AbstractStandardBasicType.hydrate(AbstractStandardBasicType.java:357) [hibernate-core-4.1.3.Final-redhat-1.jar:4.1.3.Final-redhat-1]
at org.hibernate.persister.entity.AbstractEntityPersister.hydrate(AbstractEntityPersister.java:2704) [hibernate-core-4.1.3.Final-redhat-1.jar:4.1.3.Final-redhat-1]
at org.hibernate.loader.Loader.loadFromResultSet(Loader.java:1541) [hibernate-core-4.1.3.Final-redhat-1.jar:4.1.3.Final-redhat-1]
at org.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:1473) [hibernate-core-4.1.3.Final-redhat-1.jar:4.1.3.Final-redhat-1]
at org.hibernate.loader.Loader.getRow(Loader.java:1373) [hibernate-core-4.1.3.Final-redhat-1.jar:4.1.3.Final-redhat-1]
at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:640) [hibernate-core-4.1.3.Final-redhat-1.jar:4.1.3.Final-redhat-1]
at org.hibernate.loader.Loader.doQuery(Loader.java:850) [hibernate-core-4.1.3.Final-redhat-1.jar:4.1.3.Final-redhat-1]
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:289) [hibernate-core-4.1.3.Final-redhat-1.jar:4.1.3.Final-redhat-1]
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259) [hibernate-core-4.1.3.Final-redhat-1.jar:4.1.3.Final-redhat-1]
at org.hibernate.loader.Loader.loadCollection(Loader.java:2150) [hibernate-core-4.1.3.Final-redhat-1.jar:4.1.3.Final-redhat-1]
at org.hibernate.loader.collection.CollectionLoader.initialize(CollectionLoader.java:61) [hibernate-core-4.1.3.Final-redhat-1.jar:4.1.3.Final-redhat-1]
at org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:622) [hibernate-core-4.1.3.Final-redhat-1.jar:4.1.3.Final-redhat-1]
at org.hibernate.event.internal.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:82) [hibernate-core-4.1.3.Final-redhat-1.jar:4.1.3.Final-redhat-1]
at org.hibernate.internal.SessionImpl.initializeCollection(SessionImpl.java:1805) [hibernate-core-4.1.3.Final-redhat-1.jar:4.1.3.Final-redhat-1]
at org.hibernate.collection.internal.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:379) [hibernate-core-4.1.3.Final-redhat-1.jar:4.1.3.Final-redhat-1]
at org.hibernate.collection.internal.AbstractPersistentCollection.read(AbstractPersistentCollection.java:112) [hibernate-core-4.1.3.Final-redhat-1.jar:4.1.3.Final-redhat-1]
at org.hibernate.collection.internal.AbstractPersistentCollection.readSize(AbstractPersistentCollection.java:137) [hibernate-core-4.1.3.Final-redhat-1.jar:4.1.3.Final-redhat-1]
at org.hibernate.collection.internal.PersistentBag.size(PersistentBag.java:242) [hibernate-core-4.1.3.Final-redhat-1.jar:4.1.3.Final-redhat-1]
at org.jbpm.task.utils.CollectionUtils.writeI18NTextList(CollectionUtils.java:234) [jbpm-human-task-core-5.4.0-SNAPSHOT.jar:5.4.0-SNAPSHOT]
at org.jbpm.task.Task.writeExternal(Task.java:91) [jbpm-human-task-core-5.4.0-SNAPSHOT.jar:5.4.0-SNAPSHOT]
at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1429) [rt.jar:1.6.0_31]
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1398) [rt.jar:1.6.0_31]
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158) [rt.jar:1.6.0_31]
at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1346) [rt.jar:1.6.0_31]
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1154) [rt.jar:1.6.0_31]
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518) [rt.jar:1.6.0_31]
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483) [rt.jar:1.6.0_31]
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400) [rt.jar:1.6.0_31]
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158) [rt.jar:1.6.0_31]
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518) [rt.jar:1.6.0_31]
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483) [rt.jar:1.6.0_31]
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400) [rt.jar:1.6.0_31]
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158) [rt.jar:1.6.0_31]
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330) [rt.jar:1.6.0_31]
at org.jbpm.task.service.hornetq.HornetQSessionWriter.write(HornetQSessionWriter.java:44) [jbpm-human-task-hornetq-5.4.0-SNAPSHOT.jar:5.4.0-SNAPSHOT]
at org.jbpm.task.service.TaskServerHandler.messageReceived(TaskServerHandler.java:134) [jbpm-human-task-core-5.4.0-SNAPSHOT.jar:5.4.0-SNAPSHOT]
at org.jbpm.task.service.hornetq.HornetQTaskServerHandler.messageReceived(HornetQTaskServerHandler.java:43) [jbpm-human-task-hornetq-5.4.0-SNAPSHOT.jar:5.4.0-SNAPSHOT]
at org.jbpm.task.service.hornetq.BaseHornetQTaskServer.run(BaseHornetQTaskServer.java:104) [jbpm-human-task-hornetq-5.4.0-SNAPSHOT.jar:5.4.0-SNAPSHOT]
at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_31]
Caused by: org.postgresql.util.PSQLException: Large Objects may not be used in auto-commit mode.
at org.postgresql.largeobject.LargeObjectManager.open(LargeObjectManager.java:198)
at org.postgresql.largeobject.LargeObjectManager.open(LargeObjectManager.java:170)
at org.postgresql.jdbc2.AbstractJdbc2BlobClob.(AbstractJdbc2BlobClob.java:45)
at org.postgresql.jdbc2.AbstractJdbc2Clob.(AbstractJdbc2Clob.java:23)
at org.postgresql.jdbc3.AbstractJdbc3Clob.(AbstractJdbc3Clob.java:18)
at org.postgresql.jdbc4.AbstractJdbc4Clob.(AbstractJdbc4Clob.java:18)
at org.postgresql.jdbc4.Jdbc4Clob.(Jdbc4Clob.java:16)
at org.postgresql.jdbc4.Jdbc4ResultSet.getClob(Jdbc4ResultSet.java:40)
at org.postgresql.jdbc2.AbstractJdbc2ResultSet.getClob(AbstractJdbc2ResultSet.java:393)
at org.jboss.jca.adapters.jdbc.WrappedResultSet.getClob(WrappedResultSet.java:783)
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.AbstractResultSetProxyHandler.continueInvocation(AbstractResultSetProxyHandler.java:104) [hibernate-core-4.1.3.Final-redhat-1.jar:4.1.3.Final-redhat-1]
... 46 more
19:08:28,794 WARN [org.hibernate.engine.loading.internal.LoadContexts] (Thread-69) HHH000100: Fail-safe cleanup (collections) : org.hibernate.engine.loading.internal.CollectionLoadContext@5a89a85019:08:28,795 WARN [org.hibernate.engine.loading.internal.CollectionLoadContext] (Thread-69) HHH000160: On CollectionLoadContext#cleanup, localLoadingCollectionKeys contained [1] entries
19:08:28,795 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/gwt-console-server].[Resteasy]] (http-/127.0.0.1:8080-2) Servlet.service() for servlet Resteasy threw exception: org.jboss.resteasy.spi.UnhandledException: java.lang.RuntimeException: Command GetTaskRequest faild due to Large Objects may not be used in auto-commit mode.. Please contact task server administrator.
at org.jboss.resteasy.core.SynchronousDispatcher.handleApplicationException(SynchronousDispatcher.java:340) [resteasy-jaxrs-2.3.3.Final-redhat-1.jar:2.3.3.Final-redhat-1]
at org.jboss.resteasy.core.SynchronousDispatcher.handleException(SynchronousDispatcher.java:214) [resteasy-jaxrs-2.3.3.Final-redhat-1.jar:2.3.3.Final-redhat-1]
at org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(SynchronousDispatcher.java:190) [resteasy-jaxrs-2.3.3.Final-redhat-1.jar:2.3.3.Final-redhat-1]
at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:540) [resteasy-jaxrs-2.3.3.Final-redhat-1.jar:2.3.3.Final-redhat-1]
at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:502) [resteasy-jaxrs-2.3.3.Final-redhat-1.jar:2.3.3.Final-redhat-1]
at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:119) [resteasy-jaxrs-2.3.3.Final-redhat-1.jar:2.3.3.Final-redhat-1]
at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208) [resteasy-jaxrs-2.3.3.Final-redhat-1.jar:2.3.3.Final-redhat-1]
at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55) [resteasy-jaxrs-2.3.3.Final-redhat-1.jar:2.3.3.Final-redhat-1]
at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50) [resteasy-jaxrs-2.3.3.Final-redhat-1.jar:2.3.3.Final-redhat-1]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.1.Final-redhat-1.jar:1.0.1.Final-redhat-1]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.16.Final-redhat-1.jar:]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.16.Final-redhat-1.jar:]
at org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:62) [weld-core-1.1.8.Final-redhat-1.jar:1.1.8.Final-redhat-1]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.16.Final-redhat-1.jar:]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.16.Final-redhat-1.jar:]
at org.jboss.bpm.console.server.util.GWTJsonFilter.doFilter(GWTJsonFilter.java:59) [classes:]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.16.Final-redhat-1.jar:]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.16.Final-redhat-1.jar:]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.16.Final-redhat-1.jar:]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.16.Final-redhat-1.jar:]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:489) [jbossweb-7.0.16.Final-redhat-1.jar:]
at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) [jboss-as-web-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.16.Final-redhat-1.jar:]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.16.Final-redhat-1.jar:]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.16.Final-redhat-1.jar:]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.16.Final-redhat-1.jar:]
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.16.Final-redhat-1.jar:]
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:679) [jbossweb-7.0.16.Final-redhat-1.jar:]
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:931) [jbossweb-7.0.16.Final-redhat-1.jar:]
at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_31]
Caused by: java.lang.RuntimeException: Command GetTaskRequest faild due to Large Objects may not be used in auto-commit mode.. Please contact task server administrator.
at org.jbpm.task.service.TaskServerHandler.messageReceived(TaskServerHandler.java:674) [jbpm-human-task-core-5.4.0-SNAPSHOT.jar:5.4.0-SNAPSHOT]
at org.jbpm.task.service.hornetq.HornetQTaskServerHandler.messageReceived(HornetQTaskServerHandler.java:43) [jbpm-human-task-hornetq-5.4.0-SNAPSHOT.jar:5.4.0-SNAPSHOT]
at org.jbpm.task.service.hornetq.BaseHornetQTaskServer.run(BaseHornetQTaskServer.java:104) [jbpm-human-task-hornetq-5.4.0-SNAPSHOT.jar:5.4.0-SNAPSHOT]
... 1 more
I use EAP 6.0 (JBoss 7.1.2), PostgreSQL 9.0.8. I have built my jBPM from current master (5.4.0-SNAPSHOT) due to human task bugs in 5.3.0.Final. Attaching my persistence.xml files (the first one from jbpm-gwt-console-server, second one from jbpm-human-task-war):
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.0"
xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:orm="http://java.sun.com/xml/ns/persistence/orm"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm_2_0.xsd">
<persistence-unit name="org.jbpm.persistence.jpa" transaction-type="JTA">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<jta-data-source>java:jboss/datasources/jbpmDS</jta-data-source>
<mapping-file>META-INF/JBPMorm-JPA2.xml</mapping-file>
<class>org.drools.persistence.info.SessionInfo</class>
<class>org.jbpm.persistence.processinstance.ProcessInstanceInfo</class>
<class>org.drools.persistence.info.WorkItemInfo</class>
<properties>
<property name="hibernate.max_fetch_depth" value="3"/>
<property name="hibernate.hbm2ddl.auto" value="update" />
<property name="hibernate.show_sql" value="false" />
<property name="hibernate.connection.autocommit" value="false" />
<property name="hibernate.transaction.jta.platform" value="org.hibernate.service.jta.platform.internal.JBossAppServerJtaPlatform" />
<property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect"/>
</properties>
</persistence-unit>
</persistence>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<persistence version="2.0"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd
http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm_2_0.xsd"
xmlns:orm="http://java.sun.com/xml/ns/persistence/orm"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/persistence">
<persistence-unit name="org.jbpm.task">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<non-jta-data-source>java:jboss/datasources/taskDS</non-jta-data-source>
<!--<jta-data-source>java:jboss/datasources/taskDS</jta-data-source>-->
<mapping-file>META-INF/Taskorm.xml</mapping-file>
<class>org.jbpm.task.Attachment</class>
<class>org.jbpm.task.BooleanExpression</class>
<class>org.jbpm.task.Comment</class>
<class>org.jbpm.task.Content</class>
<class>org.jbpm.task.Deadline</class>
<class>org.jbpm.task.Delegation</class>
<class>org.jbpm.task.EmailNotification</class>
<class>org.jbpm.task.EmailNotificationHeader</class>
<class>org.jbpm.task.Escalation</class>
<class>org.jbpm.task.Group</class>
<class>org.jbpm.task.I18NText</class>
<class>org.jbpm.task.Notification</class>
<class>org.jbpm.task.OnAllSubTasksEndParentEndStrategy</class>
<class>org.jbpm.task.OnParentAbortAllSubTasksEndStrategy</class>
<class>org.jbpm.task.PeopleAssignments</class>
<class>org.jbpm.task.Reassignment</class>
<class>org.jbpm.task.Status</class>
<class>org.jbpm.task.SubTasksStrategy</class>
<class>org.jbpm.task.Task</class>
<class>org.jbpm.task.TaskData</class>
<class>org.jbpm.task.User</class>
<properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect"/>
<property name="hibernate.max_fetch_depth" value="3"/>
<property name="hibernate.hbm2ddl.auto" value="update" />
<property name="hibernate.show_sql" value="false" />
<property name="hibernate.connection.autocommit" value="false" />
<property name="hibernate.transaction.jta.platform" value="org.hibernate.service.jta.platform.internal.JBossAppServerJtaPlatform" />
</properties>
</persistence-unit>
</persistence>
My standalone.xml:
<datasource jta="true" jndi-name="java:jboss/datasources/jbpmDS" pool-name="java:jboss/datasources/jbpmDS_Pool" enabled="true" use-java-context="true" use-ccm="true">
<connection-url>jdbc:postgresql://localhost:5432/jbpm</connection-url>
<driver-class>org.postgresql.Driver</driver-class>
<driver>postgresql-jdbc4</driver>
<pool>
<min-pool-size>2</min-pool-size>
<max-pool-size>20</max-pool-size>
<prefill>true</prefill>
</pool>
<security>
<user-name>jbpm</user-name>
<password>jbpm</password>
</security>
<validation>
<check-valid-connection-sql>SELECT 1</check-valid-connection-sql>
<validate-on-match>false</validate-on-match>
<background-validation>false</background-validation>
<use-fast-fail>false</use-fast-fail>
</validation>
</datasource>
<datasource jta="false" jndi-name="java:jboss/datasources/taskDS" pool-name="java:jboss/datasources/taskDS_Pool" enabled="true" use-java-context="true" use-ccm="true">
<connection-url>jdbc:postgresql://localhost:5432/task</connection-url>
<driver-class>org.postgresql.Driver</driver-class>
<driver>postgresql-jdbc4</driver>
<pool>
<min-pool-size>2</min-pool-size>
<max-pool-size>20</max-pool-size>
<prefill>true</prefill>
</pool>
<security>
<user-name>task</user-name>
<password>task</password>
</security>
<validation>
<check-valid-connection-sql>SELECT 1</check-valid-connection-sql>
<validate-on-match>false</validate-on-match>
<background-validation>false</background-validation>
<use-fast-fail>false</use-fast-fail>
</validation>
</datasource>
The problem is caused by working with large data objects in PostgreSQL. I have tried to disable autocommit, but it didn't help. Also I have tried to configure data source taskDS to be JTA datasource, because some web discussions suggested to try using of transactions to solve this, but this didn't help too. Any help will be appreciated, thanks.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/751316#751316]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 4 months