Deployment Problem in Websphere 4.0

Discussions

EJB programming & troubleshooting: Deployment Problem in Websphere 4.0

  1. Deployment Problem in Websphere 4.0 (1 messages)

    Hi Gurus,
     
    My problem is as follows:
     
    I have around 8 CMP Entity Beans and 2 Stateless Session beans in my application. I have bundled all the entity beans in a single jar known as Entities.jar and both the session beans in a single jar known as Session.jar. I use something known as DataBeans for communicating between the EJBs and the web component(Servlet).These and all the other common classes needed for both the EJBs and the Web components have been bundled into a jar known as Common.jar. All these are in a single ear file.
     
    The WAR file expresses the dependency on the EJB JARs and Common.jar using a MANIFEST Class-Path entry.
    Both the EJB JAR files expresses the dependency on the Common.jar using a MANIFEST Class-Path entry.
     
    I have deployed the ear file successfully.
     
    When I invoke my Servlet, and try to lookup my session bean's home, I get this following exception :
     
    [01.10.23 23:50:54:891 GMT+05:30] 35aa18ee WebGroup X Servlet Error: trying to refine class com/aztecsoft
    /azcatalog/components/session/ServiceHome (bad class loader?): java.lang.LinkageError: trying to refin
    e class com/aztecsoft/azcatalog/components/session/ServiceHome (bad class loader?)
            at java.lang.ClassLoader.defineClass0(Native Method)
            at java.lang.ClassLoader.defineClass(ClassLoader.java:496)
            at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:117)
            at com.ibm.ws.classloader.CompoundClassLoader.findClass(CompoundClassLoader.java:399)
            at com.ibm.ws.classloader.ClassLoaderGroup.findClass(ClassLoaderGroup.java:105)
            at com.ibm.ws.classloader.CompoundClassLoader.findClass(CompoundClassLoader.java:365)
            at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:286)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:257)
            at java.lang.Class.forName1(Native Method)
            at java.lang.Class.forName(Class.java:134)
            at com.aztecsoft.azcatalog.servlet.handlers.AzCatalogHandler.doGetTree(AzCatalogHandler.java:89)
            at com.aztecsoft.azcatalog.servlet.handlers.AzCatalogHandler.handleRequest(AzCatalogHandler.java:169)
            at com.aztecsoft.azcatalog.servlet.MasterServlet.processRequest(MasterServlet.java:85)
            at com.aztecsoft.azcatalog.servlet.MasterServlet.doGet(MasterServlet.java:40)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
            at com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManager.java:827)
            at com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecycleServlet.java:159)
            at com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServlet.java:286)
            at com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycleServlet.java:106)
            at com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:472)
            at com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletManager.java:1012)
            at com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletManager.java:913)
            at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.
    java:499)
            at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:278)
            at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:105)
            at com.ibm.servlet.engine.srt.WebAppInvoker.doForward(WebAppInvoker.java:67)
            at com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:123)
            at com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:67)
            at com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:122)
            at com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListener.java:315)
            at com.ibm.servlet.engine.http11.HttpConnection.handleRequest(HttpConnection.java:60)
            at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:313)
            at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:242)
            at com.ibm.ws.util.CachedThread.run(ThreadPool.java:122)
     
     
    Even If i do a normal Class.forName on the home of the session bean, i get the same exception.
    I am not able to figure out what is the problem.
     
    Can somebody put some light into this dark problem please??? :-)
     
    hoping for lots of replies :-)
     
    Rahul Desai
    Aztec Software
    Bangalore
  2. Hi Rahul

    How have you deployed the object/classes that support your EJB's?
    Have you considered how the WebSphere classpaths tiers work?

    JVM classpath
    EJB classpath
    Web Application classpath

    Check this out -
    WebSphere Classpaths
    (My understanding is that a component can only look up through this tier and not down)

    Stephen