2 Replies Latest reply on Feb 9, 2006 12:21 PM by pbriggs

    ClassLoader fails to detect external jar

    pbriggs

      Hi,

      I have what I at first thought was a ClassLoader-related issue, but I read the faq etc and couldn't find where I was going wrong.

      Jboss (3.2.2) is reporting a NoClassDefFound runtime exception from my application referring to a class in an external jar that I have in the server/default/lib directory, however the class is definitely there, in the expected place within the jar, and compiled with the same java version.

      After much hair pulling I tried deploying the app on a colleague's machine, where it works fine (with the jar in server/default/lib) on the same jboss version.

      I also tried deploying on a fresh install of 3.2.5 - same problem.

      Anyone have any ideas?

      Thanks in advance,
      Pete

        • 1. Re: ClassLoader fails to detect external jar

          In your JMX console, click

          name=Default,service=LoaderRepository

          and execute the displayClassInfo() method, passing it the fqn of your class.

          That may give you some clues as to whether it's being loaded, and where from, and by what.

          • 2. Re: ClassLoader fails to detect external jar
            pbriggs

            Hi Tyler,

            Thanks for the reply. I did as you suggested and found references to another copy of the jar lingering in my war file (where I'd put it when I'd gotten to the try-everything-regardless-of-whether-it-makes-sense stage of debugging).

            Having removed that, the class is being loaded successfully... although now I'm getting Axis-related exceptions - definitely progress though!

            Thanks again,
            Pete