8 Replies Latest reply on Mar 20, 2012 1:17 AM by wypcy

    eclipse创建的JBPM Project 怎么配置持久层数据库为mysql

    wypcy

           我用eclipse创建了一个jbpm project,工程创建完成后,修改persistence.xml为mysql数据库连接,可以运行的时候报错,输出的sql为能在h2数据库上执行的sql,而不是在mysql上执行的sql。是不是还需要配置其他地方??

           jbpm版本:5.2

           eclipse:3.7,已经集成了5.2需要的插件。

        • 1. Re: eclipse创建的JBPM Project 怎么配置持久层数据库为mysql
          salaboy21

          Can you ask your question in english please?

          Cheers

          • 2. Re: eclipse创建的JBPM Project 怎么配置持久层数据库为mysql

            I think this is saying that you changed persistence.xml to point to mysql but h2 is still used, what else should be changed?

             

            You might want to look at my question:

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

             

            as this includes changes to hibernate.cfg.xml and JBPMorm.xml that others have suggested.  This definitely points things at mysql as I can see the tables being created there.

             

            However you will also see it doesn't work...

            • 3. Re: eclipse创建的JBPM Project 怎么配置持久层数据库为mysql
              wypcy

              Hi,

                  I  am sorry that asking the question with chinese.I worry about i can't descript the question deials with english.
                 next time I will use english.

                  thank you for you notice.

              • 4. Re: eclipse创建的JBPM Project 怎么配置持久层数据库为mysql
                wypcy

                Hi Charman,

                     I am tring with your suggesting.
                     Thanks very much.

                • 5. Re: eclipse创建的JBPM Project 怎么配置持久层数据库为mysql
                  wypcy

                  hi,

                       Thanks for your help, the proble is solved.

                        I create a jbpm.properties file under the resources directory in my jbpm project.

                        But when i run my project, an error has occured,like this:

                      

                  3    17/03 21:45:37,601[main] ERROR drools.persistence.SingleSessionCommandService.rollbackTransaction  - Could not commit session

                  java.lang.IllegalArgumentException: Could not connect task client

                            at org.jbpm.process.workitem.wsht.CommandBasedWSHumanTaskHandler.connect(CommandBasedWSHumanTaskHandler.java:84)

                            at org.jbpm.process.workitem.wsht.CommandBasedWSHumanTaskHandler.executeWorkItem(CommandBasedWSHumanTaskHandler.java:97)

                            at org.drools.persistence.jpa.processinstance.JPAWorkItemManager.internalExecuteWorkItem(JPAWorkItemManager.java:53)

                            at org.jbpm.workflow.instance.node.WorkItemNodeInstance.internalTrigger(WorkItemNodeInstance.java:105)

                            at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:122)

                            at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerConnection(NodeInstanceImpl.java:185)

                            at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:150)

                            at org.jbpm.workflow.instance.node.StartNodeInstance.triggerCompleted(StartNodeInstance.java:49)

                            at org.jbpm.workflow.instance.node.StartNodeInstance.internalTrigger(StartNodeInstance.java:41)

                            at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:122)

                            at org.jbpm.ruleflow.instance.RuleFlowProcessInstance.internalStart(RuleFlowProcessInstance.java:35)

                            at org.jbpm.process.instance.impl.ProcessInstanceImpl.start(ProcessInstanceImpl.java:188)

                            at org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl.start(WorkflowProcessInstanceImpl.java:303)

                            at org.jbpm.process.instance.ProcessRuntimeImpl.startProcessInstance(ProcessRuntimeImpl.java:168)

                            at org.jbpm.process.instance.ProcessRuntimeImpl.startProcess(ProcessRuntimeImpl.java:138)

                            at org.drools.common.AbstractWorkingMemory.startProcess(AbstractWorkingMemory.java:1079)

                            at org.drools.impl.StatefulKnowledgeSessionImpl.startProcess(StatefulKnowledgeSessionImpl.java:306)

                            at org.drools.command.runtime.process.StartProcessCommand.execute(StartProcessCommand.java:119)

                            at org.drools.command.runtime.process.StartProcessCommand.execute(StartProcessCommand.java:38)

                            at org.drools.command.impl.DefaultCommandService.execute(DefaultCommandService.java:36)

                            at org.drools.persistence.SingleSessionCommandService.execute(SingleSessionCommandService.java:345)

                            at org.drools.command.impl.CommandBasedStatefulKnowledgeSession.startProcess(CommandBasedStatefulKnowledgeSession.java:223)

                            at org.drools.command.impl.CommandBasedStatefulKnowledgeSession.startProcess(CommandBasedStatefulKnowledgeSession.java:214)

                            at com.sample.ProcessMain.main(ProcessMain.java:22)

                  • 6. Re: eclipse创建的JBPM Project 怎么配置持久层数据库为mysql

                    Hi

                     

                    I'm guessing you have a human task in your flow.  I get a similar error when I go into JBPM console for the first time, when it builds the task list.

                     

                    It may be good for you to post more details about your flow and configuration. I'm afraid I'm unlikely to be able to help in any case.

                     

                    Can you see your process in JBPM console process pane?

                     

                    Regards

                     

                    Tim

                    • 7. Re: eclipse创建的JBPM Project 怎么配置持久层数据库为mysql
                      jimmy.dongjia

                      5.2支持mysql很容易的,在db目录下有个jBPM-ds.xml,改成mysql的数据源,再添加好驱动,执行ant install.demo就OK了,最后task-service\resources\META-INF下面的persistence.xml在修改一下就可以了/

                      • 8. Re: eclipse创建的JBPM Project 怎么配置持久层数据库为mysql
                        wypcy

                        你好,

                             刚开始接触jbpm,这个东东折腾我了好长时间,还好现在已经搞清楚了。只是其他方面的东西还不太了解。