Hi ramram, Thanks for your quick reply. I implemented your suggestions and
this is how my persistence unit looks. But I am still getting an error,
though a different one. Please see below for error log.
persistence.xml
....
<persistence-unit name="org.drools.persistence.jpa"
transaction-type="JTA">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<jta-data-source>java:jdbc/testDS1</jta-data-source>
<class>org.drools.persistence.session.SessionInfo</class>
<class>org.drools.persistence.processinstance.WorkItemInfo</class>
<class>org.drools.persistence.processinstance.ProcessInstanceInfo</class>
<class>org.drools.persistence.processinstance.variabletypes.JPAPersistedVariable</class>
<class>org.drools.persistence.processinstance.variabletypes.VariableInstanceInfo</class>
<class>org.drools.persistence.processinstance.variabletypes.SerializablePersistedVariable</class>
<properties>
<property name="hibernate.dialect"
value="org.hibernate.dialect.H2Dialect"/>
<property name="hibernate.max_fetch_depth" value="3"/>
<property name="hibernate.hbm2ddl.auto" value="update" />
<property name="hibernate.show_sql" value="false"
/>
<property name="hibernate.transaction.manager_lookup_class"
value="org.hibernate.transaction.JBossTransactionManagerLookup" />
</properties>
</persistence-unit>
......
server.log
2010-03-16 12:47:13,294 ERROR [STDERR]
javax.persistence.PersistenceException: org.hibernate.MappingException:
Named query not known: ProcessInstancesWaitingForEvent
2010-03-16 12:47:13,294 ERROR [STDERR] at
org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:629)
2010-03-16 12:47:13,294 ERROR [STDERR] at
org.hibernate.ejb.AbstractEntityManagerImpl.createNamedQuery(AbstractEntityManagerImpl.java:106)
2010-03-16 12:47:13,294 ERROR [STDERR] at
org.drools.persistence.processinstance.JPASignalManager.getProcessInstancesForEvent(JPASignalManager.java:50)
2010-03-16 12:47:13,294 ERROR [STDERR] at
org.drools.persistence.processinstance.JPASignalManager.signalEvent(JPASignalManager.java:29)
2010-03-16 12:47:13,294 ERROR [STDERR] at
org.drools.workflow.instance.impl.WorkflowProcessInstanceImpl.setState(WorkflowProcessInstanceImpl.java:191)
2010-03-16 12:47:13,294 ERROR [STDERR] at
org.drools.workflow.instance.node.EndNodeInstance.internalTrigger(EndNodeInstance.java:56)
2010-03-16 12:47:13,294 ERROR [STDERR] at
org.drools.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:112)
2010-03-16 12:47:13,294 ERROR [STDERR] at
org.drools.workflow.instance.impl.NodeInstanceImpl.triggerConnection(NodeInstanceImpl.java:148)
2010-03-16 12:47:13,294 ERROR [STDERR] at
org.drools.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:135)
2010-03-16 12:47:13,294 ERROR [STDERR] at
org.drools.workflow.instance.node.ActionNodeInstance.triggerCompleted(ActionNodeInstance.java:62)
2010-03-16 12:47:13,294 ERROR [STDERR] at
org.drools.workflow.instance.node.ActionNodeInstance.internalTrigger(ActionNodeInstance.java:58)
2010-03-16 12:47:13,294 ERROR [STDERR] at
org.drools.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:112)
2010-03-16 12:47:13,294 ERROR [STDERR] at
org.drools.workflow.instance.impl.NodeInstanceImpl.triggerConnection(NodeInstanceImpl.java:148)
2010-03-16 12:47:13,294 ERROR [STDERR] at
org.drools.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:135)
2010-03-16 12:47:13,294 ERROR [STDERR] at
org.drools.workflow.instance.node.StartNodeInstance.triggerCompleted(StartNodeInstance.java:49)
2010-03-16 12:47:13,294 ERROR [STDERR] at
org.drools.workflow.instance.node.StartNodeInstance.internalTrigger(StartNodeInstance.java:41)
2010-03-16 12:47:13,294 ERROR [STDERR] at
org.drools.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:112)
2010-03-16 12:47:13,294 ERROR [STDERR] at
org.drools.ruleflow.instance.RuleFlowProcessInstance.internalStart(RuleFlowProcessInstance.java:16)
2010-03-16 12:47:13,294 ERROR [STDERR] at
org.drools.process.instance.impl.ProcessInstanceImpl.start(ProcessInstanceImpl.java:185)
2010-03-16 12:47:13,294 ERROR [STDERR] at
org.drools.workflow.instance.impl.WorkflowProcessInstanceImpl.start(WorkflowProcessInstanceImpl.java:230)
2010-03-16 12:47:13,294 ERROR [STDERR] at
org.drools.common.AbstractWorkingMemory.startProcess(AbstractWorkingMemory.java:1689)
2010-03-16 12:47:13,294 ERROR [STDERR] at
org.drools.impl.StatefulKnowledgeSessionImpl.startProcess(StatefulKnowledgeSessionImpl.java:289)
2010-03-16 12:47:13,294 ERROR [STDERR] at
org.drools.command.runtime.process.StartProcessCommand.execute(StartProcessCommand.java:52)
2010-03-16 12:47:13,294 ERROR [STDERR] at
org.drools.command.runtime.process.StartProcessCommand.execute(StartProcessCommand.java:14)
2010-03-16 12:47:13,294 ERROR [STDERR] at
org.drools.persistence.session.SingleSessionCommandService.execute(SingleSessionCommandService.java:254)
2010-03-16 12:47:13,294 ERROR [STDERR] at
org.drools.command.impl.CommandBasedStatefulKnowledgeSession.startProcess(CommandBasedStatefulKnowledgeSession.java:163)
2010-03-16 12:47:13,294 ERROR [STDERR] at
org.drools.integration.console.DroolsFlowCommandDelegate.startProcess(DroolsFlowCommandDelegate.java:125)
2010-03-16 12:47:13,294 ERROR [STDERR] at
org.drools.integration.console.DroolsFlowProcessManagement.newInstance(DroolsFlowProcessManagement.java:64)
2010-03-16 12:47:13,294 ERROR [STDERR] at
org.drools.integration.console.DroolsFlowProcessManagement.newInstance(DroolsFlowProcessManagement.java:60)
2010-03-16 12:47:13,294 ERROR [STDERR] at
org.jboss.bpm.console.server.ProcessMgmtFacade.newInstance(ProcessMgmtFacade.java:189)
2010-03-16 12:47:13,294 ERROR [STDERR] at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2010-03-16 12:47:13,294 ERROR [STDERR] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
2010-03-16 12:47:13,294 ERROR [STDERR] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
2010-03-16 12:47:13,294 ERROR [STDERR] at
java.lang.reflect.Method.invoke(Method.java:597)
2010-03-16 12:47:13,294 ERROR [STDERR] at
org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:117)
2010-03-16 12:47:13,294 ERROR [STDERR] at
org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:260)
2010-03-16 12:47:13,294 ERROR [STDERR] at
org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:232)
2010-03-16 12:47:13,294 ERROR [STDERR] at
org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:166)
2010-03-16 12:47:13,294 ERROR [STDERR] at
org.jboss.resteasy.core.DispatcherUtilities.getJaxrsResponse(DispatcherUtilities.java:142)
2010-03-16 12:47:13,294 ERROR [STDERR] at
org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356)
2010-03-16 12:47:13,294 ERROR [STDERR] at
org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:173)
2010-03-16 12:47:13,294 ERROR [STDERR] at
org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:93)
2010-03-16 12:47:13,294 ERROR [STDERR] at
org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:68)
2010-03-16 12:47:13,294 ERROR [STDERR] at
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
2010-03-16 12:47:13,294 ERROR [STDERR] at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
2010-03-16 12:47:13,294 ERROR [STDERR] at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
2010-03-16 12:47:13,294 ERROR [STDERR] at
org.jboss.bpm.console.server.util.GWTJsonFilter.doFilter(GWTJsonFilter.java:59)
2010-03-16 12:47:13,294 ERROR [STDERR] at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
2010-03-16 12:47:13,294 ERROR [STDERR] at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
2010-03-16 12:47:13,294 ERROR [STDERR] at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
2010-03-16 12:47:13,294 ERROR [STDERR] at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
2010-03-16 12:47:13,294 ERROR [STDERR] at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
2010-03-16 12:47:13,294 ERROR [STDERR] at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
2010-03-16 12:47:13,294 ERROR [STDERR] at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
2010-03-16 12:47:13,294 ERROR [STDERR] at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
2010-03-16 12:47:13,294 ERROR [STDERR] at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
2010-03-16 12:47:13,294 ERROR [STDERR] at
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
2010-03-16 12:47:13,294 ERROR [STDERR] at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
2010-03-16 12:47:13,294 ERROR [STDERR] at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
2010-03-16 12:47:13,294 ERROR [STDERR] at
org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
2010-03-16 12:47:13,294 ERROR [STDERR] at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
2010-03-16 12:47:13,294 ERROR [STDERR] at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
2010-03-16 12:47:13,294 ERROR [STDERR] at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
2010-03-16 12:47:13,294 ERROR [STDERR] at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
2010-03-16 12:47:13,294 ERROR [STDERR] at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
2010-03-16 12:47:13,294 ERROR [STDERR] at
java.lang.Thread.run(Thread.java:619)
2010-03-16 12:47:13,294 ERROR [STDERR] Caused by:
org.hibernate.MappingException: Named query not known:
ProcessInstancesWaitingForEvent
2010-03-16 12:47:13,294 ERROR [STDERR] at
org.hibernate.impl.AbstractSessionImpl.getNamedQuery(AbstractSessionImpl.java:70)
2010-03-16 12:47:13,294 ERROR [STDERR] at
org.hibernate.impl.SessionImpl.getNamedQuery(SessionImpl.java:1260)
2010-03-16 12:47:13,294 ERROR [STDERR] at
org.hibernate.ejb.AbstractEntityManagerImpl.createNamedQuery(AbstractEntityManagerImpl.java:103)
2010-03-16 12:47:13,294 ERROR [STDERR] ... 64 more
2010-03-16 12:47:13,310 ERROR [STDERR] Mar 16, 2010 12:47:13 PM
org.jboss.resteasy.core.SynchronousDispatcher handleWebApplicationException
SEVERE: failed to execute
javax.ws.rs.WebApplicationException: java.lang.RuntimeException: Could not
rollback transaction
at
org.jboss.bpm.console.server.ProcessMgmtFacade.newInstance(ProcessMgmtFacade.java:194)
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.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:117)
at
org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:260)
at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:232)
at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:166)
at
org.jboss.resteasy.core.DispatcherUtilities.getJaxrsResponse(DispatcherUtilities.java:142)
at
org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356)
at
org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:173)
at
org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:93)
at
org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:68)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.jboss.bpm.console.server.util.GWTJsonFilter.doFilter(GWTJsonFilter.java:59)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
at
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.RuntimeException: Could not rollback transaction
at
org.drools.persistence.session.SingleSessionCommandService.execute(SingleSessionCommandService.java:283)
at
org.drools.command.impl.CommandBasedStatefulKnowledgeSession.startProcess(CommandBasedStatefulKnowledgeSession.java:163)
at
org.drools.integration.console.DroolsFlowCommandDelegate.startProcess(DroolsFlowCommandDelegate.java:125)
at
org.drools.integration.console.DroolsFlowProcessManagement.newInstance(DroolsFlowProcessManagement.java:64)
at
org.drools.integration.console.DroolsFlowProcessManagement.newInstance(DroolsFlowProcessManagement.java:60)
at
org.jboss.bpm.console.server.ProcessMgmtFacade.newInstance(ProcessMgmtFacade.java:189)
... 36 more
Caused by: java.lang.RuntimeException: Could not execute command
at
org.drools.persistence.session.SingleSessionCommandService.execute(SingleSessionCommandService.java:280)
... 41 more
Caused by: javax.persistence.PersistenceException:
org.hibernate.MappingException: Named query not known:
ProcessInstancesWaitingForEvent
at
org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:629)
at
org.hibernate.ejb.AbstractEntityManagerImpl.createNamedQuery(AbstractEntityManagerImpl.java:106)
at
org.drools.persistence.processinstance.JPASignalManager.getProcessInstancesForEvent(JPASignalManager.java:50)
at
org.drools.persistence.processinstance.JPASignalManager.signalEvent(JPASignalManager.java:29)
at
org.drools.workflow.instance.impl.WorkflowProcessInstanceImpl.setState(WorkflowProcessInstanceImpl.java:191)
at
org.drools.workflow.instance.node.EndNodeInstance.internalTrigger(EndNodeInstance.java:56)
at
org.drools.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:112)
at
org.drools.workflow.instance.impl.NodeInstanceImpl.triggerConnection(NodeInstanceImpl.java:148)
at
org.drools.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:135)
at
org.drools.workflow.instance.node.ActionNodeInstance.triggerCompleted(ActionNodeInstance.java:62)
at
org.drools.workflow.instance.node.ActionNodeInstance.internalTrigger(ActionNodeInstance.java:58)
at
org.drools.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:112)
at
org.drools.workflow.instance.impl.NodeInstanceImpl.triggerConnection(NodeInstanceImpl.java:148)
at
org.drools.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:135)
at
org.drools.workflow.instance.node.StartNodeInstance.triggerCompleted(StartNodeInstance.java:49)
at
org.drools.workflow.instance.node.StartNodeInstance.internalTrigger(StartNodeInstance.java:41)
at
org.drools.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:112)
at
org.drools.ruleflow.instance.RuleFlowProcessInstance.internalStart(RuleFlowProcessInstance.java:16)
at
org.drools.process.instance.impl.ProcessInstanceImpl.start(ProcessInstanceImpl.java:185)
at
org.drools.workflow.instance.impl.WorkflowProcessInstanceImpl.start(WorkflowProcessInstanceImpl.java:230)
at
org.drools.common.AbstractWorkingMemory.startProcess(AbstractWorkingMemory.java:1689)
at
org.drools.impl.StatefulKnowledgeSessionImpl.startProcess(StatefulKnowledgeSessionImpl.java:289)
at
org.drools.command.runtime.process.StartProcessCommand.execute(StartProcessCommand.java:52)
at
org.drools.command.runtime.process.StartProcessCommand.execute(StartProcessCommand.java:14)
at
org.drools.persistence.session.SingleSessionCommandService.execute(SingleSessionCommandService.java:254)
... 41 more
Caused by: org.hibernate.MappingException: Named query not known:
ProcessInstancesWaitingForEvent
at
org.hibernate.impl.AbstractSessionImpl.getNamedQuery(AbstractSessionImpl.java:70)
at org.hibernate.impl.SessionImpl.getNamedQuery(SessionImpl.java:1260)
at
org.hibernate.ejb.AbstractEntityManagerImpl.createNamedQuery(AbstractEntityManagerImpl.java:103)
... 64 more
--
View this message in context:
http://n3.nabble.com/GWT-Console-issue-tp448038p451544.html
Sent from the Drools - User mailing list archive at
Nabble.com.