JBoss ESB
  1. JBoss ESB
  2. JBESB-466

Incorrect classloading using Class.forName

    Details

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

      Description

      Class.forName is used throughout the codebase but this does not work correctly when used in app servers etc. Classes (and resources) should be looked using the thread context classloader before anything else.

        Issue Links

          Activity

          Hide
          Bill Burke
          added a comment -

          Fixed..Don't know your procedure for closing. It is tested in the simple-scoped test under qa/junit

          Show
          Bill Burke
          added a comment - Fixed..Don't know your procedure for closing. It is tested in the simple-scoped test under qa/junit
          Hide
          Kevin Conner
          added a comment -

          Resources have still to be done

          Show
          Kevin Conner
          added a comment - Resources have still to be done
          Hide
          Bill Burke
          added a comment -

          SimpleDataSource didn't like this change. I switched it back to Class.forName() so the unit test could pass.

          Show
          Bill Burke
          added a comment - SimpleDataSource didn't like this change. I switched it back to Class.forName() so the unit test could pass.
          Hide
          Kevin Conner
          added a comment -

          Okay, thanks. Will try with my helper class.

          Show
          Kevin Conner
          added a comment - Okay, thanks. Will try with my helper class.
          Hide
          Mark Little
          added a comment -

          Is this an issue with SimpleDataSource that we need to track?

          Show
          Mark Little
          added a comment - Is this an issue with SimpleDataSource that we need to track?
          Hide
          Kevin Conner
          added a comment -

          Modified resource lookup to use helper class.

          Show
          Kevin Conner
          added a comment - Modified resource lookup to use helper class.
          Hide
          Kevin Conner
          added a comment -

          Fix for SimpleDataSource has been checked into HEAD with revision 10318 and the MP1 branch with revision 10319.

          Show
          Kevin Conner
          added a comment - Fix for SimpleDataSource has been checked into HEAD with revision 10318 and the MP1 branch with revision 10319.
          Hide
          Daniel Bevenius
          added a comment -

          I noticed that the method resolveComposerClass (line 274) in JmsGatewayListener still uses Class.forName(). Is this intentional or should it be using ClassUtil.forName?

          Show
          Daniel Bevenius
          added a comment - I noticed that the method resolveComposerClass (line 274) in JmsGatewayListener still uses Class.forName(). Is this intentional or should it be using ClassUtil.forName?
          Hide
          Kevin Conner
          added a comment -

          Nope, it should be using ClassUtil. It looks like this was reintroduced with a code merge.

          There is another instance of this in the MessageComposer.Factory class so we should do another check for class/resource usage.

          Show
          Kevin Conner
          added a comment - Nope, it should be using ClassUtil. It looks like this was reintroduced with a code merge. There is another instance of this in the MessageComposer.Factory class so we should do another check for class/resource usage.

            People

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

              Dates

              • Created:
                Updated:
                Resolved: