geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <djen...@gluecode.com>
Subject Re: Fail deploying a simple EJB (JavaBean)
Date Sun, 03 Apr 2005 01:12:51 GMT
if your jsp page is unchanged from your earlier post, you either need  
to look up java:comp/env/ejb/DateEJB or change your ejb-ref to indicate  
that you are planning to look up DateEJB.

Could you move this thread to the geronimo-user list please?

thanks
david jencks

On Apr 2, 2005, at 3:54 PM, Katia Aresti Gonzalez wrote:

> Hi David!!!
>
> Ive done what you say....
>
> David Jencks wrote:
>
> "You need to use an ejb-ref or a local ejb-ref in your web.xml dd.   
> The jndi-name element in openejb-jar.xml is basically only for  
> non-j2ee clients such as corba.  Since your entire app is in an ear I  
> would suggest using an ejb-link.  In this case, even if you don't use  
> ejb-link, geronimo will almost certainly figure out the link.  You  
> shouldn't need the openejb-jar.xml plan for an app this simple.
> web.xml.
>  
> <?xml version="1.0"?>
> <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
>          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>          xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
>          http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"  
> version="2.4">
>   <display-name>GeronimoTestWebApp</display-name>
>   <resource-ref>
>     <res-ref-name>jdbc/DataSource</res-ref-name>
>     <res-type>javax.sql.DataSource</res-type>
>     <res-auth>Container</res-auth>
>     <res-sharing-scope>Shareable</res-sharing-scope>
>   </resource-ref>
>   <ejb-ref>
>    <description>Date Session bean</description>
>    <ejb-ref-name>ejb/DateEJB</ejb-ref-name> 
>     <ejb-ref-type>Session</ejb-ref-type> 
>  
>    <home>test.ejb.DateHome</home>
>    <remote>test.ejb.DateRemote</remote> 
>     
>     <ejb-link>DateEJB</ejb-link>
>
>   </ejb-ref>
>
> </web-app>
>  
> But still doesnt work!!!! :-( I don know if im doing wrong the  
> reference, or what...
>  
> This is Geronimo Report when deploying and the error!!!!
>
> 01:50:15,031 INFO  [LocalConfigStore:config-store] Installed  
> configuration Geron
> imoTestApp in location 40
> 01:50:15,140 INFO  [ConfigurationManagerImpl] Loaded Configuration  
> geronimo.conf
> ig:name="GeronimoTestApp"
> 01:50:15,234 INFO  [Configuration] Started configuration  
> GeronimoTestApp
> 01:50:15,265 INFO  [GenericEJBContainer] GenericEJBContainer  
> 'geronimo.server:EJ
> BModule=gtest- 
> ejbs.jar,J2EEApplication=GeronimoTestApp,J2EEServer=geronimo,j2eeT
> ype=StatelessSessionBean,name=DateEJB' started
> 01:50:15,296 INFO  [Container] Started  
> org.mortbay.jetty.servlet.WebApplicationH
> andler@1ab9bfe
> 01:50:15,296 INFO  [/GeronimoTestWebApp] JSR154  
> unwrappedDispatchSupported=true
> 01:50:15,296 INFO  [JettyWebAppContext] JettyWebAppContext started
> 01:50:15,296 INFO  [Container] Started  
> WebApplicationContext[/GeronimoTestWebApp
> ,GeronimoTestWebApp]
> Naming exception occurred during initialization  
> javax.naming.NameNotFoundExcepti
> on: DateEJB
> javax.naming.NameNotFoundException: DateEJB
>         at  
> org.apache.geronimo.naming.java.ReadOnlyContext.lookup(ReadOnlyContex
> t.java:209)
>         at  
> org.apache.geronimo.naming.java.RootContext.lookup(RootContext.java:5
> 1)
>         at javax.naming.InitialContext.lookup(InitialContext.java:347)
>         at  
> org.apache.jsp.ejbtest_jsp._jspService(org.apache.jsp.ejbtest_jsp:72)
>         at  
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:99)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
>         at  
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
> .java:325)
>         at  
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:2
> 95)
>         at  
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
>         at  
> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:427
> )
>         at  
> org.apache.geronimo.jetty.JettyServletHolder.handle(JettyServletHolde
> r.java:92)
>         at  
> org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(
> WebApplicationHandler.java:833)
>         at  
> org.mortbay.jetty.servlet.JSR154Filter.doFilter(JSR154Filter.java:171
> )
>         at  
> org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(
> WebApplicationHandler.java:824)
>         at  
> org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicati
> onHandler.java:474)
>         at  
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:5
> 56)
>         at org.mortbay.http.HttpContext.handle(HttpContext.java:1563)
>         at  
> org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplication
> Context.java:625)
>         at org.mortbay.http.HttpContext.handle(HttpContext.java:1515)
>         at org.mortbay.http.HttpServer.service(HttpServer.java:958)
>         at  
> org.mortbay.http.HttpConnection.service(HttpConnection.java:814)
>         at  
> org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:981)
>         at  
> org.mortbay.http.HttpConnection.handle(HttpConnection.java:831)
>         at  
> org.mortbay.http.SocketListener.handleConnection(SocketListener.java:
> 244)
>         at  
> org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
>         at  
> org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)
>
>  
>  
>  
>
>
>
>
>
>
> Acepta el reto MSN Premium: incluye Antivirus y Firewall de McAffee.  
> Descárgalo y pruébalo 2 meses gratis. 

Mime
View raw message