2 Replies Latest reply on Jun 18, 2007 10:49 PM by toecheez

    Strange NoClassDefFoundError for AS 4.2.0 on WinXP

      Hi.

      I am experiencing the strangest error with my deployment on AS 4.2.0. There is a class that is referred to by the EJBs, but I get a NCDFE for only that one class. It is packaged in the same jar as the EJBs and if i look in the JBoss tmp /deploy folder it is in the jar file. The EJBs refer to other classes in a common.jar that it has no problem finding. I also packaged the class up in the common.jar file instead of the ejb.jar file and it could not find that one particular class. Here is the error:


      Caused by: java.lang.NoClassDefFoundError: com/terradatum/metrics/ejbcontainer/util/Util
       at com.terradatum.metrics.ejbcontainer.services.mymarket.MyMarketGetSearchProcedure.execute(MyMarketGetSearchProcedure.java:88)
       at com.terradatum.common.db.OracleDataAccessObject.submit(OracleDataAccessObject.java:73)
       at com.terradatum.metrics.ejbcontainer.services.mymarket.MyMarketServices.getSearch(MyMarketServices.java:123)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
       at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:237)
       at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:158)
       at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
       at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
       at org.jboss.ejb.plugins.AbstractTxInterceptorBMT.invokeNext(AbstractTxInterceptorBMT.java:173)
       at org.jboss.ejb.plugins.TxInterceptorBMT.invoke(TxInterceptorBMT.java:77)
       at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:169)
       at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:168)
       at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
       ... 46 more


      The class that is referred to in the second line of that stack trace is in the same jar file as the NCDFE class.

      Also, we have used the same script to package and deploy the app on Red Hat Linux, XP and Windows Vista. The Linux and Windows Vista deployments do not have this issue.

      I will try renaming it or something, but at this point I am totally confused.

      I have been using JBoss AS for nearly 10 years now and normally find no mysteries in troubleshooting problems. Thanks for the product and thanks for any help.

      -ToeCheez



        • 1. Re: Strange NoClassDefFoundError for AS 4.2.0 on WinXP


          Hello.

          I am getting this strange error. Here is more info: I tried renaming the class, moving the class to another package, changing the version of JBoss AS, and trying a different version of Java. Is there anyway a class loader would have OS-specific issues?

          Thanks again.

          ToeCheez

          • 2. Re: Strange NoClassDefFoundError for AS 4.2.0 on WinXP

            Thank y'all for your patience. It turns out that my Eclipse IDE was at fault...ish. If i compiled the classes using Eclipse I would get the error, and if not I wouldn't. So I updated Eclipse and it worked.

            Funny that it was only one class in like 1,000 every time.

            Thanks, JBoss.
            -patrick