Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 4.0 CR2
    • Fix Version/s: 4.0
    • Component/s: None
    • Labels:
      None

      Description

      I think I've another classloader puzzle for ye to tease out So, we have the 2 sars now. The service gets deployed into jbossesb.sar and the dependencies into the other etc etc.

      One of the quickstarts (transform_XML2POJO) defines an action that follows a SmooksTransformer action. This 2nd action expected some POJO instances to be attached to the message (attached and populated by Smooks). The

      The classloading gets screwed because Smooks uses the jbossesb-dependencies.sar classloader (because it's in that .sar) to load the POJO bean class instances that are attached to the message. The action instance extracts the beans from the message and tries to cast them but because that action class is in the jbossesb.sar it uses the jbosses.sar classloader to load the POJO class instances, we get a ClassCastException.

        Gliffy Diagrams

          Activity

          Hide
          kconner Kevin Conner added a comment -

          Tom, can you tell me which smooks class is responsible for loading the POJOs? Does it use the thread context classloader?

          Thanks.

          Show
          kconner Kevin Conner added a comment - Tom, can you tell me which smooks class is responsible for loading the POJOs? Does it use the thread context classloader? Thanks.
          Hide
          tfennelly Tom Fennelly added a comment -

          Hi Kev.

          It's not accessing particular classloaders. These POJOs are instantiated reflectively and tha class that does this just uses the classloader that loaded "it".

          See http://cvs.milyn.codehaus.org/browse/milyn/smooks-cartridges/javabean/src/main/java/org/milyn/javabean/AbstractBeanPopulator.java?r=1.7 line 201

          Show
          tfennelly Tom Fennelly added a comment - Hi Kev. It's not accessing particular classloaders. These POJOs are instantiated reflectively and tha class that does this just uses the classloader that loaded "it". See http://cvs.milyn.codehaus.org/browse/milyn/smooks-cartridges/javabean/src/main/java/org/milyn/javabean/AbstractBeanPopulator.java?r=1.7 line 201
          Hide
          tfennelly Tom Fennelly added a comment -

          Sorry Kev - would actually be line 322 of that file

          Show
          tfennelly Tom Fennelly added a comment - Sorry Kev - would actually be line 322 of that file
          Hide
          tfennelly Tom Fennelly added a comment -

          3rd time lucky - line 222

          D'oh

          Show
          tfennelly Tom Fennelly added a comment - 3rd time lucky - line 222 D'oh
          Hide
          kconner Kevin Conner added a comment -

          This is an issue with the way smooks is loading classes/resources.

          Tom has the patches which fix this issue and will apply them to the smooks repository.

          We should have some new smooks jars for ESB.

          Show
          kconner Kevin Conner added a comment - This is an issue with the way smooks is loading classes/resources. Tom has the patches which fix this issue and will apply them to the smooks repository. We should have some new smooks jars for ESB.
          Hide
          tfennelly Tom Fennelly added a comment -

          Jars added, tested and committed. All sems to be rosie in the garden now.

          Thanks Kev

          I suppose you should be the one to close this, not me??

          Show
          tfennelly Tom Fennelly added a comment - Jars added, tested and committed. All sems to be rosie in the garden now. Thanks Kev I suppose you should be the one to close this, not me??
          Hide
          kconner Kevin Conner added a comment -

          I'm happy if you are

          Show
          kconner Kevin Conner added a comment - I'm happy if you are

            People

            • Assignee:
              kconner Kevin Conner
              Reporter:
              tfennelly Tom Fennelly
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development