Bug 852044

Summary: Cannot view human task list on EAP 6.0 with Hibernate 4 and PostgreSQL due to: org.postgresql.util.PSQLException: Large Objects may not be used in auto-commit mode.
Product: [JBoss] JBoss Enterprise BRMS Platform 5 Reporter: Jiri Svitak <jsvitak>
Component: jBPM 5Assignee: Kris Verlaenen <kverlaen>
Status: VERIFIED --- QA Contact: Marek Baluch <mbaluch>
Severity: high Docs Contact:
Priority: unspecified    
Version: BRMS 5.3.0.GACC: eric.wittmann, mbaluch
Target Milestone: ER2   
Target Release: BRMS 5.3.1 GA   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1211248    
Attachments:
Description Flags
server.log
none
business-central-server persistence.xml
none
jbpm-human-task persistence.xml
none
test case
none
standalone.xml
none
Another test case none

Description Jiri Svitak 2012-08-27 12:28:08 UTC
Created attachment 607193 [details]
server.log

Cannot view human task list on EAP 6.0 with JPA 2.0 and PostgreSQL due to: org.postgresql.util.PSQLException: Large Objects may not be used in auto-commit mode.

How to reproduce:
1. Set up your environment using the steps in this document:
https://docspace.corp.redhat.com/docs/DOC-111367
Ignore the parts about setting up Hibernate 3, instead of that use attached persistence.xml files with JPA 2.0.
2. Run the attached test case. It starts a process instance and connects to the human task server and creates a task there.
3. Open http://localhost:8080/business-central and view your tasks (click on refresh button) of your user (in my case it's jsvitak, but you can easily reconfigure it to krisv for example; in these files: testproc.bpmn2 file, brms-users.properties, brms-roles.properties and DefaultUsers.mvel).
4. You can see an exception in your server, see attached server.log for details.
Business central shows no human tasks, but the task from the testproc should be there. With configured Hibernate 3 you can see the test task and complete it too.

My environment:
EAP 6.0 (with default Hibernate 4)
BRMS 5.3.0 GA patch01 (reconfigure to JPA 2.0 jbpm-human-task.war and business-central-server.war)
PostgreSQL 9

Added also relevant JIRA issue based on this discussion:
https://community.jboss.org/thread/203384

Comment 1 Jiri Svitak 2012-08-27 12:29:55 UTC
Created attachment 607194 [details]
business-central-server persistence.xml

Comment 2 Jiri Svitak 2012-08-27 12:30:51 UTC
Created attachment 607195 [details]
jbpm-human-task persistence.xml

Comment 3 Jiri Svitak 2012-08-27 12:37:46 UTC
Created attachment 607197 [details]
test case

Comment 4 Jiri Svitak 2012-08-27 15:31:14 UTC
Created attachment 607237 [details]
standalone.xml

Comment 5 Marco Rietveld 2012-09-11 19:28:57 UTC
Jiri, 

Could you test this with the new EE6 wars? The jbpm-human-task-war module now makes a new jbpm-human-task-war-<version>-EE6.war that works with EAP 6. 

I tested this problem with EAP 6 (and postgresql 8.4.12) and didn't run into the problem you mention. 

I did run into other problems, unfortunately (1. adding the task w/o the user in the db throws an exception). I haven't completed the task yet either (and let the process complete), I'll test that tomorrow. 

(I can't remember if [1] is intended, but the error thrown is very ugly. At the very least I'll clean that up.)

Comment 6 Marco Rietveld 2012-09-12 07:55:57 UTC
And.. I don't know what I was doing yesterday, but today, I _am_ getting the error you described. 

My apologies! :(

Comment 7 Marco Rietveld 2012-09-21 07:32:33 UTC
Created attachment 615296 [details]
Another test case

What's interesting, is that this error has to do specifically with how hibernate 4 handles transactions -- because this error doesn't happen on AS5/hib3, obviously. 

* Unfortunately, wrapping the session.write() in a transaction introduces other errors into the human-task service. 

I was hoping to get around the problem by using a different jta txm implementation, but the "correct" hib4 setting (hibernate.transaction.jta.platform) doesn't help. The problem also occurs when using bitronix. 

Of course, the problems that I'm seeing in the tests when the session.write() is wrapped, might just be due to a problem in the tests, not the actually code. 

Still looking..

Comment 8 JBoss JIRA Server 2012-10-01 10:27:19 UTC
Marco Rietveld <marco.rietveld> updated the status of jira JBPM-3763 to Resolved

Comment 9 Jiri Svitak 2012-10-04 15:58:28 UTC
Verified in BRMS 5.3.1 ER2.