6 Replies Latest reply on Mar 7, 2005 9:39 PM by abcolson

    4.0.x classloader NoClassDefFoundException

    John Muhlestein Newbie

      I have an application, packaged in an EAR file which deployed just fine under 3.2.x I have been attempting to get it to deploy under 4.0.0, discovering that there was a change to scoped class loading. The suggestion was to deploy the EAR under the standard server configuration to avoid the

      [EARDeployer] Verify failed; continuing
      java.lang.NoClassDefFoundException lotus/domino/Session

      This did not solve the problem, it was stated that with the release of 4.0.1 that there would be a return to the 3.2.x class loading scheme. I have since attempted to deploy on 4.0.1 and continue to get the same errors.

      The class in question (lotus.domino.Session) exists in the NCSO.jar with the following EAR structure.

      |__ app-ejb.jar

      The only way I have discovered to get the app to deploy is to put the NCSO.jar file in the $JBOSS_HOME/server/*/lib/ directory and then to redeploy

      This seems to be a bad workaround, does anyone have a suggestion on how to get the EAR to deploy without the Verify failure?

        • 1. Re: 4.0.x classloader NoClassDefFoundException
          Anil Saldanha Master

          Why is the lib under META-INF? Move it one level higher and give it a shot!

          • 2. Re: 4.0.x classloader NoClassDefFoundException
            John Muhlestein Newbie

            To be honest, that's just how XDoclet built it. It's always worked that way and it does find all the other jar files in the lib directory.

            • 3. Re: 4.0.x classloader NoClassDefFoundException
              abcolson Newbie

              I have a simplified version of the same problem. Using JBoss 4.0.0RC2 I have

               |__ app-ejb.jar

              The error is

              WARN [EJBDeployer] Verify failed; continuing
              java.lang.NoClassDefFoundError: epi/projects/ComplianceProjectParticipantDTO

              The class is there plain for everybody to see, not even buried in a sub jar as in the original post.

              Here is some background...

              Originally the app deployed fine. I decided to add DTOs (Data Transfer Objects/EJB View objects). Each EJB has a corresponding DTO class which mirrors the data methods but doesn't have the EJB functionality. Hence each EJB has getData()/setData() methods which utilizes its DTO counterpart.

              Perhaps of curious note is that the EJB and its DTO are not in the same package (see above), but I don't know why this should matter.

              I haven't yet tried any of the less desirable work-arounds; I was hoping the problem was fixed but noone posted the solution yet.

              Any input is appreciated.

              • 4. Re: 4.0.x classloader NoClassDefFoundException
                abcolson Newbie

                Latest update...

                I get the same errors with jboss-4.0.1sp1.

                As stated previously by jjmuhlestein maybe the class loading scheme will be fixed in the next release.

                Does anybody know when the next release will be?

                Anything we can do in the mean time?

                • 5. Re: 4.0.x classloader NoClassDefFoundException
                  abcolson Newbie

                  Same errors in JBoss version 3.2.6.

                  BTW, the only differences ( from "jar tf") between the "bad" jar and one that works is the presence of the DTO classes in the bad jar (about 6) as noted previously in my first post.

                  • 6. Re: 4.0.x classloader NoClassDefFoundException
                    abcolson Newbie

                    I found my problem. Recall the initial error was

                    java.lang.NoClassDefFoundError: epi/projects/ComplianceProjectParticipantDTO

                    This was very misleading because it had me chasing ghosts such as class loader issues. The real problem was that this class used a third party interface (DTO) that was not in the java class path for JBoss.

                    (See http://www.jboss.org/index.html?module=bb&op=viewtopic&t=51103)

                    Once I put the third party jar with the DTO interface under the lib directory for my JBoss deployment things worked fine.

                    BTW, I tested with JBoss versions 4.0.0RC2 and 4.0.1sp1, so it would appear that my problem had nothing to do with the above mentioned class loader issues with 4.0.0.