Bug 971376

Summary: Task query fails on PostgreSQL due to: Large Objects may not be used in auto-commit mode.
Product: [Retired] JBoss BPMS Platform 6 Reporter: Jiri Svitak <jsvitak>
Component: jBPM CoreAssignee: Kris Verlaenen <kverlaen>
Status: CLOSED NOTABUG QA Contact: Jiri Svitak <jsvitak>
Severity: high Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: mbaluch, mrietvel, mswiders
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-06-06 15:43:40 UTC 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:
Attachments:
Description Flags
server log none

Description Jiri Svitak 2013-06-06 11:30:59 UTC
Created attachment 757627 [details]
server log

Task query fails on PostgreSQL due to: org.postgresql.util.PSQLException: Large Objects may not be used in auto-commit mode. Problematic method call in my code:
com.sample.ejb.TaskBean.retrieveTaskList(TaskBean.java:48)
List<TaskSummary> list = taskService.getTasksAssignedAsPotentialOwner(actorId, "en-UK");

Server log attached.

To reproduce:
See the steps here: https://github.com/jsvitak/jbpm-6-examples/tree/master/rewards-basic
So just clone the repo, follow the steps in readme.md and configure EAP to use PostgreSQL datasource. Also change the hibernate.dialect in file
rewards-basic/src/main/resources/META-INF/persistence.xml
to org.hibernate.dialect.PostgreSQLDialect
The process starts correctly, but I was unable to list John's tasks. This operation works on MySQL without problems. It's possible that other problems may follow when approving tasks on PostgreSQL.

My environment:
PostgreSQL 9.1.9
Driver postgresql-9.1-902.jdbc4.jar
JBoss EAP 6.1.0
jBPM 6.0.0.Beta3 (it should be the same as DR5)

Comment 1 Jiri Svitak 2013-06-06 15:43:40 UTC
After some investigation together with Maciej there is a solution to this issue. The reported method call was not closed inside transaction and PostgreSQL is sensitive database to correct transaction handling. After putting query call inside transaction everything works.

Closing the bugzilla as this is not a real jBPM issue.

Comment 2 Marco Rietveld 2013-10-31 19:43:47 UTC
If we don't support PostgreSQL, then this is not a bug... If we do support PostgreSQL, then I'm curious as to why this is not a bug?

Comment 3 Marek Baluch 2013-11-01 11:29:25 UTC
We do support PostgresSQL and I'm curious too. Maciej, Jiri would you be so kind to explain? :)

Comment 4 Maciej Swiderski 2013-11-01 11:42:24 UTC
first of all that was quite some time ago when we closed this as not a bug and indeed it was just misconfiguration in usage rather then actual a bug in jbpm. Since that time we have enhanced handling of human tasks in terms of transactions and all operations on TaskService interface are by default transactional - if no transaction is already in progress new one will be started on TaskService level. Hope that helps