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

    Strange NoClassDefFoundError for AS 4.2.0 on WinXP

    Patrick Brannigan Newbie


      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.