geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aaron Mulder (JIRA)" <...@geronimo.apache.org>
Subject [jira] Updated: (GERONIMO-282) servlet calls ejb: "class not found" at deployment and run time
Date Sat, 27 Aug 2005 02:39:05 GMT
     [ http://issues.apache.org/jira/browse/GERONIMO-282?page=all ]

Aaron Mulder updated GERONIMO-282:
----------------------------------

    Fix Version: 1.0
    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


  was:
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


    Environment: 
fedora core 2
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05)


  was:
fedora core 2
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05)



Needs to be reviewed

> servlet calls ejb: "class not found" at deployment and run time
> ---------------------------------------------------------------
>
>          Key: GERONIMO-282
>          URL: http://issues.apache.org/jira/browse/GERONIMO-282
>      Project: Geronimo
>         Type: Bug
>   Components: web
>     Versions: 1.0-M2
>  Environment: fedora core 2
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05)
>     Reporter: toby cabot
>      Fix For: 1.0

>
> 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

-- 
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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message