0 Replies Latest reply on Aug 28, 2003 3:56 PM by null null

    EJB Deployed, runtime NoClassDefFound error

    null null Newbie

      Hello,

      I have a EJB jar file that has some SLB's and classes that SLB's make call to. Those classes depend on some third party classes/jar. Also, to work properly these classes need a .properties file.

      My ejb jar file contains the third party jar and the properties file. There is no problem while deploying. I get a NoClassDefFound error at runtime. I believe one of the classes is not able to find the properties file (need to figure out how to allow access to .properties file in an ejb jar file). Everything works fine when we test the application using Eclipse with a Glider plugin that provides a simulated environment for ejb container. I have also tried putting the third party jar file in jboss/server/all/lib directory as 'all' is my jboss server.

      Below is the stack trace:
      steps.common.exception.PresentationException: java.rmi.ServerError: Unexpected Error; nested exception is: java.lang.NoClassDefFoundError: net/sf/hibernate/HibernateException steps.common.web.impl.StepsController.perform(StepsController.java:187) org.infohazard.maverick.ctl.FormBeanUser.go(FormBeanUser.java:61) org.infohazard.maverick.flow.CommandBase.go(CommandBase.java:44) org.infohazard.maverick.Dispatcher.service(Dispatcher.java:237) javax.servlet.http.HttpServlet.service(HttpServlet.java:853) org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:360) org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:294) org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:558) org.mortbay.http.HttpContext.handle(HttpContext.java:1714) org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:507) org.mortbay.http.HttpContext.handle(HttpContext.java:1664) org.mortbay.http.HttpServer.service(HttpServer.java:863) org.jboss.jetty.Jetty.service(Jetty.java:460) org.mortbay.http.HttpConnection.service(HttpConnection.java:775) org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:939) org.mortbay.http.HttpConnection.handle(HttpConnection.java:792) org.mortbay.http.SocketListener.handleConnection(SocketListener.java:201) org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289) org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:455) ------------------- java.rmi.ServerError: Unexpected Error; nested exception is: java.lang.NoClassDefFoundError: net/sf/hibernate/HibernateException org.jboss.ejb.plugins.LogInterceptor.handleException(LogInterceptor.java:373) org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:195) org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122) org.jboss.ejb.StatelessSessionContainer.internalInvoke(StatelessSessionContainer.java:322) org.jboss.ejb.Container.invoke(Container.java:674) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:324) org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284) org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549) org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:101) org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:83) org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46) org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:45) org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:100) org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:85) $Proxy57.getAllOrganizationTypes(Unknown Source) steps.om.web.ctl.OrganizationSearchController.processRequest(OrganizationSearchController.java:74) steps.common.web.impl.StepsController.perform(StepsController.java:174) org.infohazard.maverick.ctl.FormBeanUser.go(FormBeanUser.java:61) org.infohazard.maverick.flow.CommandBase.go(CommandBase.java:44) org.infohazard.maverick.Dispatcher.service(Dispatcher.java:237) javax.servlet.http.HttpServlet.service(HttpServlet.java:853) org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:360) org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:294) org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:558) org.mortbay.http.HttpContext.handle(HttpContext.java:1714) org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:507) org.mortbay.http.HttpContext.handle(HttpContext.java:1664) org.mortbay.http.HttpServer.service(HttpServer.java:863) org.jboss.jetty.Jetty.service(Jetty.java:460) org.mortbay.http.HttpConnection.service(HttpConnection.java:775) org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:939) org.mortbay.http.HttpConnection.handle(HttpConnection.java:792) org.mortbay.http.SocketListener.handleConnection(SocketListener.java:201) org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289) org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:455) ------------------- java.lang.NoClassDefFoundError: net/sf/hibernate/HibernateException steps.common.persistence.impl.PersistenceManagerFactory.createDefaultPersistenceManager(PersistenceManagerFactory.java:65) steps.common.persistence.impl.PersistenceManagerFactory.createManagerFor(PersistenceManagerFactory.java:149) steps.common.persistence.impl.PersistenceManagerFactory.getManagerFor(PersistenceManagerFactory.java:182) steps.common.persistence.impl.PersistenceManagerFactory.getManagerFor(PersistenceManagerFactory.java:195) steps.common.model.impl.PersistableModel.getPersistenceManager(PersistableModel.java:69) steps.common.model.impl.PersistableModel.retrieveAll(PersistableModel.java:103) steps.common.entity.impl.OrganizationType.getAllTypes(OrganizationType.java:252) steps.om.service.impl.ManageOrganizationTypesServiceBean.getAllOrganizationTypes(ManageOrganizationTypesServiceBean.java:183) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:324) org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:629) org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186) org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:72) org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84) org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:243) org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:104) org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:117) org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191) org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122) org.jboss.ejb.StatelessSessionContainer.internalInvoke(StatelessSessionContainer.java:322) org.jboss.ejb.Container.invoke(Container.java:674) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:324) org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284) org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549) org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:101) org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:83) org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46) org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:45) org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:100) org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:85) $Proxy57.getAllOrganizationTypes(Unknown Source) steps.om.web.ctl.OrganizationSearchController.processRequest(OrganizationSearchController.java:74) steps.common.web.impl.StepsController.perform(StepsController.java:174) org.infohazard.maverick.ctl.FormBeanUser.go(FormBeanUser.java:61) org.infohazard.maverick.flow.CommandBase.go(CommandBase.java:44) org.infohazard.maverick.Dispatcher.service(Dispatcher.java:237) javax.servlet.http.HttpServlet.service(HttpServlet.java:853) org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:360) org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:294) org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:558) org.mortbay.http.HttpContext.handle(HttpContext.java:1714) org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:507) org.mortbay.http.HttpContext.handle(HttpContext.java:1664) org.mortbay.http.HttpServer.service(HttpServer.java:863) org.jboss.jetty.Jetty.service(Jetty.java:460) org.mortbay.http.HttpConnection.service(HttpConnection.java:775) org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:939) org.mortbay.http.HttpConnection.handle(HttpConnection.java:792) org.mortbay.http.SocketListener.handleConnection(SocketListener.java:201) org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289) org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:455)