Details

    • Type: Bug Bug
    • Status: Closed Closed (View Workflow)
    • Priority: Major Major
    • Resolution: Done
    • Affects Version/s: 4.0 CR2
    • Fix Version/s: 4.0
    • Component/s: None
    • Security Level: Public (Everyone can see)
    • Labels:
      None
    • Similar Issues:
      Show 10 results 

      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.

        Activity

        Hide
        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
        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
        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
        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
        Tom Fennelly
        added a comment -

        Sorry Kev - would actually be line 322 of that file

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

        3rd time lucky - line 222

        D'oh

        Show
        Tom Fennelly
        added a comment - 3rd time lucky - line 222 D'oh
        Hide
        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
        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
        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
        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
        Kevin Conner
        added a comment -

        I'm happy if you are

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

          People

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

            Dates

            • Created:
              Updated:
              Resolved: