4 Replies Latest reply on Sep 17, 2015 10:38 AM by Dusan Chromy

    How to deploy a kjar to jBPM console from Eclipse

    Erich Cervantez Newbie

      This is how I *believe* you could deploy a process kjar to jBPM 6.2.0.FINAL.  This example is intended to be simple proof that you can create the default project in Eclipse and deploy it via the Maven repo, to the jBPM console.  I am new to jBPM and am trying to wrap how a possible deploy process might look like.

       

      Let me know if I have missed something somewhere (I must be since it does not work):

       

      • Create a simple test project in Eclipse:  New --> jBPM project (Maven)
        new_project.PNG
      • Compile the project in maven externally.  This will populate your local .m2 repo with a kjar (i.e. jbpm-example-1.0.0-SNAPSHOT.jar)
      • Fire up the jBPM console in the browser
      • Access Deploy --> Process Deployments console and click the "+" button
      • Fill out the form to Deploy a New Unit
      • For Kie Base Name I just used "kbase", and "ksession" for the Kie Session Name.  Should these be blank for this simple test process project?

       

      After clicking Deploy Unit, I get an error.  The logs show this:

       

      Unexpected error while deploying unit com.fitness:jbpm-example:1.0.0-SNAPSHOT:kbase:ksession: java.lang.RuntimeException: org.eclipse.aether.collection.DependencyCollectionException: Failed to collect dependencies at com.sample:jbpm-example:jar:1.0.0-SNAPSHOT -> org.jbpm:jbpm-test:jar:6.2.0.Final

      Caused by: org.eclipse.aether.collection.DependencyCollectionException: Failed to collect dependencies at com.sample:jbpm-example:jar:1.0.0-SNAPSHOT -> org.jbpm:jbpm-test:jar:6.2.0.Final

      Caused by: org.eclipse.aether.resolution.ArtifactDescriptorException: Failed to read artifact descriptor for org.jbpm:jbpm-test:jar:6.2.0.Final

      Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Could not find artifact org.jboss.dashboard-builder:dashboard-builder-bom:pom:6.2.0.Final in local (file:/home/jboss/.m2/repository/)

       

      Not sure about the last part.  Does the dashboard builder *need* to be installed or will the console war suffice?

       

      Also, is there anything missing or wrong about deploying this kjar?  Is it just the default Eclipse project with no real functionality (though there is a .bpmn file, a kmodule.xml and a ProcessMain.java file in the jar).

        • 1. Re: How to deploy a kjar to jBPM console from Eclipse
          Maciej Swiderski Master

          kbase and ksession names should only be set when you actually defined any in kmodule.xml that are not default. Otherwise (which is 99% of the cases) you leave it empty.

           

          You should note that jbpm-test shall only be used in scope test as dependency as it brings huge amount of dependencies which should not be needed when deploying into jbpm console. Preferably you should use only these dependencies that you actually need and always direct dependencies instead of transitive. So to resolve the problem you should remove jbpm-test or at least make it into test scope.

           

          HTH

          • 2. Re: How to deploy a kjar to jBPM console from Eclipse
            Dusan Chromy Newbie

            Hi Maciej,

             

            I have exactly the same problem (just with jbpm-test-6.1.0-Final however the stack trace appears to be very similar - see below). And I did include the jbpm-test dependency with test scope. Any idea how to keep the dependency and fix the problem? As plan B I am thinking to move the unit tests to another maven module but it would be more convenient to keep them together with the process definition.

             

            Caused by: org.kie.scanner.embedder.MavenEmbedderException: Failed to read artifact descriptor for org.jbpm:jbpm-test:jar:6.1.0.Final

            Caused by: org.eclipse.aether.resolution.ArtifactDescriptorException: Failed to read artifact descriptor for org.jbpm:jbpm-test:jar:6.1.0.Final

            Caused by: org.apache.maven.model.resolution.UnresolvableModelException: Failure to find org.jboss.dashboard-builder:dashboard-builder-bom:pom:6.1.0.Final in http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced

             

            Thanks,

             

            Dusan

            • 3. Re: How to deploy a kjar to jBPM console from Eclipse
              Maciej Swiderski Master

              looks like somehow aether (maven provider used) has some troubles to download artifacts. There were few issues fixed in 6.2 in this area so it might be improved when upgraded. Besides that, don't see any other reason it would not work. If that is still the case for 6.2 please file a jira with reproducer.

               

              HTH

              • 4. Re: How to deploy a kjar to jBPM console from Eclipse
                Dusan Chromy Newbie

                I have just tested with KIE workbench from jBPM 6.2.0 and there it works correctly - the jbpm-test 6.2.0 test dependency is not breaking the deployment