6 Replies Latest reply on Mar 27, 2015 10:00 AM by calca

    Deploying embedded jBPM5 app into jBoss AS 7.1.1

    jeferson.dmolin

      Hello everyone!

       

      I'm new to jBPM 5.4 and I'm facing some challenges on deploying my app into jBoss AS 7.1.1.

       

      I'm building a simple application for academical purposes. Basically what I'm doing right now, before adding any jBPM code to it, is deploying the app with the jBPM 5.4 jars included in the WAR file.

      When the app container tries to deploy the app, I get the error as follows in the server.log file attached to this message.

      Attached to this message there's also my eclipse project. Notice that the /lib folder is empty. I emptied it to reduce the file size. You can place in it the jBPM jars, found on the runtime folder.

       

      I have a clue of what may be wrong with my project. I think there's something I need to configure in the persistence.xml file.

      Anyway, I'm counting on you guys to help me get this working.

       

      Thanks in advance!

       

      Cheers!!

        • 1. Re: Deploying embedded jBPM5 app into jBoss AS 7.1.1
          calca

          Did you define in jboss the datasource pointed in the persistence.xml file?

           

          <non-jta-data-source>java:/jbpmDS</non-jta-data-source>

          • 2. Re: Deploying embedded jBPM5 app into jBoss AS 7.1.1
            jeferson.dmolin

            Demian, thanks for your reply!

             

            I didn't define the datasource. Note that the configurations of my persistence.xml file are commented out. As I said, I'm trying to deploy the application with the jars dependencies first, so I haven't reached the point of doing such configurations.

            Is it necessary to configure a datasource at this point? If so, how can I do that?

             

            Kind regards

            • 3. Re: Deploying embedded jBPM5 app into jBoss AS 7.1.1
              jeferson.dmolin

              Does anybody have a clue on this issue?

               

              Thanks!!

              • 4. Re: Deploying embedded jBPM5 app into jBoss AS 7.1.1
                calca

                Well, the error says:

                 

                21:43:25,190 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 1) JBAS015870: Deploy of deployment "Formula1.war" was rolled back with failure message {"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.persistenceunit.\"Formula1.war#org.jbpm.persistence.jpa\"jboss.naming.context.java.jdbc.jbpm-dsMissing[jboss.persistenceunit.\"Formula1.war#org.jbpm.persistence.jpa\"jboss.naming.context.java.jdbc.jbpm-ds]"]}

                 

                So I think you may need to have the persistence.xml with the datasource. You should check inside the jars you put if there is one which includes the persistence.xml inside and see if you need it or not.

                • 5. Re: Deploying embedded jBPM5 app into jBoss AS 7.1.1
                  jeferson.dmolin

                  Demian, following your suggestion, I've configured my persistence.xml file as follows:

                   

                    <persistence-unit name="org.jbpm.persistence.jpa" transaction-type="JTA">

                      <provider>org.hibernate.ejb.HibernatePersistence</provider>

                      <jta-data-source>java:jboss/datasources/jbpmDS</jta-data-source>

                      <class>org.drools.persistence.session.SessionInfo</class>

                      <class>org.jbpm.persistence.processinstance.ProcessInstanceInfo</class>

                      <class>org.jbpm.persistence.processinstance.WorkItemInfo</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.transaction.manager_lookup_class"

                                  value="org.hibernate.transaction.BTMTransactionManagerLookup"/>

                      </properties>

                    </persistence-unit>

                   

                  I also checked all the jars files in my WEB-INF/lib folder and I found out there was a conflict with jbpm-test-5.4.0.Final.jar file. After removing this jar from my WEB-INF/lib folder, my application deployed successfully!!

                   

                  Now I'm ready to start playing with jBPM.

                   

                  Thanks a lot for you support hermano!!

                  • 6. Re: Deploying embedded jBPM5 app into jBoss AS 7.1.1
                    calca

                    Glad to hear this!

                     

                    Thanks,

                     

                    Demian