Bug 821922 - Exception when starting process on PostgreSQL
Summary: Exception when starting process on PostgreSQL
Keywords:
Status: VERIFIED
Alias: None
Product: JBoss Enterprise BRMS Platform 5
Classification: JBoss
Component: jBPM 5
Version: BRMS 5.3.0.GA
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: ER8
: BRMS 5.3.0.GA
Assignee: Kris Verlaenen
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-05-15 18:53 UTC by Tomas Schlosser
Modified: 2023-05-31 22:25 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
PostgreSQL (tested with 8.2, 8.3, 8.4)
Last Closed:
Type: Bug
Embargoed:


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

Description Tomas Schlosser 2012-05-15 18:53:10 UTC
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):
BRMS-5.3.0-ER7
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:
java.lang.IllegalStateException

Expected results:
clean start and execution of process

Additional info:
stacktrace is included

Comment 1 Tomas Schlosser 2012-05-15 18:54:35 UTC
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 19:26:42 UTC
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 22:10:44 UTC
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 06:48:56 UTC
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 06:59:46 UTC
Created attachment 584873 [details]
persistence.xml

Database used with Bitronix:

ds = new PoolingDataSource();
ds.setUniqueName("jdbc/brms-jdbc-ds");
ds.setClassName("bitronix.tm.resource.jdbc.lrc.LrcXADataSource");
ds.setMaxPoolSize(3);
ds.setAllowLocalTransactions(true);
ds.getDriverProperties().put("driverClassName", "org.postgresql.Driver");
ds.getDriverProperties().put("url", "***");
ds.getDriverProperties().put("user", "***");
ds.getDriverProperties().put("password", "***");
ds.init();

Comment 8 Marco Rietveld 2012-05-16 19:26:00 UTC
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-17 02:06:53 UTC
Just committed fixes for the ProcessInstanceInfo class: 

https://github.com/droolsjbpm/jbpm/compare/187b141...312ae23

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 07:50:52 UTC
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 21:35:34 UTC
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 11:23:56 UTC
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 09:08:27 UTC
Please verify them on ER8.

Comment 14 Tomas Schlosser 2012-05-29 12:26:25 UTC
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.