6 Replies Latest reply on Mar 7, 2014 12:11 AM by raghavendrarao4

    jBPM6 problem during application startup on jBoss AS 7.1.1

    raghavendrarao4

      Hi All,

       

        I'm a newbie using jBPM 6.0.1 Final. I referred to the samples provided on this website by Maciej and was able to deploy them successfully on jBoss AS 7.1.1 local.

        However, when I try creating my module, integrating using REST easy and deploy the 'war' on jBoss AS - I get a errors during startup.

       

      Initially, I faced :

        Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [TaskService] with qualifiers [@Default] at injection point [[field] @Inject private org.jbpm.runtime.manager.impl.factory.CDITaskServiceFactory.taskService]

       

      Further:

       

      org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [EntityManagerFactory] with qualifiers [@Default] at injection point [[field] @Inject private org.jbpm.kie.services.impl.AbstractDeploymentService.emf]

       

      org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [EntityManagerFactory] with qualifiers [@Default] at injection point [[parameter 1] of [method] @Produces public org.jbpm.kie.services.cdi.producer.TransactionalCommandServiceProducer.produceCommandService(EntityManagerFactory)]

       

      And now, I'm stuck at:

       

      16:10:36,853 INFO  [org.jboss.as.server] (HttpManagementService-threads - 2) JBAS015870: Deploy of deployment "MySampleProcess-0.0.1-SNAPSHOT.war" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"MySampleProcess-0.0.1-SNAPSHOT.war\".WeldService" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"MySampleProcess-0.0.1-SNAPSHOT.war\".WeldService: org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [IdentityProvider] with qualifiers [@Default] at injection point [[field] @Inject private org.jbpm.kie.services.impl.KModuleDeploymentService.identityProvider]"}}

       

      I need to know if there's something wrong with the way the 'war' is built. I've attached the module I've built...

       

      T&R.

        • 1. Re: jBPM6 problem during application startup on jBoss AS 7.1.1
          raghavendrarao4

            I'm using MySQL on my local windows 8 (x86-64) box. I configured EAP 6.1.1 (to match with the version on our unix servers) and jBPM 6.0.1 components plugged-in.

            jBoss EAP startup is clean. However, when I try executing the sample 'evaluation' using the Kie workbench, I see an exception saying 'Process instance was unable to commit the transaction'.

           

            MySQL is configured as an XA data source in the 'standalone.xml' as follows:

                              <driver name="mysql" module="com.mysql">

                                  <xa-datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</xa-datasource-class>

                              </driver>

           

            And the associated dependencies are defined under modules/com/mysql/main/module.xml as:

          <module xmlns="urn:jboss:module:1.0" name="com.mysql">

             <resources>

               <resource-root path="mysql-connector-java.jar"/>

             </resources>

             <dependencies>

                <module name="javax.api"/>

                <module name="javax.transaction.api"/>

              </dependencies>

          </module>

           

          I observed that the foreign key constraints on MySQL gave errors on startup, which I corrected manually.

          A new column 'id' was added to process instance, task, notification, attachment, as well as other jBPM tables on the DB.

           

          Anything else with the configuration I missed..? Another question I have is what has the column 'Task_id' or 'Notification_id' to do if jBPM refers to the 'id' column - as a foreign key - this doesn't sound right...None of the process instances get started or executed successfully.

           

          Response will be of great help

           

          raghavendrarao4 wrote:

           

          Hi All,

           

            I'm a newbie using jBPM 6.0.1 Final. I referred to the samples provided on this website by Maciej and was able to deploy them successfully on jBoss AS 7.1.1 local.

            However, when I try creating my module, integrating using REST easy and deploy the 'war' on jBoss AS - I get a errors during startup.

           

          Initially, I faced :

            Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [TaskService] with qualifiers [@Default] at injection point [[field] @Inject private org.jbpm.runtime.manager.impl.factory.CDITaskServiceFactory.taskService]

           

          Further:

           

          org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [EntityManagerFactory] with qualifiers [@Default] at injection point [[field] @Inject private org.jbpm.kie.services.impl.AbstractDeploymentService.emf]

           

          org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [EntityManagerFactory] with qualifiers [@Default] at injection point [[parameter 1] of [method] @Produces public org.jbpm.kie.services.cdi.producer.TransactionalCommandServiceProducer.produceCommandService(EntityManagerFactory)]

           

          And now, I'm stuck at:

           

          16:10:36,853 INFO  [org.jboss.as.server] (HttpManagementService-threads - 2) JBAS015870: Deploy of deployment "MySampleProcess-0.0.1-SNAPSHOT.war" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"MySampleProcess-0.0.1-SNAPSHOT.war\".WeldService" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"MySampleProcess-0.0.1-SNAPSHOT.war\".WeldService: org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [IdentityProvider] with qualifiers [@Default] at injection point [[field] @Inject private org.jbpm.kie.services.impl.KModuleDeploymentService.identityProvider]"}}

           

          I need to know if there's something wrong with the way the 'war' is built. I've attached the module I've built...

           

          T&R.

          • 2. Re: jBPM6 problem during application startup on jBoss AS 7.1.1
            swiderski.maciej

            you need to have custom producer that ensures all dependencies will be met, see for example this one that produces entity manager factory. Make sure you have jbpm-kie-services on your classpath so task service will be created and ready for injection.

             

            HTH

            • 3. Re: Re: jBPM6 problem during application startup on jBoss AS 7.1.1
              raghavendrarao4

              Thanks Maciej...will give it a try defining custom producers...

               

              Another question I have relates to the DDL's provided for MySQL / Oracle with EAP 6.1.1.

              It's a strange behavior (referred attached exported schema for MySQL) where JBoss tries creating custom entities and duplicate foreign key constraints on startup:

               

              For example:

                CONSTRAINT `FK_hqupx569krp0f0sgu9kh87513` FOREIGN KEY (`TaskData_Attachments_Id`) REFERENCES `task` (`id`),

                CONSTRAINT `FK1C9354333CA892A` FOREIGN KEY (`TaskData_Attachments_Id`) REFERENCES `task` (`TaskId`),

               

              Constraint `FK1C9354333CA892A` is defined in the DDL packaged with EAP 6.1.1 and `FK_hqupx569krp0f0sgu9kh87513` is a key that JBoss tries to create on startup and fails.

              Following were the steps I tried:

                1. Add foreign key constraints manually. JBoss expects the column 'id' to contain values, however, 'TaskId' is the column defined as a sequence generator.

                2. Delete schema, re-create and re-start jBoss. Again, JBoss tries adding the foreign key constraints on startup.

                3. Generate DDL using the 'persistence.xml' -- with hibernate-4 (JPA2) --> there isn't a maven plugin available, will need to try using de.juplo.

               

              With the existing DDL's sample process instances are not getting created on the Kie Workbench..My project requirement is to have jBPM 6 configured with Oracle 11g. Is there a way to have the correct DDL's generated...

              • 4. Re: jBPM6 problem during application startup on jBoss AS 7.1.1
                raghavendrarao4

                  I saw the related post - [JBPM-3740] Create upgrade script for db (engine and ht) - JBoss Issue Tracker where the installer script contains the DDL generator scripts.

                However, the dependent persistence.xml files are not packaged (with jbpm-6.0.1.Final-Full.zip). Don't see the following files packaged, request guidance to have them downloaded:

                 

                    for process engine: jbpm-installer/db/config-ddl

                    for human task: jbpm-installer/task-service/config-ddl

                 

                T&R.

                • 5. Re: jBPM6 problem during application startup on jBoss AS 7.1.1
                  raghavendrarao4

                  Observed the error --> JBPM-4177-ORA-01400: cannot insert NULL into ('JBPM'.'TASK'.'TASKID') posted on https://github.com/droolsjbpm/jbpm/tree/master/jbpm-installer/db.

                  This aided resolve the problem related to DDL's . Having the updated DDL's packaged with 6.0.1 Final version serve easier...

                   

                  T&R.

                  • 6. Re: Re: jBPM6 problem during application startup on jBoss AS 7.1.1
                    raghavendrarao4

                    I tried clean up the server and injected producers to overcome the WELD exceptions. I'm able to perform - Resteasy GET & POST in my sample module.

                    Thanks Maciej for your inputs ...

                     

                    T&R.