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
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.
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.
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.
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.
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();
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?
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.
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.
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.
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.
Please verify them on ER8.
This problem is gone now. Thank you for quick fix.