14 Replies Latest reply on Oct 2, 2013 2:28 AM by alkoch

    What Drools JARS are needed in a servet's WEB-INF\lib for jBPM?

    alkoch

      Hello,

       

      I have ported a Tomcat servlet to run with JBoss 7.1 and am now trying to add jBPM support to it.  I have run the jbpm-5.4.0.Final-installer-full.zip to get JBoss/jBPM installed with Kepler (I had to patch the installer to install Kepler).  I then copied a line of code from the installer's "evaluation" sample and placed it in my servlet.  That line of code is "KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();".  After adding the necessary imports I got a clean build.  I thought that I could then take the Drools runtime files I found in the installer's .\runtime\lib and place them in my servlet's .\WEB-INF\lib.  However, doing this caused me to get a "Class not found" exception when I tried to execute the KnowledgeBuilder line of code.  It turns out that if I replace the JARs from the installer's .\runtime\lib with the JARS in drools-distribution-5.5.0.Final.zip (from http://www.jboss.org/drools/downloads) in my .\WEB-INF\lib I am able to execute KnowledgeBuilder line of code.

       

      My questions are:

      1) Why don't the JARs from the installer's .\runtime\lib work in the above?

      2) Where can I find documentation on what all of these Drools JARs do and which ones are needed?

       

      Thank you.

      Al

        • 1. Re: What Drools JARS are needed in a servet's WEB-INF\lib for jBPM?
          salaboy21

          We use Maven to define the project dependencies. If you clone the sources and run the following maven command:

          mvn dependency:tree

          you will see all the dependencies and transitive dependencies that are required by the project.

           

          HTH

          • 2. Re: What Drools JARS are needed in a servet's WEB-INF\lib for jBPM?
            swiderski.maciej

            In addition to what Mauricio mentioned, jbpm-installer creates runtime folder where you can find all libraries required by jbpm (including drools). With all these libraries you will be able to use jbpm in any environment.

             

            HTH

            • 3. Re: What Drools JARS are needed in a servet's WEB-INF\lib for jBPM?
              alkoch

              Hi Maciej,

               

              Thank you very much for your reply!

               

              That's exactly what I tried and it fails.  That is, I have copied .\runtime and .\runtime\lib to the servlet's WEB-INF\lib but upon execution I get:

              06:20:45,356 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-4) JBAS015876: Starting deployment of "MyServlet.war"

              06:20:52,936 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-2) Class Path entry iText-toolbox.jar in "/C:/MyServletDev/jboss-as-7.1.1.Final/standalone/deployments/MyServlet.war/WEB-INF/lib/itext-2.1.2.jar"  does not point to a valid jar for a Class-Path reference.

              06:20:52,936 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-2) Class Path entry iText-toolbox-2.1.2.jar in "/C:/MyServletDev/jboss-as-7.1.1.Final/standalone/deployments/MyServlet.war/WEB-INF/lib/itext-2.1.2.jar"  does not point to a valid jar for a Class-Path reference.

              06:20:52,936 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-2) Class Path entry jaxb-api.jar in "/C:/MyServletDev/jboss-as-7.1.1.Final/standalone/deployments/MyServlet.war/WEB-INF/lib/jaxb-impl-2.2.5.jar"  does not point to a valid jar for a Class-Path reference.

              06:20:52,936 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-2) Class Path entry activation.jar in "/C:/MyServletDev/jboss-as-7.1.1.Final/standalone/deployments/MyServlet.war/WEB-INF/lib/jaxb-impl-2.2.5.jar"  does not point to a valid jar for a Class-Path reference.

              06:20:52,952 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-2) Class Path entry jsr173_1.0_api.jar in "/C:/MyServletDev/jboss-as-7.1.1.Final/standalone/deployments/MyServlet.war/WEB-INF/lib/jaxb-impl-2.2.5.jar"  does not point to a valid jar for a Class-Path reference.

              06:20:52,954 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-2) Class Path entry jaxb1-impl.jar in "/C:/MyServletDev/jboss-as-7.1.1.Final/standalone/deployments/MyServlet.war/WEB-INF/lib/jaxb-impl-2.2.5.jar"  does not point to a valid jar for a Class-Path reference.

              06:20:52,955 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-2) Class Path entry jaxb-api.jar in "/C:/MyServletDev/jboss-as-7.1.1.Final/standalone/deployments/MyServlet.war/WEB-INF/lib/jaxb-xjc-2.2.5.jar"  does not point to a valid jar for a Class-Path reference.

              06:20:52,957 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-2) Class Path entry jaxb-impl.jar in "/C:/MyServletDev/jboss-as-7.1.1.Final/standalone/deployments/MyServlet.war/WEB-INF/lib/jaxb-xjc-2.2.5.jar"  does not point to a valid jar for a Class-Path reference.

              06:20:52,959 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-2) Class Path entry jsr173_1.0_api.jar in "/C:/MyServletDev/jboss-as-7.1.1.Final/standalone/deployments/MyServlet.war/WEB-INF/lib/jaxb-xjc-2.2.5.jar"  does not point to a valid jar for a Class-Path reference.

              06:20:52,960 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-2) Class Path entry activation.jar in "/C:/MyServletDev/jboss-as-7.1.1.Final/standalone/deployments/MyServlet.war/WEB-INF/lib/jaxb-xjc-2.2.5.jar"  does not point to a valid jar for a Class-Path reference.

              06:20:52,963 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-2) Class Path entry activation.jar in "/C:/MyServletDev/jboss-as-7.1.1.Final/standalone/deployments/MyServlet.war/WEB-INF/lib/mail-1.4.jar"  does not point to a valid jar for a Class-Path reference.

              06:20:53,057 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015893: Encountered invalid class name 'org.springframework.context.ApplicationContext,org.springframework.beans.BeansException' for service type 'org.apache.cxf.bus.factory'

              06:20:53,072 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015893: Encountered invalid class name 'org.xmlpull.mxp1.MXParser,org.xmlpull.mxp1_serializer.MXSerializer' for service type 'org.xmlpull.v1.XmlPullParserFactory'

              06:20:53,072 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015893: Encountered invalid class name 'org.xmlpull.mxp1.MXParser,org.xmlpull.mxp1_serializer.MXSerializer' for service type 'org.xmlpull.v1.XmlPullParserFactory'

              06:20:53,072 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015893: Encountered invalid class name 'org.xmlpull.mxp1.MXParser,org.xmlpull.mxp1_serializer.MXSerializer' for service type 'org.xmlpull.v1.XmlPullParserFactory'

              06:20:53,088 INFO  [org.jboss.as.pojo] (MSC service thread 1-3) JBAS017000: Found legacy bean/pojo namespace: urn:jboss:bean-deployer:2.0 - might be missing some xml features (potential exceptions).

              06:20:53,088 INFO  [org.jboss.as.jpa] (MSC service thread 1-3) JBAS011401: Read persistence.xml for org.jbpm.persistence.jpa

              06:20:53,510 WARN  [org.jboss.as.ee] (MSC service thread 1-3) JBAS011006: Not installing optional component org.apache.cxf.transport.http.Servlet3ContinuationProvider$Servlet3Continuation due to exception: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011054: Could not find default constructor for class org.apache.cxf.transport.http.Servlet3ContinuationProvider$Servlet3Continuation

                  at org.jboss.as.ee.component.ComponentDescription$DefaultComponentConfigurator.configure(ComponentDescription.java:606)

                  at org.jboss.as.ee.component.deployers.EEModuleConfigurationProcessor.deploy(EEModuleConfigurationProcessor.java:81)

                  at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

                  at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

                  at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

                  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_11]

                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_11]

                  at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_11]

               

              06:20:53,525 WARN  [org.jboss.as.ee] (MSC service thread 1-3) JBAS011006: Not installing optional component com.MyCompany.MyServlet.MyServlet due to exception: java.lang.ClassNotFoundException: com.MyCompany.MyServlet.MyServlet from [Module "deployment.MyServlet.war:main" from Service Module Loader]

                  at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190) [jboss-modules.jar:1.1.1.GA]

                  at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468) [jboss-modules.jar:1.1.1.GA]

                  at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456) [jboss-modules.jar:1.1.1.GA]

                  at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398) [jboss-modules.jar:1.1.1.GA]

                  at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120) [jboss-modules.jar:1.1.1.GA]

                  at java.lang.Class.forName0(Native Method) [rt.jar:1.7.0_11]

                  at java.lang.Class.forName(Class.java:264) [rt.jar:1.7.0_11]

                  at org.jboss.as.server.deployment.reflect.DeploymentClassIndex.classIndex(DeploymentClassIndex.java:54) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

                  at org.jboss.as.ee.component.deployers.EEModuleConfigurationProcessor.deploy(EEModuleConfigurationProcessor.java:79)

                  at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

                  at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

                  at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

                  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_11]

                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_11]

                  at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_11]

               

              06:20:53,603 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-3) JBAS010403: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3)

              06:20:53,619 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-3) JBAS010404: Deploying non-JDBC-compliant driver class com.sybase.jdbc4.jdbc.SybDriver (version 7.0)

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

              06:20:53,853 INFO  [org.jboss.as.controller] (DeploymentScanner-threads - 1) JBAS014774: Service status report

              JBAS014775:    New missing/unsatisfied dependencies:

                    service jboss.naming.context.java.jdbc.jbpm-ds (missing) dependents: [service jboss.persistenceunit."MyServlet.war#org.jbpm.persistence.jpa"]

               

              06:20:53,853 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 2) {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.persistenceunit.\"MyServlet.war#org.jbpm.persistence.jpa\"jboss.naming.context.java.jdbc.jbpm-dsMissing[jboss.persistenceunit.\"MyServlet.war#org.jbpm.persistence.jpa\"jboss.naming.context.java.jdbc.jbpm-ds]"]}}}

              06:20:54,744 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015877: Stopped deployment MyServlet.war in 866ms

              06:20:54,744 INFO  [org.jboss.as.controller] (MSC service thread 1-4) JBAS014774: Service status report

              JBAS014776:    Newly corrected services:

                    service jboss.naming.context.java.jdbc.jbpm-ds (new available)

               

              Can you please help me determine what is going wrong here?

               

              Thank you very much.

              • 4. Re: What Drools JARS are needed in a servet's WEB-INF\lib for jBPM?
                swiderski.maciej

                as you can see at the bottom of the log the missing part is the data source for jbpm to persists the state. You need to define data source in standalone.xml with JNDI name jdbc/jbpm-ds. Once you have that all should just worl.

                 

                HTH

                • 5. Re: What Drools JARS are needed in a servet's WEB-INF\lib for jBPM?
                  alkoch

                  I am new to JBoss but after some research I think I know how to define a data source. (I assume I need to add a <datasources> block to standalone.xml.)  However, I cannot find the details necessary to actually specify the contents of the <datasource> block.  Could you help me by pointing me to the documentation that would give me the necessary details to do this or just show me what the <datasources> block should look like?

                   

                  Thank you for your help.

                  • 6. Re: What Drools JARS are needed in a servet's WEB-INF\lib for jBPM?
                    swiderski.maciej

                    here you can find documentation about setting up data source in AS7 and here is an example used by jBPM with the installer. Just make sure that JNDI name is correctly set, same as in your persistence.xml.

                     

                    HTH

                    • 7. Re: What Drools JARS are needed in a servet's WEB-INF\lib for jBPM?
                      alkoch

                      Hi Maciej,

                       

                      Thank you for taking the time to locate the links you provided.  I will go see if I can make things work based on the links and I will let you know what happens.

                       

                      Your help is really appreciated!

                       

                      Al.

                      • 8. Re: What Drools JARS are needed in a servet's WEB-INF\lib for jBPM?
                        alkoch

                        Hi Maciej,

                         

                        I must be missing something.  Here is what I added to standalone.xml (I'm just trying to get the code in the evaluation sample to run in my servlet - for the moment I really don't care about persisting to a database but it seems that it is being "forced" on me by the jBPM library).  To get the following I just copied the existing h2 datasource block and changed the IDs:

                        <datasource jndi-name="java:jboss/datasources/jdbc/jbpm-ds" pool-name="JBPMDS" enabled="true" use-java-context="true">

                            <connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1</connection-url>

                            <driver>h2</driver>

                            <security>

                                <user-name>sa</user-name>

                                <password>sa</password>

                            </security>

                        </datasource>

                         

                        and here is the persistence.xml file I added to the servlet's META-INF (from http://www.mastertheboss.com/jbpm5/jbpm-5-on-jboss-as-7 with changes to the datasource names):

                        <persistence version="1.0" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm_1_0.xsd">

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

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

                        <jta-data-source>java:jboss/datasources/jdbc/jbpm-ds</jta-data-source>

                        <mapping-file>META-INF/JBPMorm.xml</mapping-file>

                        <mapping-file>META-INF/Taskorm.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.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.task.Attachment</class>

                        <class>org.jbpm.task.Content</class>

                        <class>org.jbpm.task.BooleanExpression</class>

                        <class>org.jbpm.task.Comment</class>

                        <class>org.jbpm.task.Deadline</class>

                        <class>org.jbpm.task.Comment</class>

                        <class>org.jbpm.task.Deadline</class>

                        <class>org.jbpm.task.Delegation</class>

                        <class>org.jbpm.task.Escalation</class>

                        <class>org.jbpm.task.Group</class>

                        <class>org.jbpm.task.I18NText</class>

                        <class>org.jbpm.task.Notification</class>

                        <class>org.jbpm.task.EmailNotification</class>

                        <class>org.jbpm.task.EmailNotificationHeader</class>

                        <class>org.jbpm.task.PeopleAssignments</class>

                        <class>org.jbpm.task.Reassignment</class>

                        <class>org.jbpm.task.Status</class>

                        <class>org.jbpm.task.Task</class>

                        <class>org.jbpm.task.TaskData</class>

                        <class>org.jbpm.task.SubTasksStrategy</class>

                        <class>org.jbpm.task.OnParentAbortAllSubTasksEndStrategy</class>

                        <class>org.jbpm.task.OnAllSubTasksEndParentEndStrategy</class>

                        <class>org.jbpm.task.User</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.transaction.manager_lookup_class" value="org.jbpm.integration.console.JBPMTransactionManager"/>

                        <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/>

                        </properties>

                        </persistence-unit>

                        <persistence-unit name="org.jbpm.task">

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

                        <non-jta-data-source>java:jboss/datasources/jdbc/jbpm-ds</non-jta-data-source>

                        <mapping-file>META-INF/Taskorm.xml</mapping-file>

                        <class>org.jbpm.task.Attachment</class>

                        <class>org.jbpm.task.Content</class>

                        <class>org.jbpm.task.BooleanExpression</class>

                        <class>org.jbpm.task.Comment</class>

                        <class>org.jbpm.task.Deadline</class>

                        <class>org.jbpm.task.Comment</class>

                        <class>org.jbpm.task.Deadline</class>

                        <class>org.jbpm.task.Delegation</class>

                        <class>org.jbpm.task.Escalation</class>

                        <class>org.jbpm.task.Group</class>

                        <class>org.jbpm.task.I18NText</class>

                        <class>org.jbpm.task.Notification</class>

                        <class>org.jbpm.task.EmailNotification</class>

                        <class>org.jbpm.task.EmailNotificationHeader</class>

                        <class>org.jbpm.task.PeopleAssignments</class>

                        <class>org.jbpm.task.Reassignment</class>

                        <class>org.jbpm.task.Status</class>

                        <class>org.jbpm.task.Task</class>

                        <class>org.jbpm.task.TaskData</class>

                        <class>org.jbpm.task.SubTasksStrategy</class>

                        <class>org.jbpm.task.OnParentAbortAllSubTasksEndStrategy</class>

                        <class>org.jbpm.task.OnAllSubTasksEndParentEndStrategy</class>

                        <class>org.jbpm.task.User</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.transaction.manager_lookup_class" value="org.jbpm.integration.console.JBPMTransactionManager"/>

                        </properties>

                        </persistence-unit>

                        </persistence>

                         

                        However, the servlet continues to fail to launch with:

                        15:53:54,166 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.persistenceunit.\"MyServlet.war#org.jbpm.persistence.jpa\"jboss.naming.context.java.jdbc.jbpm-dsMissing[jboss.persistenceunit.\"MyServlet.war#org.jbpm.persistence.jpa\"jboss.naming.context.java.jdbc.jbpm-ds]"]}}}

                         

                        Can you tell me:

                        1) What is going wrong here?

                        2) I am simply trying to get the code from the evaluation sample (from the full installer) to run as a test in my servlet.  At this point I have only added the import statements from evaluation and no other code.  The addition of the imports requires that I add the jBPM library to the Build Path and that in turn requires that I deploy all of those JARs in my WAR.  What is confusing me is that I can run the evaluation sample without having to worry about any extra steps to support persistence and/or a data source.  Why does the evaluation sample run but placing (only) the imports from that code requires steps related to persistence/datasources?

                         

                        Again, thank you for your help.

                         

                        Al

                        • 9. Re: What Drools JARS are needed in a servet's WEB-INF\lib for jBPM?
                          swiderski.maciej

                          please attach complete server.log so we can see why data source/persistence unit fails at boot time.

                           

                          In addition, take a look at the jbpm-installer that provides complete environment for execution, examine standalone.xml, and then check persistence.xml inside jbpm-console-server.war and jbpm-human-task.war and compare them with what you have.

                           

                          If you use human tasks you need persistence for it as there is no other way to keep track of human tasks.

                           

                          HTH

                          • 10. Re: What Drools JARS are needed in a servet's WEB-INF\lib for jBPM?
                            alkoch

                            Hi Maciej,

                             

                            Here's the info you asked for:

                             

                            1) My new persistence.xml (placed in .\MyServlet\src\main\resources\META-INF) modeled after the example @ http://docs.jboss.org/jbossas/docs/Server_Configuration_Guide/4/html/ch01s02s01.html:

                            <?xml version="1.0" encoding="UTF-8"?>

                            <persistence version="2.0"

                               xmlns="http://java.sun.com/xml/ns/persistence" 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">

                               <persistence-unit name="myapp">

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

                                  <jta-data-source>java:jboss/jdbc/jbpm-ds</jta-data-source>

                                  <properties>

                                     <property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect"/>

                                     <property name="hibernate.hbm2ddl.auto" value="create-drop"/>

                                  </properties>

                               </persistence-unit>

                            </persistence>

                             

                            2) I have attached the server log from 1st deploying the six jBPM WARs and then trying to deploy MyServlet.

                             

                            3) I also attached a 2nd file that contains the persistence.xml file from each of jbpm-human-task-war.war and jbpm-gwt-console-server.war.  You asked me to compare them with my persistence.xml.

                            Mine uses <jta-data-source>java:jboss/jdbc/jbpm-ds</jta-data-source> which is what you had previously indicated I should use.  They use <non-jta-data-source>java:jboss/datasources/jbpmDS</non-jta-data-source> and <jta-data-source>java:jboss/datasources/jbpmDS</jta-data-source>.  They are different but I don't understand the significance of that.

                             

                            Can you see what is going wrong?

                             

                            Thank you.

                            Al

                            • 11. Re: What Drools JARS are needed in a servet's WEB-INF\lib for jBPM?
                              swiderski.maciej

                              in your standalone.xml you have defined this:

                               

                              <datasource jndi-name="java:jboss/datasources/jdbc/jbpm-ds" pool-name="JBPMDS" enabled="true" use-java-context="true">

                               

                              but then in your persistence.xml you refer to:


                              <jta-data-source>java:jboss/jdbc/jbpm-ds</jta-data-source>

                               

                              as you can see these two don't match and this deployment fails. make sure that jta-data-source in persistence.xml matches jndi-name of the data source in standalone.xml.


                              HTH

                              1 of 1 people found this helpful
                              • 12. Re: What Drools JARS are needed in a servet's WEB-INF\lib for jBPM?
                                alkoch

                                Hi Maciej,

                                 

                                I apologize!

                                 

                                I had changed the standalone.xml since I posted it above last week.  Here is the current entry in standalone.xml:

                                <datasource jndi-name="java:jboss/jdbc/jbpm-ds" pool-name="jBPMDS" enabled="true" use-java-context="true">

                                    <connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1</connection-url>

                                    <driver>h2</driver>

                                    <security>

                                        <user-name>sa</user-name>

                                        <password>sa</password>

                                    </security>

                                </datasource>

                                 

                                and here is persistence.xml:

                                <?xml version="1.0" encoding="UTF-8"?>

                                <persistence version="2.0"

                                    xmlns="http://java.sun.com/xml/ns/persistence" 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">

                                    <persistence-unit name="myapp">

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

                                        <jta-data-source>java:jboss/jdbc/jbpm-ds</jta-data-source>

                                        <properties>

                                            <property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect"/>

                                            <property name="hibernate.hbm2ddl.auto" value="create-drop"/>

                                        </properties>

                                    </persistence-unit>

                                </persistence>

                                 

                                and the JNDI names match which is why I can't understand the error:

                                10:14:29,012 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 2) {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.persistenceunit.\"MyServlet.war#org.jbpm.persistence.jpa\"jboss.naming.context.java.jdbc.jbpm-dsMissing[jboss.persistenceunit.\"MyServlet.war#org.jbpm.persistence.jpa\"jboss.naming.context.java.jdbc.jbpm-ds]"]}}}

                                 

                                Can you see why this is happening?  Again, thank you for your help.

                                 

                                Al

                                • 13. Re: What Drools JARS are needed in a servet's WEB-INF\lib for jBPM?
                                  swiderski.maciej

                                  there is still some inconsistencies, in your persistence.xml the name is myapp while the error refers to org.jbpm.persistence.jpa. What I would suggest is to simple remove all jbpm application from the server and leave only yours. Again check that data sources are properly defined in standalone.xml and then referenced in persistence.xml.

                                   

                                  One more thing is that you use wrong hibernate dialect you should use H2Dialect instead of HSQLDialect.

                                   

                                  HTH

                                  1 of 1 people found this helpful
                                  • 14. Re: What Drools JARS are needed in a servet's WEB-INF\lib for jBPM?
                                    alkoch

                                    Hi Maciej,

                                     

                                    I made your suggested changes but I still get the error.  Since this problem has persisted for so long I have decided to start fresh with a new approach and have created a new Eclipse Project.  That resulted in a different error.  I have posted this new problem with a Subject of Can't "integrate" jBPM 5.4 into a Maven web app.  If you would take a look at that incident I would really appreciate it.

                                     

                                    Thank you very much for all of your assistance on this incident.

                                    Al