You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by de...@geronimo.apache.org on 2004/09/08 20:30:38 UTC

[jira] Closed: (GERONIMO-282) servlet calls ejb: "class not found" at deployment and run time

Message:

   The following issue has been closed.

   Resolver: Dain Sundstrom
       Date: Wed, 8 Sep 2004 11:29 AM

Works now
---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/GERONIMO-282

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: GERONIMO-282
    Summary: servlet calls ejb: "class not found" at deployment and run time
       Type: Bug

     Status: Closed
   Priority: Major
 Resolution: FIXED

    Project: Apache Geronimo
 Components: 
             web
   Versions:
             1.0-M2

   Assignee: 
   Reporter: toby cabot

    Created: Thu, 5 Aug 2004 10:35 AM
    Updated: Wed, 8 Sep 2004 11:29 AM
Environment: fedora core 2
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05)


Description:
I'm trying to deploy a servlet that calls an EJB.  I can
deploy the EJB and call if from a command-line Java client, so I think
that part works, thanks to the dev list for help with JNDI.
                                                                                                                                      
I did the usual stuff in the servlet, but when I add
                                                                                                                                      
    <ejb-ref>
        <ejb-ref-name>g6o/SSEJB</ejb-ref-name>
        <ejb-ref-type>Session</ejb-ref-type>
        <home>g6o.ejbclient.StatelessSessionHome</home>
        <remote>g6o.ejbclient.StatelessSession</remote>
    </ejb-ref>
                                                                                                                                      
to web.xml I get a stack trace when I run the deploy tool.
                                                                                                                                      
org.apache.geronimo.deployment.DeploymentException: Remote interface class not found: g6o.ejbclient.StatelessSession
        at org.apache.geronimo.jetty.deployment.JettyModuleBuilder.assureInterface(JettyModuleBuilder.java:593)
        at org.apache.geronimo.jetty.deployment.JettyModuleBuilder.assureEJBObjectInterface(JettyModuleBuilder.java:573)
        at org.apache.geronimo.jetty.deployment.JettyModuleBuilder.addEJBRefs(JettyModuleBuilder.java:491)
                                                                                                                                      
        etc...
                                                                                                                                      
I've got the EJB interfaces in a jar in the war file's WEB-INF/lib
directory, but I also tried putting the jar with the EJB interfaces in
geronimo's lib directory with the same result.
                                                                                                                                      
Copying my ejb client jar to geronimo's repository and adding an element to geronimo-jetty.xml:

<dependency>
    <uri>g6o-ejb-client.jar</uri>
</dependency>

...allows the deployment to get farther, but then I get a message about how references that aren't ejb-link are not implemented, so I cut the ejb-ref element out of web.xml to make the deployment work, and when my servlet tries to look up the EJB I get:

13:19:22,715 ERROR [Daemon] Exception caught during kernel configuration, starting kernel shutdown
org.apache.geronimo.kernel.config.InvalidConfigException: Invalid GBean configuration for geronimo.config:name="g6o/web"
        at org.apache.geronimo.kernel.Kernel.startRecursiveGBean(Kernel.java:274)
        at org.apache.geronimo.system.main.Daemon.main(Daemon.java:146)
Caused by: javax.servlet.ServletException: Naming exception in servlet init: Cannot lookup /g6o/SSEJB: Received error: Error while communicating with server: ; nested exception is:
        java.rmi.RemoteException: Cannot read the response from the server.  The class for an object being returned is not located in this system:; nested exception is:
        java.lang.ClassNotFoundException: g6o.ejbclient.StatelessSessionHome
        at g6o.servlet.Servlet.init(Servlet.java:64)
        at org.mortbay.jetty.servlet.ServletHolder.start(ServletHolder.java:226)
        at org.mortbay.jetty.servlet.ServletHandler.initializeServlets(ServletHandler.java:390)
        at org.mortbay.jetty.servlet.WebApplicationHandler.initializeServlets(WebApplicationHandler.java:287)
        at org.mortbay.jetty.servlet.WebApplicationContext.start(WebApplicationContext.java:421)
        at org.apache.geronimo.jetty.JettyWebAppContext.doStart(JettyWebAppContext.java:198)
        at org.apache.geronimo.gbean.jmx.GBeanMBean.doStart(GBeanMBean.java:593)
        at org.apache.geronimo.gbean.jmx.AbstractManagedObject.attemptFullStart(AbstractManagedObject.java:479)
        at org.apache.geronimo.gbean.jmx.AbstractManagedObject.start(AbstractManagedObject.java:279)
        at org.apache.geronimo.gbean.jmx.AbstractManagedObject.startRecursive(AbstractManagedObject.java:303)
        at org.apache.geronimo.gbean.jmx.GBeanMBean$9.invoke(GBeanMBean.java:940)
        at org.apache.geronimo.gbean.jmx.GBeanMBeanOperation.invoke(GBeanMBeanOperation.java:142)
        at org.apache.geronimo.gbean.jmx.GBeanMBean.invoke(GBeanMBean.java:767)
        at mx4j.server.interceptor.InvokerMBeanServerInterceptor.invoke(InvokerMBeanServerInterceptor.java:218)
        at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:121)
        at mx4j.server.interceptor.SecurityMBeanServerInterceptor.invoke(SecurityMBeanServerInterceptor.java:86)
        at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:121)
        at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:121)
        at mx4j.server.interceptor.ContextClassLoaderMBeanServerInterceptor.invoke(ContextClassLoaderMBeanServerInterceptor.java:205)
        at mx4j.server.MX4JMBeanServer.invoke(MX4JMBeanServer.java:1079)
        at org.apache.geronimo.gbean.jmx.AbstractManagedObject.startRecursive(AbstractManagedObject.java:310)
        at org.apache.geronimo.gbean.jmx.GBeanMBean$9.invoke(GBeanMBean.java:940)
        at org.apache.geronimo.gbean.jmx.GBeanMBeanOperation.invoke(GBeanMBeanOperation.java:142)
        at org.apache.geronimo.gbean.jmx.GBeanMBean.invoke(GBeanMBean.java:767)
        at mx4j.server.interceptor.InvokerMBeanServerInterceptor.invoke(InvokerMBeanServerInterceptor.java:218)
        at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:121)
        at mx4j.server.interceptor.SecurityMBeanServerInterceptor.invoke(SecurityMBeanServerInterceptor.java:86)
        at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:121)
        at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:121)
        at mx4j.server.interceptor.ContextClassLoaderMBeanServerInterceptor.invoke(ContextClassLoaderMBeanServerInterceptor.java:205)
        at mx4j.server.MX4JMBeanServer.invoke(MX4JMBeanServer.java:1079)
        at org.apache.geronimo.kernel.Kernel.invoke(Kernel.java:231)
        at org.apache.geronimo.kernel.Kernel.invoke(Kernel.java:226)
        at org.apache.geronimo.kernel.Kernel.startRecursiveGBean(Kernel.java:272)
        ... 1 more



---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira