inject ejb into webservice

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

inject ejb into webservice

jazon-2
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 | Threaded
Open this post in threaded view
|

Re: inject ejb into webservice

jazon-2
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 <[hidden email]> 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 | Threaded
Open this post in threaded view
|

Re: inject ejb into webservice

Dain Sundstrom
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 <[hidden email]> 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 | Threaded
Open this post in threaded view
|

Re: inject ejb into webservice

jazon-2
Thanks for your reply.
the exception printed in openejb.log is as the following, is this a bug?

2008-12-03 14:19:00,968 - INFO  - Created Ejb(deployment-id=HelloEjbService,
ejb-name=HelloEjbService, container=My Stateless Container)
2008-12-03 14:19:00,968 - INFO  - Created Ejb(deployment-id=AnnotatedEJB,
ejb-name=AnnotatedEJB, container=My Stateless Container)
2008-12-03 14:19:00,968 - INFO  - Created Ejb(deployment-id=SecureEJB,
ejb-name=SecureEJB, container=My Stateless Container)
2008-12-03 14:19:00,968 - INFO  - Deployed
Application(path=C:\research\openejb\ws\apache-tomcat-6.0.18\webapps\ejb-examples)
2008-12-03 14:19:01,437 - INFO  - Webservice(wsdl=
http://localhost:8080/HelloEjbService, qname={
http://examples.org/wsdl}HelloEjbService) --> Ejb(id=HelloEjbService)
2008-12-03 14:19:01,578 - ERROR - Error deploying CXF webservice for servlet
HelloPojoService
javax.xml.ws.WebServiceException: Service resource injection failed
    at
org.apache.openejb.server.cxf.pojo.PojoEndpoint.<init>(PojoEndpoint.java:61)
    at
org.apache.openejb.server.cxf.pojo.PojoWsContainer.createEndpoint(PojoWsContainer.java:38)
    at
org.apache.openejb.server.cxf.pojo.PojoWsContainer.createEndpoint(PojoWsContainer.java:26)
    at
org.apache.openejb.server.cxf.CxfWsContainer.start(CxfWsContainer.java:63)
    at
org.apache.openejb.server.cxf.pojo.PojoWsContainer.start(PojoWsContainer.java:43)
    at
org.apache.openejb.server.cxf.CxfService.createPojoWsContainer(CxfService.java:69)
    at
org.apache.openejb.server.webservices.WsService.afterApplicationCreated(WsService.java:301)
    at
org.apache.openejb.tomcat.catalina.TomcatWebAppBuilder.afterStart(TomcatWebAppBuilder.java:295)
    at
org.apache.openejb.tomcat.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:60)
    at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
    at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4337)
    at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
    at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
    at
org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:627)
    at
org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
    at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
    at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
    at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
    at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
    at
org.apache.catalina.core.StandardService.start(StandardService.java:516)
    at
org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: java.lang.NullPointerException
    at
org.apache.openejb.InjectionProcessor.fillInjectionProperties(InjectionProcessor.java:158)
    at
org.apache.openejb.InjectionProcessor.construct(InjectionProcessor.java:90)
    at
org.apache.openejb.InjectionProcessor.createInstance(InjectionProcessor.java:72)
    at
org.apache.openejb.server.cxf.pojo.PojoEndpoint.<init>(PojoEndpoint.java:57)
    ... 32 more
2008-12-03 14:19:01,718 - INFO  - Configuring enterprise application:
C:\research\openejb\ws\apache-tomcat-6.0.18\webapps\openejb
2008-12-03 14:19:01,718 - INFO  - Enterprise application
"C:\research\openejb\ws\apache-tomcat-6.0.18\webapps\openejb" loaded.
2008-12-03 14:19:01,718 - INFO  - Assembling app:
C:\research\openejb\ws\apache-tomcat-6.0.18\webapps\openejb
2008-12-03 14:19:01,734 - INFO  - Deployed
Application(path=C:\research\openejb\ws\apache-tomcat-6.0.18\webapps\openejb)
2008-12-03 14:19:01,828 - INFO  - Configuring enterprise application:
C:\research\openejb\ws\apache-tomcat-6.0.18\webapps\docs


On Wed, Dec 3, 2008 at 1:23 PM, Dain Sundstrom <[hidden email]> wrote:

> 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 <[hidden email]> 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 | Threaded
Open this post in threaded view
|

Re: inject ejb into webservice

Dain Sundstrom
Yes, definitely a bug.  I created a JIRA to track this issue.

https://issues.apache.org/jira/browse/OPENEJB-967

In the mean time, I bet @Stateless webservices will work for you.

-dain


On Dec 3, 2008, at 12:26 PM, Jazon wrote:

> Thanks for your reply.
> the exception printed in openejb.log is as the following, is this a  
> bug?
>
> 2008-12-03 14:19:00,968 - INFO  - Created Ejb(deployment-
> id=HelloEjbService,
> ejb-name=HelloEjbService, container=My Stateless Container)
> 2008-12-03 14:19:00,968 - INFO  - Created Ejb(deployment-
> id=AnnotatedEJB,
> ejb-name=AnnotatedEJB, container=My Stateless Container)
> 2008-12-03 14:19:00,968 - INFO  - Created Ejb(deployment-id=SecureEJB,
> ejb-name=SecureEJB, container=My Stateless Container)
> 2008-12-03 14:19:00,968 - INFO  - Deployed
> Application(path=C:\research\openejb\ws\apache-tomcat-6.0.18\webapps
> \ejb-examples)
> 2008-12-03 14:19:01,437 - INFO  - Webservice(wsdl=
> http://localhost:8080/HelloEjbService, qname={
> http://examples.org/wsdl}HelloEjbService) --> Ejb(id=HelloEjbService)
> 2008-12-03 14:19:01,578 - ERROR - Error deploying CXF webservice for  
> servlet
> HelloPojoService
> javax.xml.ws.WebServiceException: Service resource injection failed
>    at
> org
> .apache
> .openejb.server.cxf.pojo.PojoEndpoint.<init>(PojoEndpoint.java:61)
>    at
> org
> .apache
> .openejb
> .server.cxf.pojo.PojoWsContainer.createEndpoint(PojoWsContainer.java:
> 38)
>    at
> org
> .apache
> .openejb
> .server.cxf.pojo.PojoWsContainer.createEndpoint(PojoWsContainer.java:
> 26)
>    at
> org
> .apache.openejb.server.cxf.CxfWsContainer.start(CxfWsContainer.java:
> 63)
>    at
> org
> .apache
> .openejb.server.cxf.pojo.PojoWsContainer.start(PojoWsContainer.java:
> 43)
>    at
> org
> .apache
> .openejb.server.cxf.CxfService.createPojoWsContainer(CxfService.java:
> 69)
>    at
> org
> .apache
> .openejb
> .server.webservices.WsService.afterApplicationCreated(WsService.java:
> 301)
>    at
> org
> .apache
> .openejb
> .tomcat
> .catalina.TomcatWebAppBuilder.afterStart(TomcatWebAppBuilder.java:295)
>    at
> org
> .apache
> .openejb
> .tomcat
> .catalina
> .GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:60)
>    at
> org
> .apache
> .catalina
> .util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
>    at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:
> 4337)
>    at
> org
> .apache
> .catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
>    at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:
> 771)
>    at  
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
>    at
> org
> .apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:
> 627)
>    at
> org
> .apache
> .catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
>    at
> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
>    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:
> 1149)
>    at
> org
> .apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:
> 311)
>    at
> org
> .apache
> .catalina
> .util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
>    at  
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
>    at org.apache.catalina.core.StandardHost.start(StandardHost.java:
> 719)
>    at  
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
>    at
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
>    at
> org.apache.catalina.core.StandardService.start(StandardService.java:
> 516)
>    at
> org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
>    at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
>    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>    at
> sun
> .reflect
> .NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>    at
> sun
> .reflect
> .DelegatingMethodAccessorImpl
> .invoke(DelegatingMethodAccessorImpl.java:25)
>    at java.lang.reflect.Method.invoke(Method.java:597)
>    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
>    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
> Caused by: java.lang.NullPointerException
>    at
> org
> .apache
> .openejb
> .InjectionProcessor.fillInjectionProperties(InjectionProcessor.java:
> 158)
>    at
> org
> .apache.openejb.InjectionProcessor.construct(InjectionProcessor.java:
> 90)
>    at
> org
> .apache
> .openejb.InjectionProcessor.createInstance(InjectionProcessor.java:72)
>    at
> org
> .apache
> .openejb.server.cxf.pojo.PojoEndpoint.<init>(PojoEndpoint.java:57)
>    ... 32 more
> 2008-12-03 14:19:01,718 - INFO  - Configuring enterprise application:
> C:\research\openejb\ws\apache-tomcat-6.0.18\webapps\openejb
> 2008-12-03 14:19:01,718 - INFO  - Enterprise application
> "C:\research\openejb\ws\apache-tomcat-6.0.18\webapps\openejb" loaded.
> 2008-12-03 14:19:01,718 - INFO  - Assembling app:
> C:\research\openejb\ws\apache-tomcat-6.0.18\webapps\openejb
> 2008-12-03 14:19:01,734 - INFO  - Deployed
> Application(path=C:\research\openejb\ws\apache-tomcat-6.0.18\webapps
> \openejb)
> 2008-12-03 14:19:01,828 - INFO  - Configuring enterprise application:
> C:\research\openejb\ws\apache-tomcat-6.0.18\webapps\docs
>
>
> On Wed, Dec 3, 2008 at 1:23 PM, Dain Sundstrom <[hidden email]> wrote:
>
>> 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 <[hidden email]> 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
>>>>
>>>>
>>