Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

my servlet can not access ejb

0 views
Skip to first unread message

kingson

unread,
Sep 21, 2003, 10:49:49 PM9/21/03
to

hi all
i write a simple helloword EJB
i deloy it ok in weblogic7
when i want to write a servlet to access ejb
it failed
should i setting the web.xml or weblogic.xml
anyone can give me a sample
thanks a lot
the error message is

####<Sep 21, 2003 11:36:35 PM GMT+08:00> <Error> <HTTP> <kingson> <myserver> <ExecuteThread:
'9' for queue: 'default'> <kernel identity> <> <101017> <[ServletContext(id=7157216,name=servletCode,context-path=/servletCode)]
Root cause of ServletException>
java.lang.NoClassDefFoundError
at javax.rmi.PortableRemoteObject.createDelegateIfSpecified(PortableRemoteObject.java:182)
at javax.rmi.PortableRemoteObject.<clinit>(PortableRemoteObject.java:61)
at ejbtoServlet.doGet(ejbtoServlet.java:83)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:945)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:332)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:242)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:5363)
at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:721)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3043)
6650,1-8 99%

Deepak Vohra

unread,
Sep 22, 2003, 10:55:17 AM9/22/03
to

Copy the HelloWorld.class serlvet to the DefaultWebApp/WEB-INF/classes directory.
In web.xml
<servlet>
<servlet-name>
HelloWorld
</servlet-name>
<servlet-class>
examples.servlets.HelloWorld
</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>
HelloWorld
</servlet-name>
<url-pattern>
HelloWorld
</url-pattern>
</servlet-mapping>

Deepak Vohra

unread,
Sep 22, 2003, 10:56:52 AM9/22/03
to

kingson

unread,
Sep 23, 2003, 12:27:45 AM9/23/03
to

still error!!!!
i deloy the ejb as a jar file

[root@kingson applications]# jar tf helloWorldBean.jar
META-INF/MANIFEST.MF
META-INF/
META-INF/weblogic-ejb-jar.xml
META-INF/ejb-jar.xml
hello/
hello/HelloWorldHome.class
hello/HelloWorldBean.class
hello/HelloWorld.class
hello/HelloWorldBean_nru4ls_HomeImplRTD.xml
hello/HelloWorldBean_nru4ls_EOImplRTD.xml
hello/HelloWorldBean_nru4ls_EOImpl.class
hello/HelloWorldBean_nru4ls_Impl.class
hello/HelloWorldBean_nru4ls_HomeImpl.class
_WL_GENERATED

i also copy the helloClient.jar to the <web>/WEB-INF/classes
and the <web>/WEB-INF/lib
but it still not works
maybe i should know what should be included in the helloClient.jar
i just copy the

helloWorld.class
helloWorldBean.class
helloWorldHome.class
and the ejb-jar.xml.weblogic-ejb-jar.xml
into the helloClient.jar

also i set the EJB path into the bea system classpath
so anything error???
why the servlet not works
my Swing client can access the EJB
but the servlet not
i am exhausted
*_*

0 new messages