Bug 821922 - Exception when starting process on PostgreSQL
Exception when starting process on PostgreSQL
Product: JBoss Enterprise BRMS Platform 5
Classification: JBoss
Component: jBPM 5 (Show other bugs)
BRMS 5.3.0.GA
Unspecified Unspecified
unspecified Severity urgent
: ER8
: BRMS 5.3.0.GA
Assigned To: Shelly McGowan
Tomas Schlosser
Depends On:
  Show dependency treegraph
Reported: 2012-05-15 14:53 EDT by Tomas Schlosser
Modified: 2016-09-20 01:08 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
PostgreSQL (tested with 8.2, 8.3, 8.4)
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
stacktrace of the exception (7.19 KB, text/plain)
2012-05-15 14:53 EDT, Tomas Schlosser
no flags Details
persistence.xml (1.11 KB, application/xml)
2012-05-16 02:59 EDT, Tomas Schlosser
no flags Details

  None (edit)
Description Tomas Schlosser 2012-05-15 14:53:10 EDT
Created attachment 584764 [details]
stacktrace of the exception

Description of problem:
When a process is started through execute() method of StatefulKnowledgeSession the java.lang.IllegalStateException is thrown.

Version-Release number of selected component (if applicable):
PostgreSQL 8.2, 8.3, 8.4 (didn't test other versions)

How reproducible:
every time

Steps to Reproduce:
1. set up persisted environment
2. start a process using execute() method
Actual results:

Expected results:
clean start and execution of process

Additional info:
stacktrace is included
Comment 1 Tomas Schlosser 2012-05-15 14:54:35 EDT
I can create a pull request, but I'm not sure whether you testsuite can run tests with PostgreSQL. It is a very simple one, so I can send it anytime.
Comment 2 Marco Rietveld 2012-05-15 15:26:42 EDT
Tomas, please do create a pull request. Some tests are set up to run with non-H2 databases -- and at the very least, I can create a test based on your pull request.
Comment 3 Marco Rietveld 2012-05-15 18:10:44 EDT
Tomas, would you mind providing the following information as well? 

- jdk
- (postgresql) jdbc driver
- persistence.xml used

I see this problem with another class (ProcessInstanceInfo), but not with the SessionInfo class. I'm working on fixing it with the ProcessInstanceInfo class, but if it's also in the SessionInfo class (and WorkItemInfo class), then I'll need to fix it there.
Comment 4 Tomas Schlosser 2012-05-16 02:48:56 EDT
Hi Marco,
- jdk: Sun JDK 6 (don't know the exact version, but I suppose it is the latest) and openjdk-1.6.0 (as I tested it on my local machine)
- jdbc.driver: postgresql-8.2-511, postgresql-8.3-606, postgresql-8.4-703
- I'll attach persistence.xml

Yes, I can see the problem is in SessionInfo, but my original problem was with ProcessInstanceInfo as well. It seems that the problem will be in all *Info classes.
I'll create a pull request and put its number here as a comment.
Comment 5 Tomas Schlosser 2012-05-16 02:59:46 EDT
Created attachment 584873 [details]

Database used with Bitronix:

ds = new PoolingDataSource();
ds.getDriverProperties().put("driverClassName", "org.postgresql.Driver");
ds.getDriverProperties().put("url", "***");
ds.getDriverProperties().put("user", "***");
ds.getDriverProperties().put("password", "***");
Comment 8 Marco Rietveld 2012-05-16 15:26:00 EDT
I noticed that the HSQLDialect is used in the persistence.xml. 

<property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect" />

Could you either confirm that you used the PostgreSQLDialect in your tests or either retest using the PostgreSQLDialect?
Comment 9 Marco Rietveld 2012-05-16 22:06:53 EDT
Just committed fixes for the ProcessInstanceInfo class: 


I'm pretty sure that if you correct the "hibernate.dialect" value, then the problems with SessionInfo (etc.) will clear up. In fact, part of this problem is related to how the Hibernate Dialect classes work.
Comment 10 Tomas Schlosser 2012-05-17 03:50:52 EDT
I'm sorry Marco, I left the default value in persistence.xml, but sure, we test with hibernate.dialect that matches the tested database which is in this case PostgreSQLDialect.
Comment 11 Marco Rietveld 2012-05-17 17:35:34 EDT
Tomas, when you get a chance, please send a pull request with code that illustrates this bug with SessionInfo or WorkItemInfo. 

I haven't been able to replicate that problem.
Comment 12 Tomas Schlosser 2012-05-18 07:23:56 EDT
As I mentioned in the mail I sent you, the class that reported a problem with "rulebasebytearray" now shows problem with "processinstancebytearay". I'm trying to find out what changed to see if the problem with SessionInfo can be reproduced again.
Comment 13 Ryan Zhang 2012-05-25 05:08:27 EDT
Please verify them on ER8.
Comment 14 Tomas Schlosser 2012-05-29 08:26:25 EDT
This problem is gone now. Thank you for quick fix.

Note You need to log in before you can comment on or make changes to this bug.