[jboss-user] [JBoss jBPM] - Jbpm, Hibernate, JPA issues
jbpm_user369
do-not-reply at jboss.com
Wed Jul 29 08:11:55 EDT 2009
Hello,
we are building a project using JPA for persistence and Spring for bean management. We're using Jbpm for handling the business workflow. The jbpm tables used will share the same db with the application, and the jbpm context will share the JPA session of the application.
The jbpm version used is 3.2.3. Since the jbpm tables are mapped using Hibernate, we have entered the following mapping-file declarations inside the project persistence.xml:
<?xml version="1.0" encoding="UTF-8"?>
| <persistence xmlns="http://java.sun.com/xml/ns/persistence"
| version="1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
| <persistence-unit name="prospect_persistence"
| transaction-type="RESOURCE_LOCAL">
|
| <provider>org.hibernate.ejb.HibernatePersistence</provider>
|
|
|
| <mapping-file>org/jbpm/db/hibernate.queries.hbm.xml</mapping-file>
| <mapping-file>org/jbpm/graph/def/Node.hbm.xml</mapping-file>
| <mapping-file>org/jbpm/graph/node/StartState.hbm.xml</mapping-file>
| <mapping-file>org/jbpm/graph/node/EndState.hbm.xml</mapping-file>
| <mapping-file>org/jbpm/graph/node/ProcessState.hbm.xml</mapping-file>
| <mapping-file>org/jbpm/graph/node/Decision.hbm.xml</mapping-file>
| <mapping-file>org/jbpm/graph/node/Fork.hbm.xml</mapping-file>
| <mapping-file>org/jbpm/graph/node/Join.hbm.xml</mapping-file>
| <mapping-file>org/jbpm/graph/node/MailNode.hbm.xml</mapping-file>
| <mapping-file>org/jbpm/graph/node/State.hbm.xml</mapping-file>
| <mapping-file>org/jbpm/graph/def/ProcessDefinition.hbm.xml</mapping-file>
| <mapping-file>org/jbpm/graph/def/Transition.hbm.xml</mapping-file>
| <mapping-file>org/jbpm/graph/def/Event.hbm.xml</mapping-file>
| <mapping-file>org/jbpm/graph/def/Action.hbm.xml</mapping-file>
| <mapping-file>org/jbpm/graph/def/SuperState.hbm.xml</mapping-file>
| <mapping-file>org/jbpm/graph/def/ExceptionHandler.hbm.xml</mapping-file>
| <mapping-file>org/jbpm/instantiation/Delegation.hbm.xml</mapping-file>
| <mapping-file>org/jbpm/graph/node/TaskNode.hbm.xml</mapping-file>
| <mapping-file>org/jbpm/context/def/ContextDefinition.hbm.xml</mapping-file>
| <mapping-file>org/jbpm/context/def/VariableAccess.hbm.xml</mapping-file>
| <mapping-file>org/jbpm/bytes/ByteArray.hbm.xml</mapping-file>
| <mapping-file>org/jbpm/module/def/ModuleDefinition.hbm.xml</mapping-file>
| <mapping-file>org/jbpm/file/def/FileDefinition.hbm.xml</mapping-file>
| <mapping-file>org/jbpm/taskmgmt/def/TaskMgmtDefinition.hbm.xml</mapping-file>
| <mapping-file>org/jbpm/taskmgmt/def/Swimlane.hbm.xml</mapping-file>
| <mapping-file>org/jbpm/taskmgmt/def/Task.hbm.xml</mapping-file>
| <mapping-file>org/jbpm/taskmgmt/def/TaskController.hbm.xml</mapping-file>
| <mapping-file>org/jbpm/scheduler/def/CreateTimerAction.hbm.xml</mapping-file>
| <mapping-file>org/jbpm/scheduler/def/CancelTimerAction.hbm.xml</mapping-file>
| <mapping-file>org/jbpm/graph/exe/Comment.hbm.xml</mapping-file>
| <mapping-file>org/jbpm/graph/exe/ProcessInstance.hbm.xml</mapping-file>
| <mapping-file>org/jbpm/graph/exe/Token.hbm.xml</mapping-file>
| <mapping-file>org/jbpm/graph/exe/RuntimeAction.hbm.xml</mapping-file>
| <mapping-file>org/jbpm/module/exe/ModuleInstance.hbm.xml</mapping-file>
| <mapping-file>org/jbpm/context/exe/ContextInstance.hbm.xml</mapping-file>
| <mapping-file>org/jbpm/context/exe/TokenVariableMap.hbm.xml</mapping-file>
| <mapping-file>org/jbpm/context/exe/VariableInstance.hbm.xml</mapping-file>
| <mapping-file>org/jbpm/context/exe/variableinstance/ByteArrayInstance.hbm.xml</mapping-file>
| <mapping-file>org/jbpm/context/exe/variableinstance/DateInstance.hbm.xml</mapping-file>
| <mapping-file>org/jbpm/context/exe/variableinstance/DoubleInstance.hbm.xml</mapping-file>
| <mapping-file>org/jbpm/context/exe/variableinstance/HibernateLongInstance.hbm.xml</mapping-file>
| <mapping-file>org/jbpm/context/exe/variableinstance/HibernateStringInstance.hbm.xml</mapping-file>
| <mapping-file>org/jbpm/context/exe/variableinstance/LongInstance.hbm.xml</mapping-file>
| <mapping-file>org/jbpm/context/exe/variableinstance/NullInstance.hbm.xml</mapping-file>
| <mapping-file>org/jbpm/context/exe/variableinstance/StringInstance.hbm.xml</mapping-file>
| <mapping-file>org/jbpm/context/log/VariableCreateLog.hbm.xml</mapping-file>
| <mapping-file>org/jbpm/context/log/VariableLog.hbm.xml</mapping-file>
| <mapping-file>org/jbpm/context/log/variableinstance/StringUpdateLog.hbm.xml</mapping-file>
| <mapping-file>org/jbpm/context/log/VariableUpdateLog.hbm.xml</mapping-file>
| <mapping-file>org/jbpm/job/Job.hbm.xml</mapping-file>
| <mapping-file>org/jbpm/job/Timer.hbm.xml</mapping-file>
| <mapping-file>org/jbpm/job/ExecuteNodeJob.hbm.xml</mapping-file>
| <mapping-file>org/jbpm/taskmgmt/exe/TaskMgmtInstance.hbm.xml</mapping-file>
| <mapping-file>org/jbpm/taskmgmt/exe/TaskInstance.hbm.xml</mapping-file>
| <mapping-file>org/jbpm/taskmgmt/exe/PooledActor.hbm.xml</mapping-file>
| <mapping-file>org/jbpm/taskmgmt/exe/SwimlaneInstance.hbm.xml</mapping-file>
| <mapping-file>org/jbpm/graph/action/Script.hbm.xml</mapping-file>
| <mapping-file>org/jbpm/graph/log/ProcessInstanceCreateLog.hbm.xml</mapping-file>
| <mapping-file>org/jbpm/logging/log/MessageLog.hbm.xml</mapping-file>
| <mapping-file>org/jbpm/logging/log/CompositeLog.hbm.xml</mapping-file>
| <mapping-file>org/jbpm/graph/log/ActionLog.hbm.xml</mapping-file>
| <mapping-file>org/jbpm/logging/log/ProcessLog.hbm.xml</mapping-file>
| <mapping-file>org/jbpm/graph/log/NodeLog.hbm.xml</mapping-file>
| <mapping-file>org/jbpm/graph/log/SignalLog.hbm.xml</mapping-file>
| <mapping-file>org/jbpm/graph/log/TransitionLog.hbm.xml</mapping-file>
| <mapping-file>org/jbpm/taskmgmt/log/TaskAssignLog.hbm.xml</mapping-file>
| <mapping-file>org/jbpm/graph/log/ProcessStateLog.hbm.xml</mapping-file>
| <mapping-file>org/jbpm/taskmgmt/log/TaskLog.hbm.xml</mapping-file>
| <mapping-file>org/jbpm/taskmgmt/log/TaskCreateLog.hbm.xml</mapping-file>
|
| <properties>
| <property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect"/>
|
|
|
| <property name="hibernate.ejb.event.post-insert"
| value="org.jboss.envers.event.VersionsEventListener" />
| <property name="hibernate.ejb.event.post-update"
| value="org.jboss.envers.event.VersionsEventListener" />
| <property name="hibernate.ejb.event.post-delete"
| value="org.jboss.envers.event.VersionsEventListener" />
| <property name="hibernate.ejb.event.pre-collection-update"
| value="org.jboss.envers.event.VersionsEventListener" />
| <property name="hibernate.ejb.event.pre-collection-remove"
| value="org.jboss.envers.event.VersionsEventListener" />
| <property name="hibernate.ejb.event.post-collection-recreate"
| value="org.jboss.envers.event.VersionsEventListener" />
| </properties>
|
|
|
| </persistence-unit>
| </persistence>
|
The application server used is Oracle Weblogic v10gR3.
When we try to deploy the application we get the following exception:
####<Jul 28, 2009 9:53:35 PM EEST> <Warning> <Deployer> <athka628apc> <AdminServer> <[ACTIVE] ExecuteThread: '7' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1248807215726> <BEA-149078> <Stack trace for message 149004
| weblogic.application.ModuleException:
| at weblogic.servlet.internal.WebAppModule.prepare(WebAppModule.java:393)
| at weblogic.application.internal.flow.ScopedModuleDriver.prepare(ScopedModuleDriver.java:176)
| at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93)
| at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:387
| )
| at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
| at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:58
| )
| at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:42
| )
| at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:615)
| at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
| at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:191)
| at weblogic.application.internal.SingleModuleDeployment.prepare(SingleModuleDeployment.java:16)
| at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:155)
| at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:60)
| at weblogic.deploy.internal.targetserver.operations.ActivateOperation.createAndPrepareContainer(Act
| ivateOperation.java:197)
| at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doPrepare(ActivateOperation.j
| ava:89)
| at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.jav
| a:217)
| at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManage
| r.java:723)
| at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.
| java:1190)
| at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(DeploymentManager.java:248
| )
| at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(DeploymentServiceDispa
| tcher.java:159)
| at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallb
| ack(DeploymentReceiverCallbackDeliverer.java:157)
| at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$000(Dep
| loymentReceiverCallbackDeliverer.java:12)
| at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$1.run(Deployme
| ntReceiverCallbackDeliverer.java:45)
| at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:516)
| at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
| at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
| org.hibernate.HibernateException: Errors in named queries: JobSession.getFirstDueJob, TaskMgmtSessio
| n.findPooledTaskInstancesByActorId, GraphSession.selectLogsForTokens, GraphSession.findActiveNodesBy
| ProcessInstance, GraphSession.findAllRunningProcessInstances, GraphSession.findTokensForProcessInsta
| nce, JobSession.resumeJobs, TaskMgmtSession.findTaskInstancesByActorId, TaskMgmtSession.findTaskInst
| ancesByTokenId, GraphSession.NumberOfActiveProcessInstances, JobSession.getTimersByName, JobSession.
| findExclusiveJobs, GraphSession.findLatestProcessDefinitionQuery, GraphSession.findAllProcessInstanc
| esForADefinition, TaskMgmtSession.findTaskInstancesByActorIds, LoggingSession.findLogsByToken, Graph
| Session.findAllRunningProcessInstancesWithProcessName, JobSession.getFirstDueJobExlcMonitoredJobs, T
| askMgmtSession.findTaskForNode, TaskMgmtSession.findTaskInstancesByProcessInstance, TaskMgmtSession.
| findOpenTasksOfProcessInstance, GraphSession.findTokensForProcessInNode, GraphSession.findAllProcess
| InstancesWithProcessName, TaskMgmtSession.findTaskInstancesByIds, JobSession.getFirstAcquirableJob,
| GraphSession.findAllProcessDefinitions, GraphSession.findAllProcessDefinitionVersions, JobSession.de
| leteExecuteNodeJobsForProcessInstance, GraphSession.findAllSwimlaneNames, GraphSession.findProcessDe
| finitionByNameAndVersion, GraphSession.calculateAverageTimeByNode, GraphSession.deleteTaskInstancesB
| yId, GraphSession.findTaskInstanceIdsForProcessInstance, GraphSession.deleteJobsForProcessInstance,
| GraphSession.findProcessInstanceByKey, GraphSession.findAllProcessInstances, JobSession.deleteTimers
| ForProcessInstance, GraphSession.AllProcessNames, TaskMgmtSession.findPooledTaskInstancesByActorIds,
| JobSession.suspendJobs, GraphSession.NumberOfDeployedProcesses, GraphSession.findSubProcessInstance
| s, GraphSession.findAllTokensOfProcessInstance
| at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:365)
| at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1300)
| at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:859)
| at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:669)
| at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.
| java:132)
| at weblogic.deployment.PersistenceUnitInfoImpl.createEntityManagerFactory(PersistenceUnitInfoImpl.j
| ava:330)
| at weblogic.deployment.PersistenceUnitInfoImpl.<init>(PersistenceUnitInfoImpl.java:123)
| at weblogic.deployment.AbstractPersistenceUnitRegistry.storeDescriptors(AbstractPersistenceUnitRegi
| stry.java:331)
| at weblogic.deployment.AbstractPersistenceUnitRegistry.loadPersistenceDescriptors(AbstractPersisten
| ceUnitRegistry.java:111)
| at weblogic.deployment.ModulePersistenceUnitRegistry.<init>(ModulePersistenceUnitRegistry.java:58)
| at weblogic.servlet.internal.WebAppModule.setupPersistenceUnitRegistry(WebAppModule.java:1658)
| at weblogic.servlet.internal.WebAppModule.prepare(WebAppModule.java:383)
| at weblogic.application.internal.flow.ScopedModuleDriver.prepare(ScopedModuleDriver.java:176)
| at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93)
| at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:387
| )
| at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
| at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:58
| )
| at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:42
| )
| at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:615)
| at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
| at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:191)
| at weblogic.application.internal.SingleModuleDeployment.prepare(SingleModuleDeployment.java:16)
| at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:155)
| at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:60)
| at weblogic.deploy.internal.targetserver.operations.ActivateOperation.createAndPrepareContainer(Act
| ivateOperation.java:197)
| at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doPrepare(ActivateOperation.j
| ava:89)
| at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.jav
| a:217)
| at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManage
| r.java:723)
| at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.
| java:1190)
| at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(DeploymentManager.java:248
| )
| at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(DeploymentServiceDispa
| tcher.java:159)
| at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallb
| ack(DeploymentReceiverCallbackDeliverer.java:157)
| at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$000(Dep
| loymentReceiverCallbackDeliverer.java:12)
| at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$1.run(Deployme
| ntReceiverCallbackDeliverer.java:45)
| at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:516)
| at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
| at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
| >
Why am I getting the "Errors in named queries" Hibernate exception?
Am I missing something in the syntax of the persistence.xml?
Any ideas on why this problem comes up?
Thanks
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4246690#4246690
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4246690
More information about the jboss-user
mailing list