geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@geronimo.apache.org
Subject [jira] Commented: (GERONIMO-282) servlet calls ejb: "class not found" at deployment and run time
Date Wed, 08 Sep 2004 22:08:38 GMT
The following comment has been added to this issue:

     Author: toby cabot
    Created: Wed, 8 Sep 2004 3:08 PM
       Body:
At least as a workaround, this works if I use the ejb-link element in web.xml, e.g.

...
    <ejb-ref>
        <ejb-ref-name>ejb/SSEJB</ejb-ref-name>
        <ejb-ref-type>Session</ejb-ref-type>
        <home>g6o.ejbclient.StatelessSessionHome</home>
        <remote>g6o.ejbclient.StatelessSession</remote>
        <ejb-link>StatelessSession</ejb-link>
    </ejb-ref>
...

I've got the ejb client jar in the war lib/ directory, and I use "java:comp/env/ejb/SSEJB"
to look up the EJB in JNDI.

---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/browse/GERONIMO-282?page=comments#action_52987

---------------------------------------------------------------------
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: Reopened
   Priority: Major

    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 3:08 PM
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


Mime
View raw message