Guice error under 0.7.2

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

Guice error under 0.7.2

nakoned
hi,
   I am trying to migrate to recent atmosphere (i.e. 0.7.2) from 0.7.0 and I get the following exception:

java.lang.IllegalStateException: No Guice Injector found in current ServletContext !
        at org.atmosphere.plugin.guice.GuiceInjector.inject(GuiceInjector.java:31)
        at org.atmosphere.cpr.DefaultBroadcasterFactory.get(DefaultBroadcasterFactory.java:126)
        at org.atmosphere.cpr.AtmosphereServlet.detectSupportedFramework(AtmosphereServlet.java:756)
        at org.atmosphere.cpr.AtmosphereServlet.loadConfiguration(AtmosphereServlet.java:708)
        at org.atmosphere.cpr.AtmosphereServlet.init(AtmosphereServlet.java:567)
        at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1439)
        at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:1071)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:189)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
        at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:98)
        at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:91)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:162)
        at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:326)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:227)
        at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:170)
        at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:822)
        at com.sun.grizzly.comet.CometEngine.executeServlet(CometEngine.java:444)
        at com.sun.grizzly.comet.CometEngine.handle(CometEngine.java:308)
        at com.sun.grizzly.comet.CometAsyncFilter.doFilter(CometAsyncFilter.java:87)
        at com.sun.grizzly.arp.DefaultAsyncExecutor.invokeFilters(DefaultAsyncExecutor.java:171)
        at com.sun.grizzly.arp.DefaultAsyncExecutor.interrupt(DefaultAsyncExecutor.java:143)
        at com.sun.grizzly.arp.AsyncProcessorTask.doTask(AsyncProcessorTask.java:94)
        at com.sun.grizzly.http.TaskBase.run(TaskBase.java:193)
        at com.sun.grizzly.http.TaskBase.execute(TaskBase.java:175)
        at com.sun.grizzly.arp.DefaultAsyncHandler.handle(DefaultAsyncHandler.java:145)
        at com.sun.grizzly.arp.AsyncProtocolFilter.execute(AsyncProtocolFilter.java:204)
        at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
        at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
        at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
        at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
        at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
        at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
        at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
        at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
        at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
        at java.lang.Thread.run(Thread.java:662)

I added Guice jars to the path, but to no avail. Are there new annotations that I need to set in 0.7.2 to get it to work? Alternatively, is atmosphere 0.7.2 guice dependent? Can I build my code without guice?

Thanks in advance.
Reply | Threaded
Open this post in threaded view
|

Re: Guice error under 0.7.2

nakoned
Any comments? I would like to solve it if possible...