Uploaded image for project: 'jBPM'
  1. jBPM
  2. JBPM-2428

BPM process action class loading issue

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • jBPM 3.2.11.SP2
    • jBPM 3.2.5.SP5
    • Runtime Engine
    • None
    • Medium
    • Workaround Exists
    • Hide

      restart the server

      Show
      restart the server

      Class loader which loaded a class instance which is stored in the process variable is different then the classloader that loaded the same class in ActionHandler. This issue will occure only if the process is undeployed after one or more runs and redeployed without restarting the server. Even deleting process instances using the JBPM Console didn't help.

      Steps to reproduce (use the quickstart in the attachment)
      ============================================
      ant deploy
      ant deployProcess
      ant startProcess
      ant undeploy
      start the quickstart
      ant deploy
      ant deployProcess
      ant startProcess

      A simple restart of the server after the first undeploy fixes the problem and the exception won't be reproduced.

      First run output
      ===========

      2009-07-15 11:40:26,407 INFO [STDOUT] ********** CandidateIntakeAction - Candidate object populated **********
      2009-07-15 11:40:26,407 INFO [STDOUT] Candidate name = Fidel
      2009-07-15 11:40:26,407 INFO [STDOUT] Candidate surname = Castro
      2009-07-15 11:40:26,407 INFO [STDOUT] Candidate email = fidel.castro@gmail.com
      2009-07-15 11:40:26,407 INFO [STDOUT] ************************************************************************
      2009-07-15 11:40:26,515 INFO [STDOUT] ********** SimpleBPMActionHandler **********
      2009-07-15 11:40:26,515 INFO [STDOUT] Object loaded with classloader: org.jboss.mx.loading.UnifiedClassLoader3@1769b56

      { url=file:/home/mbaluch/work/build/jboss-soa-p.4.3.0.GA_CP01_CR7/jboss-as/server/production/deploy/Quickstart_jbpm_classloader_anomaly.esb/ ,addedOrder=60}

      2009-07-15 11:40:26,516 INFO [STDOUT] Given classloader for class Candidate: org.jboss.mx.loading.UnifiedClassLoader3@1769b56

      { url=file:/home/mbaluch/work/build/jboss-soa-p.4.3.0.GA_CP01_CR7/jboss-as/server/production/deploy/Quickstart_jbpm_classloader_anomaly.esb/ ,addedOrder=60}

      2009-07-15 11:40:26,516 INFO [STDOUT] ********************************************

      Second run output
      ==============

      2009-07-15 11:40:46,849 INFO [STDOUT] ********** CandidateIntakeAction - Candidate object populated **********
      2009-07-15 11:40:46,849 INFO [STDOUT] Candidate name = Fidel
      2009-07-15 11:40:46,849 INFO [STDOUT] Candidate surname = Castro
      2009-07-15 11:40:46,849 INFO [STDOUT] Candidate email = fidel.castro@gmail.com
      2009-07-15 11:40:46,849 INFO [STDOUT] ************************************************************************
      2009-07-15 11:40:47,041 INFO [STDOUT] ********** SimpleBPMActionHandler **********
      2009-07-15 11:40:47,041 INFO [STDOUT] Object loaded with classloader: org.jboss.mx.loading.UnifiedClassLoader3@1769b56

      { url=null ,addedOrder=60}

      2009-07-15 11:40:47,041 INFO [STDOUT] Given classloader for class Candidate: org.jboss.mx.loading.UnifiedClassLoader3@1300751

      { url=file:/home/mbaluch/work/build/jboss-soa-p.4.3.0.GA_CP01_CR7/jboss-as/server/production/deploy/Quickstart_jbpm_classloader_anomaly.esb/ ,addedOrder=61}

      2009-07-15 11:40:47,041 INFO [STDOUT] !!! Classloader conflict between ClassName.class.getClassLoader() and instanceOfClassName.getClass().getClassLoader() !!!
      2009-07-15 11:40:47,041 INFO [STDOUT] !!! Process will throw a ClassCastException !!!
      2009-07-15 11:40:47,042 ERROR [org.jbpm.graph.def.GraphElement] action threw exception: org.jboss.soa.esb.xml2pojo.object.Candidate
      java.lang.ClassCastException: org.jboss.soa.esb.xml2pojo.object.Candidate
      <Stack-Trace> ...

              marco.rietveld Marco Rietveld (Inactive)
              mbaluch@redhat.com Marek Baluch
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: