Hummmmm, the WebServiceContainer is automatically setup when embedded into Tomcat... My guess is there is another exception printed in the OpenEJB log file which is causing the WebServiceContainer to not be set.

I never tried @EJB injection into a POJO webservice, but it should work. Can you try adding the same annotation to the HelloEjbService.java? If it works in the EJB service, then I'd guess that POJO webservice injection is broken (or not implemented).

-dain

On Dec 2, 2008, at 7:28 AM, Jazon wrote:

Is this a configuration problem? Do I need to configure WebService Container
somewhere?

Appreciate for any help.
Thanks

On Mon, Dec 1, 2008 at 2:20 PM, Jazon <[EMAIL PROTECTED]> wrote:

Hi,
I am playing with the web service of openejb webapp example. it works fine.

But when I add
   @EJB
   AnnotatedEJBLocal annotatedEjb;
to HelloPojoService.java, it gives me this Exception:

http://localhost:8080/ejb-examples/hello

Dec 1, 2008 2:10:38 PM org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet HelloPojoService threw exception
javax.servlet.ServletException: WebServiceContainer has not been set
   at
org .apache.openejb.server.webservices.WsServlet.service(WsServlet.java: 84)
   at
org .apache .catalina .core .ApplicationFilterChain .internalDoFilter(ApplicationFilterChain.java:290)
   at
org .apache .catalina .core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java: 206)
   at
org .apache .catalina .core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
   at
org .apache .catalina .core.StandardContextValve.invoke(StandardContextValve.java:191)
   at
org .apache .openejb.tomcat.catalina.OpenEJBValve.invoke(OpenEJBValve.java:45)
   at
org .apache .catalina .authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
   at
org .apache .catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
   at
org .apache .catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
   at
org .apache .catalina.core.StandardEngineValve.invoke(StandardEngineValve.java: 109)
   at
org .apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java: 286)
   at
org .apache.coyote.http11.Http11Processor.process(Http11Processor.java: 845)
   at
org.apache.coyote.http11.Http11Protocol $Http11ConnectionHandler.process(Http11Protocol.java:583)
   at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java: 447)
   at java.lang.Thread.run(Thread.java:619)

Does anybody know how to solve this problem?
Thanks


Reply via email to