Uploaded image for project: 'JBoss BPMS Platform'
  1. JBoss BPMS Platform
  2. RHBPMS-4106

[GSS](6.3.z) A ClassNotFound exception is shown while a "Service task" is being executed

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 6.3.3
    • 6.3.0.GA, 6.3.1.GA
    • Business Central, jBPM Core
    • EAP 6.4 + BPMS 6.3

    • CR1
    • Workaround Exists
    • Hide

      1. Package the java code in a mavenized jar file [1].
      2. Copy the jar file of (1) in the "business-central/WEB-INF/lib" folder.
      3. Start the server.
      4. Create a project through Authoring -> Project Authoring
      5. Add the process example [2].
      6. Save.
      7. Build&Deploy the project.
      8. Executing the process.

      [1] https://github.com/droolsjbpm/jbpm/blob/master/jbpm-bpmn2/src/test/resources/BPMN2-ServiceProcess.bpmn2
      [2] https://github.com/droolsjbpm/jbpm/blob/master/jbpm-bpmn2/src/test/java/org/jbpm/bpmn2/objects/HelloService.java

      Show
      1. Package the java code in a mavenized jar file [1] . 2. Copy the jar file of (1) in the "business-central/WEB-INF/lib" folder. 3. Start the server. 4. Create a project through Authoring -> Project Authoring 5. Add the process example [2] . 6. Save. 7. Build&Deploy the project. 8. Executing the process. [1] https://github.com/droolsjbpm/jbpm/blob/master/jbpm-bpmn2/src/test/resources/BPMN2-ServiceProcess.bpmn2 [2] https://github.com/droolsjbpm/jbpm/blob/master/jbpm-bpmn2/src/test/java/org/jbpm/bpmn2/objects/HelloService.java
    • Hide

      1. Package the java code in a mavenized jar file [1].
      2. Start the server.
      3. Upload the jar file in the business-central through Authoring -> Artifact repository
      4. Create a project through Authoring -> Project Authoring
      5. Add the process example [2].
      6. Add the dependency of (1) in the project (4) through project settings.
      7. Save.
      8. Build&Deploy the project.
      9. Executing the process.

      [1] https://github.com/droolsjbpm/jbpm/blob/master/jbpm-bpmn2/src/test/resources/BPMN2-ServiceProcess.bpmn2
      [2] https://github.com/droolsjbpm/jbpm/blob/master/jbpm-bpmn2/src/test/java/org/jbpm/bpmn2/objects/HelloService.java

      Show
      1. Package the java code in a mavenized jar file [1] . 2. Start the server. 3. Upload the jar file in the business-central through Authoring -> Artifact repository 4. Create a project through Authoring -> Project Authoring 5. Add the process example [2] . 6. Add the dependency of (1) in the project (4) through project settings. 7. Save. 8. Build&Deploy the project. 9. Executing the process. [1] https://github.com/droolsjbpm/jbpm/blob/master/jbpm-bpmn2/src/test/resources/BPMN2-ServiceProcess.bpmn2 [2] https://github.com/droolsjbpm/jbpm/blob/master/jbpm-bpmn2/src/test/java/org/jbpm/bpmn2/objects/HelloService.java

      Hi,

      We want to execute java methods from a "Service task" in a process but we always are getting a ClassNotFound exception while the service task is being executed.

      We have tried the sample process provided by Maciej [1] on busines-central. Here is the java code [2] packaged in a mavenized jar file and this artifact has been upload to the business-central. We have created a project in the business-central, imported the sample process and added the dependency to the uploaded artifact. Everything works fine (upload artifact, import process, add dependency, build&deploy) but when it is called from inside the "service task" under "Process Definition" menu in the business-central, we always get a CNFE. However, the same file is accessible from a script task.

      After doing some tests, we realized that if we copy the jar file with the java code in the "business-central/WEB-INF/lib" folder, it works fine and there is no CNFE.

      Shouldn't it work if you put it as a dependency in the project?

      [1] https://github.com/droolsjbpm/jbpm/blob/master/jbpm-bpmn2/src/test/resources/BPMN2-ServiceProcess.bpmn2
      [2] https://github.com/droolsjbpm/jbpm/blob/master/jbpm-bpmn2/src/test/java/org/jbpm/bpmn2/objects/HelloService.java

      Regards,
      Oscar.

              psiroky_jira Petr Široký (Inactive)
              rhn-support-omolinab Oscar Molina
              Tomáš Livora Tomáš Livora (Inactive)
              Tomáš Livora Tomáš Livora (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: