Bug 780007 (SOA-2367) - JBPM2908Test does not work for non-hsqldb databases
Summary: JBPM2908Test does not work for non-hsqldb databases
Keywords:
Status: CLOSED NEXTRELEASE
Alias: SOA-2367
Product: JBoss Enterprise SOA Platform 5
Classification: JBoss
Component: JBPM - within SOA
Version: 5.1.0.ER2
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: ---
: 5.1.0 GA
Assignee: Alejandro Guizar
QA Contact:
URL: http://jira.jboss.org/jira/browse/SOA...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-10-01 12:37 UTC by Jiri Pechanec
Modified: 2011-02-11 00:56 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-02-11 00:56:26 UTC
Type: Bug


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker SOA-2367 0 None None None Never

Description Jiri Pechanec 2010-10-01 12:37:14 UTC
project_key: SOA

For non-hsqldb database test fails with
-------------------------------------------------------------------------------
Test set: org.jbpm.jbpm2908.JBPM2908Test
-------------------------------------------------------------------------------
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 26.886 sec <<< FAILURE!
testChangingJbpmConfigurationInActionHandler(org.jbpm.jbpm2908.JBPM2908Test)  Time elapsed: 25.866 sec  <<< ERROR!
org.jbpm.persistence.JbpmPersistenceException: could not find process definition by name process2
        at org.jbpm.db.GraphSession.findLatestProcessDefinition(GraphSession.java:169)
        at org.jbpm.JbpmContext.newProcessInstance(JbpmContext.java:467)
        at org.jbpm.jbpm2908.ChangeJbpmConfigurationAction.execute(ChangeJbpmConfigurationAction.java:20)
        at org.jbpm.graph.def.Action.execute(Action.java:118)
        at org.jbpm.graph.def.GraphElement.executeActionImpl(GraphElement.java:300)
        at org.jbpm.graph.def.GraphElement.executeAction(GraphElement.java:267)
        at org.jbpm.graph.def.GraphElement.executeActions(GraphElement.java:240)
        at org.jbpm.graph.def.GraphElement.fireAndPropagateEvent(GraphElement.java:206)
        at org.jbpm.graph.def.GraphElement.fireEvent(GraphElement.java:188)
        at org.jbpm.graph.def.Node.enter(Node.java:368)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:157)
        at org.jbpm.graph.def.Node$$EnhancerByCGLIB$$c9fc76eb.enter(<generated>)
        at org.jbpm.graph.def.Transition.take(Transition.java:162)
        at org.jbpm.graph.def.Node.leave(Node.java:450)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:157)
        at org.jbpm.graph.def.Node$$EnhancerByCGLIB$$c9fc76eb.leave(<generated>)
        at org.jbpm.graph.exe.Token.signal(Token.java:209)
        at org.jbpm.graph.exe.Token.signal(Token.java:143)
        at org.jbpm.graph.exe.ProcessInstance.signal(ProcessInstance.java:292)
        at org.jbpm.jbpm2908.JBPM2908Test.testChangingJbpmConfigurationInActionHandler(JBPM2908Test.java:56)
Caused by: org.hibernate.exception.SQLGrammarException: could not execute query
        at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:67)
        at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
        at org.hibernate.loader.Loader.doList(Loader.java:2223)
        at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
        at org.hibernate.loader.Loader.list(Loader.java:2099)
        at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:378)
        at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338)
        at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
        at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
        at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
        at org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:811)
        at org.jbpm.db.GraphSession.findLatestProcessDefinition(GraphSession.java:162)
        ... 54 more
Caused by: java.sql.SQLException: Table not found in statement [select top ? processdef0_.ID_ as ID1_113_, processdef0_.NAME_ as NAME3_113_, processdef0_.DESCRIPTION_ as DESCRIPT4_113_, processdef0_.VERSION_ as VERSION5_113_, processdef0_.ISTERMINATIONIMPLICIT_ as ISTERMIN6_113_, processdef0_.STARTSTATE_ as STARTSTATE7_113_ from JBPM_PROCESSDEFINITION processdef0_ where processdef0_.NAME_=? order by processdef0_.VERSION_ desc]
        at org.hsqldb.jdbc.Util.throwError(Unknown Source)
        at org.hsqldb.jdbc.jdbcPreparedStatement.<init>(Unknown Source)
        at org.hsqldb.jdbc.jdbcConnection.prepareStatement(Unknown Source)
        at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:505)
        at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:423)
        at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:139)
        at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1547)
        at org.hibernate.loader.Loader.doQuery(Loader.java:673)
        at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
        at org.hibernate.loader.Loader.doList(Loader.java:2220)
        ... 63 more

Note in stacktrace that albeit PostgreSQL was used, the error reported is from hsqldb.

Command used to execute test
mvn -Ddatabase=postgresql -Dtest=JBPM2908Test -Djdbc.postgresql.driver=org.postgresql.Driver -Djdbc.postgresql.url=jdbc:postgresql://localhost:5432/soaesb1 -Djdbc.postgresql.username=soaesb1 -Djdbc.postgresql.password=soaesb1 test

Comment 1 Alejandro Guizar 2010-10-02 00:54:19 UTC
JBPM2908Test requires a special configuration to run under HSQL which is unnecessary for other databases. A Maven profile modified the configuration if the "database" property is either unset or set to "hsqldb". If property "database" is set to other values, the configuration was left unmodified.

In the present case, the modified configuration for HSQL remains from a previous Maven run and, since your mvn command does not specify the "clean" goal, the modified configuration adversely affects the test with PostgreSQL.

I have committed a change to JBPM2908Test to read different configuration files depending on the target database, and no longer modifies the configuration. * *No further action should be required in the SOA side* *. Please reopen this issue if the test still does not pass.

Comment 3 Dana Mison 2011-01-05 00:14:42 UTC
Writer: Added: dlesage


Comment 4 Jiri Pechanec 2011-01-06 08:41:34 UTC
Verified in ER6

Comment 5 David Le Sage 2011-02-11 00:56:03 UTC
Temporarily reopening to update release note status.

Comment 6 David Le Sage 2011-02-11 00:56:16 UTC
Release Notes Docs Status: Added: Not Required



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