1 2 Previous Next 23 Replies Latest reply on Mar 17, 2014 1:00 AM by guyr

    Issue running sample project - jBPM 6.0.1 Final

    mbaldwin

      I installed jBPM using "ant install.demo".  The installation appeared to work and I am able to start everything via "ant start.demo".  However, when I load the sample project into eclipse and run "com.sample.ProcessTest" as a JUnit test, I receive the following error.  Does anyone know what might be going on, or what I can try to do to discover what went wrong?

       

      Stack Trace:

      2014-02-06 14:44:54,208 [main] ERROR Thu Feb 06 14:44:54 EST 2014: Error when creating task on task server for work item id 1. Error reported by task server: Unknown entity: org.jbpm.services.task.audit.TaskEventImpl

      java.lang.IllegalArgumentException: Unknown entity: org.jbpm.services.task.audit.TaskEventImpl

        at org.hibernate.ejb.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:878) ~[hibernate-entitymanager-4.2.0.SP1.jar:4.2.0.SP1]

        at org.jbpm.services.task.persistence.JPATaskPersistenceContext.persist(JPATaskPersistenceContext.java:450) ~[jbpm-human-task-core-6.0.1.Final.jar:6.0.1.Final]

        at org.jbpm.services.task.audit.JPATaskLifeCycleEventListener.afterTaskAddedEvent(JPATaskLifeCycleEventListener.java:109) ~[jbpm-human-task-audit-6.0.1.Final.jar:6.0.1.Final]

        at org.jbpm.services.task.events.TaskEventSupport.fireAfterTaskAdded(TaskEventSupport.java:207) ~[jbpm-human-task-core-6.0.1.Final.jar:6.0.1.Final]

        at org.jbpm.services.task.impl.TaskInstanceServiceImpl.addTask(TaskInstanceServiceImpl.java:104) ~[jbpm-human-task-core-6.0.1.Final.jar:6.0.1.Final]

        at org.jbpm.services.task.commands.AddTaskCommand.execute(AddTaskCommand.java:105) ~[jbpm-human-task-core-6.0.1.Final.jar:6.0.1.Final]

        at org.jbpm.services.task.commands.AddTaskCommand.execute(AddTaskCommand.java:53) ~[jbpm-human-task-core-6.0.1.Final.jar:6.0.1.Final]

        at org.jbpm.services.task.commands.TaskCommandExecutorImpl$SelfExecutionCommandService.execute(TaskCommandExecutorImpl.java:65) ~[jbpm-human-task-core-6.0.1.Final.jar:6.0.1.Final]

        at org.drools.core.command.impl.AbstractInterceptor.executeNext(AbstractInterceptor.java:41) [drools-core-6.0.1.Final.jar:6.0.1.Final]

        at org.jbpm.services.task.persistence.TaskTransactionInterceptor.execute(TaskTransactionInterceptor.java:53) ~[jbpm-human-task-core-6.0.1.Final.jar:6.0.1.Final]

        at org.jbpm.services.task.commands.TaskCommandExecutorImpl.execute(TaskCommandExecutorImpl.java:40) ~[jbpm-human-task-core-6.0.1.Final.jar:6.0.1.Final]

        at org.jbpm.services.task.impl.command.CommandBasedTaskService.addTask(CommandBasedTaskService.java:471) ~[jbpm-human-task-core-6.0.1.Final.jar:6.0.1.Final]

        at org.jbpm.runtime.manager.impl.task.SynchronizedTaskService.addTask(SynchronizedTaskService.java:456) ~[jbpm-runtime-manager-6.0.1.Final.jar:6.0.1.Final]

        at org.jbpm.services.task.wih.LocalHTWorkItemHandler.executeWorkItem(LocalHTWorkItemHandler.java:60) ~[jbpm-human-task-workitems-6.0.1.Final.jar:6.0.1.Final]

        at org.drools.persistence.jpa.processinstance.JPAWorkItemManager.internalExecuteWorkItem(JPAWorkItemManager.java:56) [drools-persistence-jpa-6.0.1.Final.jar:6.0.1.Final]

        at org.jbpm.workflow.instance.node.WorkItemNodeInstance.internalTrigger(WorkItemNodeInstance.java:124) [jbpm-flow-6.0.1.Final.jar:6.0.1.Final]

        at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:155) [jbpm-flow-6.0.1.Final.jar:6.0.1.Final]

        at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerNodeInstance(NodeInstanceImpl.java:337) [jbpm-flow-6.0.1.Final.jar:6.0.1.Final]

        at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:296) [jbpm-flow-6.0.1.Final.jar:6.0.1.Final]

        at org.jbpm.workflow.instance.node.StartNodeInstance.triggerCompleted(StartNodeInstance.java:66) [jbpm-flow-6.0.1.Final.jar:6.0.1.Final]

        at org.jbpm.workflow.instance.node.StartNodeInstance.internalTrigger(StartNodeInstance.java:43) [jbpm-flow-6.0.1.Final.jar:6.0.1.Final]

        at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:155) [jbpm-flow-6.0.1.Final.jar:6.0.1.Final]

        at org.jbpm.ruleflow.instance.RuleFlowProcessInstance.internalStart(RuleFlowProcessInstance.java:35) [jbpm-flow-6.0.1.Final.jar:6.0.1.Final]

        at org.jbpm.process.instance.impl.ProcessInstanceImpl.start(ProcessInstanceImpl.java:222) [jbpm-flow-6.0.1.Final.jar:6.0.1.Final]

        at org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl.start(WorkflowProcessInstanceImpl.java:358) [jbpm-flow-6.0.1.Final.jar:6.0.1.Final]

        at org.jbpm.process.instance.ProcessRuntimeImpl.startProcessInstance(ProcessRuntimeImpl.java:189) [jbpm-flow-6.0.1.Final.jar:6.0.1.Final]

        at org.jbpm.process.instance.ProcessRuntimeImpl.startProcess(ProcessRuntimeImpl.java:171) [jbpm-flow-6.0.1.Final.jar:6.0.1.Final]

        at org.drools.core.common.AbstractWorkingMemory.startProcess(AbstractWorkingMemory.java:1580) [drools-core-6.0.1.Final.jar:6.0.1.Final]

        at org.drools.core.impl.StatefulKnowledgeSessionImpl.startProcess(StatefulKnowledgeSessionImpl.java:366) [drools-core-6.0.1.Final.jar:6.0.1.Final]

        at org.drools.core.command.runtime.process.StartProcessCommand.execute(StartProcessCommand.java:121) [drools-core-6.0.1.Final.jar:6.0.1.Final]

        at org.drools.core.command.runtime.process.StartProcessCommand.execute(StartProcessCommand.java:40) [drools-core-6.0.1.Final.jar:6.0.1.Final]

        at org.drools.core.command.impl.DefaultCommandService.execute(DefaultCommandService.java:36) [drools-core-6.0.1.Final.jar:6.0.1.Final]

        at org.drools.core.command.impl.AbstractInterceptor.executeNext(AbstractInterceptor.java:41) [drools-core-6.0.1.Final.jar:6.0.1.Final]

        at org.drools.persistence.SingleSessionCommandService$TransactionInterceptor.execute(SingleSessionCommandService.java:527) [drools-persistence-jpa-6.0.1.Final.jar:6.0.1.Final]

        at org.drools.core.command.impl.AbstractInterceptor.executeNext(AbstractInterceptor.java:41) [drools-core-6.0.1.Final.jar:6.0.1.Final]

        at org.drools.persistence.jpa.OptimisticLockRetryInterceptor.execute(OptimisticLockRetryInterceptor.java:73) [drools-persistence-jpa-6.0.1.Final.jar:6.0.1.Final]

        at org.drools.persistence.SingleSessionCommandService.execute(SingleSessionCommandService.java:375) [drools-persistence-jpa-6.0.1.Final.jar:6.0.1.Final]

        at org.drools.core.command.impl.CommandBasedStatefulKnowledgeSession.startProcess(CommandBasedStatefulKnowledgeSession.java:232) [drools-core-6.0.1.Final.jar:6.0.1.Final]

        at com.sample.ProcessTest.testEvaluationProcess(ProcessTest.java:37) [bin/:na]

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.6.0_45]

        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:1.6.0_45]

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.6.0_45]

        at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.6.0_45]

        at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) [junit.jar:na]

        at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) [junit.jar:na]

        at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) [junit.jar:na]

        at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) [junit.jar:na]

        at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) [junit.jar:na]

        at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) [junit.jar:na]

        at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271) [junit.jar:na]

        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70) [junit.jar:na]

        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) [junit.jar:na]

        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) [junit.jar:na]

        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) [junit.jar:na]

        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) [junit.jar:na]

        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) [junit.jar:na]

        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) [junit.jar:na]

        at org.junit.runners.ParentRunner.run(ParentRunner.java:309) [junit.jar:na]

        at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50) [.cp/:na]

        at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) [.cp/:na]

        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) [.cp/:na]

        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) [.cp/:na]

        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) [.cp/:na]

        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) [.cp/:na]

       

      Thank you

        • 1. Re: Issue running sample project - jBPM 6.0.1 Final
          swiderski.maciej

          looks like you're missing class definition in persistence.xml for org.jbpm.services.task.audit.TaskEventImpl. Please check persistence.xml that is inside jbpm-console.war/WEB-INF/classes/META-INF and see if there is such entity defined there, if not add following:

          <class>org.jbpm.services.task.audit.TaskEventImpl</class>

           

          and that should solve the issue.

           

          HTH

          • 2. Re: Re: Issue running sample project - jBPM 6.0.1 Final
            icarusdb

            Hi Maciej

             

            I run into the same problem

            I edited and add the class definition in persistence.xml

             

            <?xml version="1.0" encoding="UTF-8"?>
            <persistence version="2.0"
              xmlns="http://java.sun.com/xml/ns/persistence" 
              xmlns:orm="http://java.sun.com/xml/ns/persistence/orm"
              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_2_0.xsd http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm_2_0.xsd">
            
            
              <persistence-unit name="org.jbpm.domain" transaction-type="JTA">
                <provider>org.hibernate.ejb.HibernatePersistence</provider>
                <jta-data-source>java:jboss/datasources/jbpmDS</jta-data-source>
                <mapping-file>META-INF/Taskorm.xml</mapping-file>
                <mapping-file>META-INF/JBPMorm.xml</mapping-file>
                <mapping-file>META-INF/Executor-orm.xml</mapping-file>
                <mapping-file>META-INF/Servicesorm.xml</mapping-file>
                <mapping-file>META-INF/TaskAuditorm.xml</mapping-file>
                
                <class>org.jbpm.services.task.impl.model.AttachmentImpl</class>
                <class>org.jbpm.services.task.impl.model.ContentImpl</class>
                <class>org.jbpm.services.task.impl.model.BooleanExpressionImpl</class>
                <class>org.jbpm.services.task.impl.model.CommentImpl</class>
                <class>org.jbpm.services.task.impl.model.DeadlineImpl</class>
                <class>org.jbpm.services.task.impl.model.CommentImpl</class>
                <class>org.jbpm.services.task.impl.model.DeadlineImpl</class>
                <class>org.jbpm.services.task.impl.model.DelegationImpl</class>
                <class>org.jbpm.services.task.impl.model.EscalationImpl</class>
                <class>org.jbpm.services.task.impl.model.GroupImpl</class>
                <class>org.jbpm.services.task.impl.model.I18NTextImpl</class>
                <class>org.jbpm.services.task.impl.model.NotificationImpl</class>
                <class>org.jbpm.services.task.impl.model.EmailNotificationImpl</class>
                <class>org.jbpm.services.task.impl.model.EmailNotificationHeaderImpl</class>
                <class>org.jbpm.services.task.impl.model.PeopleAssignmentsImpl</class>
                <class>org.jbpm.services.task.impl.model.ReassignmentImpl</class>
                <class>org.jbpm.services.task.impl.model.TaskImpl</class>
                <class>org.jbpm.services.task.impl.model.TaskDefImpl</class>
                <class>org.jbpm.services.task.impl.model.TaskDataImpl</class>
                <class>org.jbpm.services.task.audit.TaskEventImpl</class>
                <class>org.jbpm.services.task.impl.model.UserImpl</class>
                <class>org.jbpm.executor.entities.ErrorInfo</class>
                <class>org.jbpm.executor.entities.RequestInfo</class>
                
                <!--BAM for task service -->
                <class>org.jbpm.services.task.impl.model.BAMTaskSummaryImpl</class>
                <!-- Event Classes -->
                <class>org.jbpm.services.task.audit.TaskEventImpl</class>
                
                <class>org.drools.persistence.info.SessionInfo</class>
                <class>org.jbpm.persistence.processinstance.ProcessInstanceInfo</class>
                <class>org.drools.persistence.info.WorkItemInfo</class>
                <class>org.jbpm.persistence.correlation.CorrelationKeyInfo</class>
                <class>org.jbpm.persistence.correlation.CorrelationPropertyInfo</class>
                <!-- manager -->
                <class>org.jbpm.runtime.manager.impl.jpa.ContextMappingInfo</class>
                
                <!-- bam -->
                <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.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" />      
                  <!-- BZ 841786: AS7/EAP 6/Hib 4 uses new (sequence) generators which seem to cause problems -->
                  <property name="hibernate.id.new_generator_mappings" value="false" />
                  <property name="hibernate.transaction.jta.platform" value="org.hibernate.service.jta.platform.internal.JBossAppServerJtaPlatform" />
                </properties>
              </persistence-unit>
            
            
            </persistence>
            

             

            restarted jboss but the same problem again

             

            2014-02-07 07:43:35,684 [main] ERROR Fri Feb 07 07:43:35 PYST 2014: Error when creating task on task server for work item id 1. Error reported by task server: Unknown entity: org.jbpm.services.task.audit.TaskEventImpl
            java.lang.IllegalArgumentException: Unknown entity: org.jbpm.services.task.audit.TaskEventImpl
              at org.hibernate.ejb.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:878) ~[hibernate-entitymanager-4.2.0.SP1.jar:4.2.0.SP1]
              at org.jbpm.services.task.persistence.JPATaskPersistenceContext.persist(JPATaskPersistenceContext.java:450) ~[jbpm-human-task-core-6.0.1.Final.jar:6.0.1.Final]
              at org.jbpm.services.task.audit.JPATaskLifeCycleEventListener.afterTaskAddedEvent(JPATaskLifeCycleEventListener.java:109) ~[jbpm-human-task-audit-6.0.1.Final.jar:6.0.1.Final]
              at org.jbpm.services.task.events.TaskEventSupport.fireAfterTaskAdded(TaskEventSupport.java:207) ~[jbpm-human-task-core-6.0.1.Final.jar:6.0.1.Final]
              at org.jbpm.services.task.impl.TaskInstanceServiceImpl.addTask(TaskInstanceServiceImpl.java:104) ~[jbpm-human-task-core-6.0.1.Final.jar:6.0.1.Final]
              at org.jbpm.services.task.commands.AddTaskCommand.execute(AddTaskCommand.java:105) ~[jbpm-human-task-core-6.0.1.Final.jar:6.0.1.Final]
              at org.jbpm.services.task.commands.AddTaskCommand.execute(AddTaskCommand.java:53) ~[jbpm-human-task-core-6.0.1.Final.jar:6.0.1.Final]
              at org.jbpm.services.task.commands.TaskCommandExecutorImpl$SelfExecutionCommandService.execute(TaskCommandExecutorImpl.java:65) ~[jbpm-human-task-core-6.0.1.Final.jar:6.0.1.Final]
              at org.drools.core.command.impl.AbstractInterceptor.executeNext(AbstractInterceptor.java:41) [drools-core-6.0.1.Final.jar:6.0.1.Final]
              at org.jbpm.services.task.persistence.TaskTransactionInterceptor.execute(TaskTransactionInterceptor.java:53) ~[jbpm-human-task-core-6.0.1.Final.jar:6.0.1.Final]
              at org.jbpm.services.task.commands.TaskCommandExecutorImpl.execute(TaskCommandExecutorImpl.java:40) ~[jbpm-human-task-core-6.0.1.Final.jar:6.0.1.Final]
              at org.jbpm.services.task.impl.command.CommandBasedTaskService.addTask(CommandBasedTaskService.java:471) ~[jbpm-human-task-core-6.0.1.Final.jar:6.0.1.Final]
              at org.jbpm.runtime.manager.impl.task.SynchronizedTaskService.addTask(SynchronizedTaskService.java:456) ~[jbpm-runtime-manager-6.0.1.Final.jar:6.0.1.Final]
              at org.jbpm.services.task.wih.LocalHTWorkItemHandler.executeWorkItem(LocalHTWorkItemHandler.java:60) ~[jbpm-human-task-workitems-6.0.1.Final.jar:6.0.1.Final]
              at org.drools.persistence.jpa.processinstance.JPAWorkItemManager.internalExecuteWorkItem(JPAWorkItemManager.java:56) [drools-persistence-jpa-6.0.1.Final.jar:6.0.1.Final]
              at org.jbpm.workflow.instance.node.WorkItemNodeInstance.internalTrigger(WorkItemNodeInstance.java:124) [jbpm-flow-6.0.1.Final.jar:6.0.1.Final]
              at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:155) [jbpm-flow-6.0.1.Final.jar:6.0.1.Final]
              at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerNodeInstance(NodeInstanceImpl.java:337) [jbpm-flow-6.0.1.Final.jar:6.0.1.Final]
              at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:296) [jbpm-flow-6.0.1.Final.jar:6.0.1.Final]
              at org.jbpm.workflow.instance.node.StartNodeInstance.triggerCompleted(StartNodeInstance.java:66) [jbpm-flow-6.0.1.Final.jar:6.0.1.Final]
              at org.jbpm.workflow.instance.node.StartNodeInstance.internalTrigger(StartNodeInstance.java:43) [jbpm-flow-6.0.1.Final.jar:6.0.1.Final]
              at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:155) [jbpm-flow-6.0.1.Final.jar:6.0.1.Final]
              at org.jbpm.ruleflow.instance.RuleFlowProcessInstance.internalStart(RuleFlowProcessInstance.java:35) [jbpm-flow-6.0.1.Final.jar:6.0.1.Final]
              at org.jbpm.process.instance.impl.ProcessInstanceImpl.start(ProcessInstanceImpl.java:222) [jbpm-flow-6.0.1.Final.jar:6.0.1.Final]
              at org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl.start(WorkflowProcessInstanceImpl.java:358) [jbpm-flow-6.0.1.Final.jar:6.0.1.Final]
              at org.jbpm.process.instance.ProcessRuntimeImpl.startProcessInstance(ProcessRuntimeImpl.java:189) [jbpm-flow-6.0.1.Final.jar:6.0.1.Final]
              at org.jbpm.process.instance.ProcessRuntimeImpl.startProcess(ProcessRuntimeImpl.java:171) [jbpm-flow-6.0.1.Final.jar:6.0.1.Final]
              at org.drools.core.common.AbstractWorkingMemory.startProcess(AbstractWorkingMemory.java:1580) [drools-core-6.0.1.Final.jar:6.0.1.Final]
              at org.drools.core.impl.StatefulKnowledgeSessionImpl.startProcess(StatefulKnowledgeSessionImpl.java:366) [drools-core-6.0.1.Final.jar:6.0.1.Final]
              at org.drools.core.command.runtime.process.StartProcessCommand.execute(StartProcessCommand.java:121) [drools-core-6.0.1.Final.jar:6.0.1.Final]
              at org.drools.core.command.runtime.process.StartProcessCommand.execute(StartProcessCommand.java:40) [drools-core-6.0.1.Final.jar:6.0.1.Final]
              at org.drools.core.command.impl.DefaultCommandService.execute(DefaultCommandService.java:36) [drools-core-6.0.1.Final.jar:6.0.1.Final]
              at org.drools.core.command.impl.AbstractInterceptor.executeNext(AbstractInterceptor.java:41) [drools-core-6.0.1.Final.jar:6.0.1.Final]
              at org.drools.persistence.SingleSessionCommandService$TransactionInterceptor.execute(SingleSessionCommandService.java:527) [drools-persistence-jpa-6.0.1.Final.jar:6.0.1.Final]
              at org.drools.core.command.impl.AbstractInterceptor.executeNext(AbstractInterceptor.java:41) [drools-core-6.0.1.Final.jar:6.0.1.Final]
              at org.drools.persistence.jpa.OptimisticLockRetryInterceptor.execute(OptimisticLockRetryInterceptor.java:73) [drools-persistence-jpa-6.0.1.Final.jar:6.0.1.Final]
              at org.drools.persistence.SingleSessionCommandService.execute(SingleSessionCommandService.java:375) [drools-persistence-jpa-6.0.1.Final.jar:6.0.1.Final]
              at org.drools.core.command.impl.CommandBasedStatefulKnowledgeSession.startProcess(CommandBasedStatefulKnowledgeSession.java:232) [drools-core-6.0.1.Final.jar:6.0.1.Final]
              at com.sample.ProcessTest.testEvaluationProcess(ProcessTest.java:37) [bin/:na]
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_51]
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_51]
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_51]
              at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_51]
              at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) [junit.jar:na]
              at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) [junit.jar:na]
              at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) [junit.jar:na]
              at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) [junit.jar:na]
              at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) [junit.jar:na]
              at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) [junit.jar:na]
              at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271) [junit.jar:na]
              at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70) [junit.jar:na]
              at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) [junit.jar:na]
              at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) [junit.jar:na]
              at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) [junit.jar:na]
              at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) [junit.jar:na]
              at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) [junit.jar:na]
              at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) [junit.jar:na]
              at org.junit.runners.ParentRunner.run(ParentRunner.java:309) [junit.jar:na]
              at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50) [.cp/:na]
              at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) [.cp/:na]
              at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) [.cp/:na]
              at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) [.cp/:na]
              at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) [.cp/:na]
              at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) [.cp/:na]
            
            • 3. Re: Issue running sample project - jBPM 6.0.1 Final
              mbaldwin

              Maciej,

              That class is defined in the persistance.xml of jbpm-console.war.  However, I did find that the JBOSS deployments directory also had a "jbpm-console.war.failed" file which contained the following error:

               

              {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"jbpm-console.war\".WeldService" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"jbpm-console.war\".WeldService: org.jboss.weld.exceptions.DeploymentException: Exception List with 1 exceptions:

              Exception 0 :

              org.jboss.weld.exceptions.WeldException: WELD-000049 Unable to invoke [method] @PostConstruct public org.kie.workbench.backend.AppSetup.assertPlayground() on org.kie.workbench.backend.AppSetup@3018e693

                at org.jboss.weld.bean.AbstractClassBean.defaultPostConstruct(AbstractClassBean.java:518)

                at org.jboss.weld.bean.ManagedBean$ManagedBeanInjectionTarget.postConstruct(ManagedBean.java:174)

                at org.jboss.weld.bean.ManagedBean.create(ManagedBean.java:291)

                at org.jboss.weld.context.AbstractContext.get(AbstractContext.java:107)

                at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:90)

                at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:79)

                at org.kie.workbench.backend.AppSetup$Proxy$_$$_WeldClientProxy.toString(AppSetup$Proxy$_$$_WeldClientProxy.java)

                at org.uberfire.commons.services.cdi.StartupBeanExtension.runPostConstruct(StartupBeanExtension.java:83)

                at org.uberfire.commons.services.cdi.StartupBeanExtension.afterDeploymentValidation(StartupBeanExtension.java:67)

                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.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:264)

                at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:52)

                at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:137)

                at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:260)

                at org.jboss.weld.introspector.jlr.WeldMethodImpl.invokeOnInstance(WeldMethodImpl.java:170)

                at org.jboss.weld.introspector.ForwardingWeldMethod.invokeOnInstance(ForwardingWeldMethod.java:51)

                at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:154)

                at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:241)

                at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:229)

                at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:207)

                at org.jboss.weld.bootstrap.events.AbstractContainerEvent.fire(AbstractContainerEvent.java:75)

                at org.jboss.weld.bootstrap.events.AbstractDeploymentContainerEvent.fire(AbstractDeploymentContainerEvent.java:46)

                at org.jboss.weld.bootstrap.events.AfterDeploymentValidationImpl.fire(AfterDeploymentValidationImpl.java:31)

                at org.jboss.weld.bootstrap.WeldBootstrap.validateBeans(WeldBootstrap.java:369)

                at org.jboss.as.weld.WeldContainer.start(WeldContainer.java:83)

                at org.jboss.as.weld.services.WeldService.start(WeldService.java:76)

                at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)

                at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)

                at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

                at java.lang.Thread.run(Thread.java:662)

              Caused by: java.lang.reflect.InvocationTargetException

                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.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:264)

                at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:52)

                at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:137)

                at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:260)

                at org.jboss.weld.introspector.jlr.WeldMethodImpl.invoke(WeldMethodImpl.java:174)

                at org.jboss.weld.bean.AbstractClassBean.defaultPostConstruct(AbstractClassBean.java:516)

                ... 33 more

              Caused by: java.lang.NullPointerException

                at org.uberfire.backend.server.organizationalunit.OrganizationalUnitServiceImpl.addRepository(OrganizationalUnitServiceImpl.java:149)

                at org.uberfire.backend.server.organizationalunit.OrganizationalUnitServiceImpl$Proxy$_$$_WeldClientProxy.addRepository(OrganizationalUnitServiceImpl$Proxy$_$$_WeldClientProxy.java)

                at org.jbpm.console.ng.bd.backend.server.AdministrationServiceImpl.bootstrapRepository(AdministrationServiceImpl.java:149)

                at org.jbpm.console.ng.bd.backend.server.AdministrationServiceImpl$Proxy$_$$_WeldClientProxy.bootstrapRepository(AdministrationServiceImpl$Proxy$_$$_WeldClientProxy.java)

                at org.kie.workbench.backend.AppSetup.assertPlayground(AppSetup.java:102)

                ... 43 more

              "}}}}

              • 4. Re: Issue running sample project - jBPM 6.0.1 Final
                suraj.bahl.50

                I was having same issue then i moved to version 6.0 and it is working fine, may be that can help you guys...

                1 of 1 people found this helpful
                • 5. Re: Issue running sample project - jBPM 6.0.1 Final
                  swiderski.maciej

                  looks like your .niogit got corrupted, could you try to remove the .niogit folder from jboss_home/bin and try restarting the server? Make sure you rename the jbpm-console.war.failed to jbpm-console.war.dodeploy to ensure the app will be deployed.

                   

                  HTH

                  • 6. Re: Issue running sample project - jBPM 6.0.1 Final
                    swiderski.maciej

                    this somehow means it still does not see the class being declared as entity, might be that persistence.xml you modified was not the one read by server. Try renaming the persistence unit you use as there might be another that is getting in the way - like one from jbpm-test jar.

                     

                    HTH

                    • 7. Re: Re: Issue running sample project - jBPM 6.0.1 Final
                      clay_ferguson

                      I spent about one whole day trying the various fixes (changing persistence.xml, or switching own to Java6, etc.) Nothing works.  The truth is really that jBPM 6.0.1-Final is broken.  When I downloaded jBPM 6.0.0-Final it works fine.  So the solution for end users is just use version 6.0.0, and the code contributors to the jBPM project need to be aware that they have a bug in 6.0.1-Final that completely disables running the one test case they have.

                       

                      Summary: People should use 6.0.0 until 6.0.1 is patched or 6.0.2 is released with a fix.

                      1 of 1 people found this helpful
                      • 8. Re: Issue running sample project - jBPM 6.0.1 Final
                        swiderski.maciej

                        Clay, could you provide a mavenized project that illustrates the issue?

                        • 9. Re: Issue running sample project - jBPM 6.0.1 Final
                          mbaldwin

                          Maciej:

                          I do not appear to have a .niogit folder in the JBOSS bin directory for the 6.0.1 demo install.  In addition, I did not modify persistance.xml, the line you mentioned previously already existed in it.

                           

                          Clay and Suraj:

                          Thanks for the suggestion for 6.0.  I haven't tried it yet but I did end up trying version 5.4 and I was able to get that to work.  I will attempt 6.0 later though and let you know if it works for me however.

                          • 10. Re: Issue running sample project - jBPM 6.0.1 Final
                            suraj.bahl.50

                            Hi Guys,

                             

                            I am having an issue with Jbpm 6 mentioned in below post, can someone please take a look and advise? it is urgent i need to submit my poc for jbpm6 by tomorrow....

                             

                            https://community.jboss.org/thread/236999

                            • 11. Re: Issue running sample project - jBPM 6.0.1 Final
                              swiderski.maciej

                              just installed and executed few human task processes on jbpm-console and then realized you run into problem with invoking of processes from within eclipse... anyway it was good to try out the 6.0.1 jbpm console to verify that too (once again).

                               

                              Then the problem you might be running into is due to the jbpm-test.jar that provides test support for running jbpm. If you have that on your classpath it will provide persistence.xml as well which does not have the org.jbpm.services.task.audit.TaskEventImpl entity declared in it. So to overcome this problem:

                              • use your own persistence.xml
                              • create EntityManagerFactory prior to creating RuntimeManager
                              • set this entity manager factory on RuntimeEnvironmentBuilder

                              with that you can be sure it will use properly configured persistence.xml with all classes defined.

                               

                              If you like, please attach a sample project and I can help with fixing this as an example.

                               

                              HTH

                              • 12. Re: Issue running sample project - jBPM 6.0.1 Final
                                clay_ferguson

                                Yes I was running inside Eclipse.  So you may have found the problem, but I noticed the pereistence.xml in jbpm-console.jar was identical in both 6.0.0 and 6.0.1 versions, which was a little confusing when I checked that.  Because 6.0.0 works and 6.0.1 doesn't.

                                 

                                Also I'm not sure how to "use my own" persistence.xml.  Can you be more specific ?  All I'm trying to do is get the sample ProcessTest.java that comes with 6.0.1-Final distro to run in eclipse.  Can you provide the steps just to patch that?  I don't have my own project yet.  I'm just trying to get the sample code directly from the jBPM to run in eclipse.

                                 

                                Also, this is a related issue, but I never (after two days of looking) figured out how to attach the source to eclipse either.  I downloaded the jBPM source, but have no idea how to hook it into eclipse, because the jBPM Library is locked down as non-modifiable, and so normal way of attaching source to a JAR can't be done. I posted a separate jBOSS community thread for that already also.  Thanks so much in advance for any help you can provide.

                                • 13. Re: Re: Issue running sample project - jBPM 6.0.1 Final
                                  swiderski.maciej

                                  Clay,

                                   

                                  here is what you need to do:

                                  1. use this persistence.xml - simply copy it into src/main/resources/META-INF

                                  <persistence 
                                    version="2.0"
                                    xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd
                                                        http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm_2_0.xsd"
                                    xmlns:orm="http://java.sun.com/xml/ns/persistence/orm"
                                    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                    xmlns="http://java.sun.com/xml/ns/persistence">
                                  
                                    <persistence-unit name="org.jbpm.persistence.jpa.updated" transaction-type="JTA">
                                      <provider>org.hibernate.ejb.HibernatePersistence</provider>
                                      <jta-data-source>jdbc/jbpm-ds</jta-data-source>        
                                      
                                      <mapping-file>META-INF/JBPMorm.xml</mapping-file>
                                      <mapping-file>META-INF/Taskorm.xml</mapping-file>
                                      <mapping-file>META-INF/TaskAuditorm.xml</mapping-file>
                                      
                                      <class>org.jbpm.persistence.processinstance.ProcessInstanceInfo</class>
                                      <class>org.drools.persistence.info.SessionInfo</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>
                                      
                                      <class>org.jbpm.persistence.correlation.CorrelationKeyInfo</class>
                                      <class>org.jbpm.persistence.correlation.CorrelationPropertyInfo</class>
                                      
                                      <!-- manager -->
                                      <class>org.jbpm.runtime.manager.impl.jpa.ContextMappingInfo</class>
                                      
                                      <class>org.jbpm.services.task.impl.model.AttachmentImpl</class>
                                      <class>org.jbpm.services.task.impl.model.ContentImpl</class>
                                      <class>org.jbpm.services.task.impl.model.BooleanExpressionImpl</class>
                                      <class>org.jbpm.services.task.impl.model.CommentImpl</class>
                                      <class>org.jbpm.services.task.impl.model.DeadlineImpl</class>
                                      <class>org.jbpm.services.task.impl.model.CommentImpl</class>
                                      <class>org.jbpm.services.task.impl.model.DeadlineImpl</class>
                                      <class>org.jbpm.services.task.impl.model.DelegationImpl</class>
                                      <class>org.jbpm.services.task.impl.model.EscalationImpl</class>
                                      <class>org.jbpm.services.task.impl.model.GroupImpl</class>
                                      <class>org.jbpm.services.task.impl.model.I18NTextImpl</class>
                                      <class>org.jbpm.services.task.impl.model.NotificationImpl</class>
                                      <class>org.jbpm.services.task.impl.model.EmailNotificationImpl</class>
                                      <class>org.jbpm.services.task.impl.model.EmailNotificationHeaderImpl</class>
                                      <class>org.jbpm.services.task.impl.model.PeopleAssignmentsImpl</class>
                                      <class>org.jbpm.services.task.impl.model.ReassignmentImpl</class>
                                      
                                      <class>org.jbpm.services.task.impl.model.TaskImpl</class>
                                      <class>org.jbpm.services.task.impl.model.TaskDataImpl</class>
                                      <class>org.jbpm.services.task.impl.model.UserImpl</class>
                                      
                                      <class>org.jbpm.services.task.audit.TaskEventImpl</class>
                                      
                                      <!--BAM for task service -->
                                      <class>org.jbpm.services.task.impl.model.BAMTaskSummaryImpl</class>
                                      
                                      
                                      <properties>
                                        <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.dialect" value="org.hibernate.dialect.H2Dialect"/>
                                  
                                        <!-- BZ 841786: AS7/EAP 6/Hib 4 uses new (sequence) generators which seem to cause problems -->      
                                        <property name="hibernate.id.new_generator_mappings" value="false" />            
                                  
                                        <property name="hibernate.transaction.jta.platform" value="org.hibernate.service.jta.platform.internal.BitronixJtaPlatform" />
                                      </properties>        
                                    </persistence-unit>
                                      
                                  </persistence>
                                  
                                  
                                  

                                  please note the name of persistence unit name: org.jbpm.persistence.jpa.updated

                                   

                                  2. then use this name of persistence unit in the ProcessMain class constructor like this:

                                  public ProcessTest() {
                                    super(true, true, "org.jbpm.persistence.jpa.updated");
                                  }
                                  

                                  and that should be all you need for 6.0.1 to make it to work.

                                   

                                  HTH

                                  • 14. Re: Re: Issue running sample project - jBPM 6.0.1 Final
                                    clay_ferguson

                                    Maciej, That worked perfectly!  Thank you for such rapid responses too!


                                    Note to everyone: Warning about Maven cache...  I have always had to delete my maven cache (.m2 folder) when switching back and forth from 6.0.0-Final to 6.0.1-Final, but I don't expect to need to downgrade again.  Just sharing what I learned.

                                     

                                    I think this question can be flagged as "Answered" now, but I'm not sure how, other than to up-vote Maciej's posts.

                                    1 2 Previous Next