[jboss-user] [jBPM] - Re: While i try to load the JBPMorm.xml and ProcessInstanceInfo.hbm.xml files in the persistence.xml file, it break out
星兰 蒋
do-not-reply at jboss.com
Thu Dec 6 21:06:39 EST 2012
星兰 蒋 [https://community.jboss.org/people/jiang_hoo] created the discussion
"Re: While i try to load the JBPMorm.xml and ProcessInstanceInfo.hbm.xml files in the persistence.xml file,it break out"
To view the discussion, visit: https://community.jboss.org/message/780540#780540
--------------------------------------------------------------
Hi Jiri,
Thanks for you reply very much.
But it seems the ProcessInstanceInfo.hbm.xml file is a must file!
Because the following Exception is caught while i try to complete a process.
org.jbpm.workflow.instance.WorkflowRuntimeException: [com.sogou.ka.contract:1 - End:14] -- Named query not found: ProcessInstancesWaitingForEvent
at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:130)
at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerNodeInstance(NodeInstanceImpl.java:205)
at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:164)
at org.jbpm.workflow.instance.impl.ExtendedNodeInstanceImpl.triggerCompleted(ExtendedNodeInstanceImpl.java:47)
at org.jbpm.workflow.instance.node.StateBasedNodeInstance.triggerCompleted(StateBasedNodeInstance.java:162)
at org.jbpm.workflow.instance.node.StateBasedNodeInstance.triggerCompleted(StateBasedNodeInstance.java:143)
at org.jbpm.workflow.instance.node.WorkItemNodeInstance.triggerCompleted(WorkItemNodeInstance.java:239)
at org.jbpm.workflow.instance.node.HumanTaskNodeInstance.triggerCompleted(HumanTaskNodeInstance.java:90)
at org.jbpm.workflow.instance.node.WorkItemNodeInstance.workItemCompleted(WorkItemNodeInstance.java:301)
at org.jbpm.workflow.instance.node.WorkItemNodeInstance.signalEvent(WorkItemNodeInstance.java:277)
at org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl.signalEvent(WorkflowProcessInstanceImpl.java:326)
at org.drools.persistence.jpa.processinstance.JPAWorkItemManager.completeWorkItem(JPAWorkItemManager.java:121)
at org.drools.command.runtime.process.CompleteWorkItemCommand.execute(CompleteWorkItemCommand.java:69)
at org.drools.command.runtime.process.CompleteWorkItemCommand.execute(CompleteWorkItemCommand.java:32)
at org.drools.command.impl.DefaultCommandService.execute(DefaultCommandService.java:36)
at org.drools.persistence.SingleSessionCommandService.execute(SingleSessionCommandService.java:367)
at org.drools.command.impl.CommandBasedStatefulKnowledgeSession$1.completeWorkItem(CommandBasedStatefulKnowledgeSession.java:150)
at org.jbpm.task.service.hornetq.CommandBasedHornetQWSHumanTaskHandler$GetResultContentResponseHandler.execute(CommandBasedHornetQWSHumanTaskHandler.java:308)
at org.jbpm.task.service.TaskClientHandler.messageReceived(TaskClientHandler.java:153)
at org.jbpm.task.service.hornetq.HornetQTaskClientHandler.messageReceived(HornetQTaskClientHandler.java:56)
at org.jbpm.task.service.hornetq.HornetQTaskClientConnector$1.run(HornetQTaskClientConnector.java:120)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IllegalArgumentException: Named query not found: ProcessInstancesWaitingForEvent
at org.hibernate.ejb.AbstractEntityManagerImpl.createNamedQuery(AbstractEntityManagerImpl.java:108)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.orm.jpa.ExtendedEntityManagerCreator$ExtendedEntityManagerInvocationHandler.invoke(ExtendedEntityManagerCreator.java:358)
at $Proxy28.createNamedQuery(Unknown Source)
at org.jbpm.persistence.JpaProcessPersistenceContext.getProcessInstancesWaitingForEvent(JpaProcessPersistenceContext.java:35)
at org.jbpm.persistence.processinstance.JPASignalManager.getProcessInstancesForEvent(JPASignalManager.java:40)
at org.jbpm.persistence.processinstance.JPASignalManager.signalEvent(JPASignalManager.java:23)
at org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl.setState(WorkflowProcessInstanceImpl.java:264)
at org.jbpm.workflow.instance.node.EndNodeInstance.internalTrigger(EndNodeInstance.java:58)
at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:124)
... 21 more
16 07/12 09:59:24,825[Thread-12] ERROR service.hornetq.HornetQTaskClientConnector.run - [com.sogou.ka.contract:1 - End:14] -- Named query not found: ProcessInstancesWaitingForEvent
My persistence.xml file is:
<persistence xmlns=" http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence"
xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=" http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
version="1.0">
<persistence-unit name="org.jbpm.persistence.jta"
transaction-type="JTA">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<!-- <jta-data-source>jdbc/jbpm-ds</jta-data-source> -->
<!-- Use this if you are using JPA1 / Hibernate3 -->
<!-- <mapping-file>META-INF/JBPMorm.xml</mapping-file>
<mapping-file>META-INF/ProcessInstanceInfo.hbm.xml</mapping-file> -->
<!-- Use this if you are using JPA2 / Hibernate4 -->
<!--mapping-file>META-INF/JBPMorm-JPA2.xml</mapping-file -->
<class>org.drools.persistence.info.SessionInfo</class>
<class>org.jbpm.persistence.processinstance.ProcessInstanceInfo</class>
<class>org.drools.persistence.info.WorkItemInfo</class>
<class>org.jbpm.process.audit.ProcessInstanceLog</class>
<class>org.jbpm.process.audit.NodeInstanceLog</class>
<class>org.jbpm.process.audit.VariableInstanceLog</class>
<properties>
<property name="hibernate.max_fetch_depth" value="3" />
<property name="hibernate.hbm2ddl.auto" value="create" />
<property name="hibernate.show_sql" value="false" />
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect" />
<property name="hibernate.transaction.manager_lookup_class"
value="org.hibernate.transaction.BTMTransactionManagerLookup" />
</properties>
</persistence-unit>
</persistence>
And i'm using Hibernate 3.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/780540#780540]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20121206/97aac5ef/attachment-0001.html
More information about the jboss-user
mailing list