4 Replies Latest reply on Jul 11, 2008 1:25 AM by music123

    Need steps to deploy BPEL in MySQL

    music123

      Hi,
      I am new to JBPM. I need to create a sample web application using JBPM workflow.

      Sample application needs to be created in both jPdl and BPEL languages with MySQL as database.I configured jPdl with MySQL.

      Problem in jPdl:

      I tried to deploy a processdefinition.xml file from servlet. If i am giving the processdefinition file as string then its working fine.

      ProcessDefinition processDefinition = ProcessDefinition.parseXmlString(
      "<process-definition name='the baby process'>" +
      " <start-state>" +
      " " +
      " </start-state>" +
      " <task-node name='t'>" +
      " " +
      " " +
      " " +
      " " +
      " </task-node>" +
      " <end-state name='end' />" +
      "</process-definition>"
      );
      if i try to deploy using "ProcessDefinition.parseXmlResource()" as shown below
      ProcessDefinition processDefinition = ProcessDefinition.parseXmlResource("processdefinition.xml");

      Its giving me the following error:

      org.jbpm.jpdl.JpdlException: [[ERROR] couldn't parse process definition]
      org.jbpm.jpdl.xml.JpdlXmlReader.readProcessDefinition(JpdlXmlReader.java:172)
      org.jbpm.graph.def.ProcessDefinition.parseXmlInputStream(ProcessDefinition.java:180)
      org.jbpm.graph.def.ProcessDefinition.parseXmlResource(ProcessDefinition.java:161)
      simpleTest.FirstServlet.deployProcessDefinition(FirstServlet.java:145)
      simpleTest.FirstServlet.service(FirstServlet.java:79)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

      I am struggling to configure BPEL with MySQL.

      Problem in BPEL:
      Could you please let me know the steps to configure BPEL with MySQL and how to create tables for BPEL?

      I am getting the following error in JBOSS server:

      javax.naming.NameNotFoundException: XAConnectionFactory not bound
      at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
      at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
      at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
      at org.jnp.server.NamingServer.lookup(NamingServer.java:296)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:667)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
      at javax.naming.InitialContext.lookup(InitialContext.java:392)
      at org.jboss.ejb.plugins.jms.DLQHandler.createService(DLQHandler.java:182)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalCreate(ServiceMBeanSupport.java:260)
      at org.jboss.system.ServiceMBeanSupport.create(ServiceMBeanSupport.java:188)
      at org.jboss.ejb.plugins.jms.JMSContainerInvoker.innerStartDelivery(JMSContainerInvoker.java:510)
      at org.jboss.ejb.plugins.jms.JMSContainerInvoker$ExceptionListenerImpl$ExceptionListenerRunnable.run(JMSContainerInvoker.java:1428)
      at java.lang.Thread.run(Thread.java:619)


      If anybody have sample web application using JBPM, please send me that too.

      Please help me out to solve these issues. Thanks in Advance.

        • 1. Re: Need steps to deploy BPEL in MySQL
          aguizar

          The resource name passed to ProcessDefinition.parseXmlResource() must be absolute. So if your process definition is in package org.example.foo, the resource name you'd use is "org/example/foo/processdefinition.xml".

          As for the NameNotFoundException, I can only think JMS is not deployed. Are you using a standard JBoss server?

          • 2. Re: Need steps to deploy BPEL in MySQL
            music123

            Hi Alex,
            Thanks for the reply.

            I gave the absolute path for processdefinition.xml file. But still i am getting the same error.

            Then i placed the processdefinition.xml file in WEB-INF folder and used the below code.

            ProcessDefinition processDefinition = ProcessDefinition.parseXmlResource("processdefinition.xml");

            Please correct me if i made mistake anywhere.

            Regarding NameNotFoundException, i am using the JBOSS server 4.2.2 which came along with jbpm-jpdl-3.2.3 suite.

            • 3. Re: Need steps to deploy BPEL in MySQL
              aguizar

              Resource files must be in the classpath. For a web module the classpath includes the WEB-INF/classes directory as well as jars in WEB-INF/lib. Hence placing processdefinition.xml in WEB-INF/classes should work.

              As for how to configure the product with mysql, please read the Getting Started chapter in the user guide. In particular do not to miss the link to the Configuration chapter in the Hibernate manual.

              • 4. Re: Need steps to deploy BPEL in MySQL
                music123

                Thank you very much Alex for the info.
                Its worked!!!