2 Replies Latest reply on Nov 13, 2002 6:14 AM by sy.tan

    JBoss3.0.4 - Struts : NoClassDefFoundError (ClassLoading pro

    sy.tan

      Hi,

      I have deployed an ear application in JBoss3.0.4 (ejb + war modules).

      When i tried to access my web application, i encounter NoClassDefFoundError: org/apache/struts/util/MessageResources

      The struts.jar is located at the web module (WEB-INF/lib/struts.jar).


      I noticed that the jboss console indicates loggings of the struts action forwardings when i access my web application. It shows that it has no problems traversing from 1 action to another action (as per what i have defined in my struts-config.xml)

      Since the struts.jar has successfully loaded and it has no problems in traversing from 1 action class to another action class (before the no class found exception occurs), it really puzzles me that NoClassDefFoundError: org/apache/struts/util/MessageResources is encountered at this stage ...

      Can someone help me to resolve this cos i'm really at my wit's end ....

      Thanks,
      - SY

        • 1. Re: JBoss3.0.4 - Struts : NoClassDefFoundError (ClassLoading
          gerwec

          I had the same problem with one of my ears. after copying the *.jar file from WEB_INF/lib to JBOSS_HOME/server/default/lib it workked. maybe this also works for you.

          c.u.
          gernot

          • 2. Re: JBoss3.0.4 - Struts : NoClassDefFoundError (ClassLoading
            sy.tan

            Hi gerwec,

            Thanks for your prompt reply ....

            This may sound wierd ...
            I have already tried moving the struts.jar to the jboss default lib ... The result is that jboss actually access some cached copy of my old class files somewhere(which i dun noe where is it) ...

            How i noe that it is accessing the old class files cos i recognise the messages logged in the console ...
            I have gone to the extent of decoupile my class files from the temp directory jboss dumps the war file to verify the class files' accuracy but to no avail.
            The decompiled class files are correct and i have no idea how jboss got hold of the old class files ...

            So ... so long as the struts.jar is not in the jboss default lib ... it accesses the correct class files ..
            (i also have replaced the jboss a couple of times too to start clean)

            - SY