Grizzly Comet hasn't been registered

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

Grizzly Comet hasn't been registered

John C. Turnbull

I am trying to implement the chat example that Jean-Francois used in his blog but I get this exception in the same place that other people have reported it in the past (namely cometContext.addCometHandler(handler); in doPost()) only I have checked that the context used to invoke the servlet is the same as that in its mapping configuration.  I am using the latest Grizzly.

 

Are there other possible reasons for getting this exception?  The servlet mapping is “/ChatServlet” and the code to register it is:

 

        contextPath = config.getServletContext().getContextPath() + "/ChatServlet";

 

The chat.jsp used to invoke the servlet has:

 

<frameset>

  <iframe src ="/examples/ChatServlet?action=openchat" name="CometChat" width="100%" scrolling="auto"> </iframe>

  <iframe name="post" src="post.jsp" width="100%" scrolling="no"/>

</frameset>

 

 

Any ideas?

 

Thanks,

 

-JCT

Reply | Threaded
Open this post in threaded view
|

Re: Grizzly Comet hasn't been registered

Shing Wai Chan
Do you have stack trace?

John C. Turnbull wrote:

>
> I am trying to implement the chat example that Jean-Francois used in
> his blog but I get this exception in the same place that other people
> have reported it in the past (namely
> cometContext.addCometHandler(handler); in doPost()) only I have
> checked that the context used to invoke the servlet is the same as
> that in its mapping configuration. I am using the latest Grizzly.
>
> Are there other possible reasons for getting this exception? The
> servlet mapping is “/ChatServlet” and the code to register it is:
>
> contextPath = config.getServletContext().getContextPath() +
> "/ChatServlet";
>
> The chat.jsp used to invoke the servlet has:
>
> <frameset>
>
> <iframe src ="/examples/ChatServlet?action=openchat" name="CometChat"
> width="100%" scrolling="auto"> </iframe>
>
> <iframe name="post" src="post.jsp" width="100%" scrolling="no"/>
>
> </frameset>
>
> Any ideas?
>
> Thanks,
>
> -JCT
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: Grizzly Comet hasn't been registered

John C. Turnbull
Here it is:

StandardWrapperValve[ChatServlet]: PWC1406: Servlet.service() for servlet
ChatServlet threw exception
java.lang.IllegalStateException: Grizzly Comet hasn't been registered
        at
com.sun.grizzly.comet.CometContext.addCometHandler(CometContext.java:220)
        at
com.sun.grizzly.comet.CometContext.addCometHandler(CometContext.java:266)
        at com.john.ChatServlet.doPost(ChatServlet.java:88)
        at com.john.ChatServlet.doGet(ChatServlet.java:44)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:718)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
        at
org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFi
lterChain.java:411)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:290)
        at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContext
Valve.java:271)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:202)
        at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632
)
        at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577
)
        at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206
)
        at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632
)
        at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577
)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:150)
        at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632
)
        at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577
)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
        at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)
        at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(
DefaultProcessorTask.java:637)
        at
com.sun.enterprise.web.connector.grizzly.comet.CometEngine.executeServlet(Co
metEngine.java:547)
        at
com.sun.enterprise.web.connector.grizzly.comet.CometEngine.handle(CometEngin
e.java:299)
        at
com.sun.enterprise.web.connector.grizzly.comet.CometAsyncFilter.doFilter(Com
etAsyncFilter.java:87)
        at
com.sun.enterprise.web.connector.grizzly.async.DefaultAsyncExecutor.invokeFi
lters(DefaultAsyncExecutor.java:175)
        at
com.sun.enterprise.web.connector.grizzly.async.DefaultAsyncExecutor.interrup
t(DefaultAsyncExecutor.java:153)
        at
com.sun.enterprise.web.connector.grizzly.async.AsyncProcessorTask.doTask(Asy
ncProcessorTask.java:92)
        at
com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
        at
com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerTh
read.java:106)

Line 88 of ChatServlet is:

                    cometContext.addCometHandler(handler);

Thanks,

-JCT

> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]]
> Sent: Friday, 4 January 2008 09:57
> To: [hidden email]
> Subject: Re: Grizzly Comet hasn't been registered
>
> Do you have stack trace?
>
> John C. Turnbull wrote:
> >
> > I am trying to implement the chat example that Jean-Francois used in
> > his blog but I get this exception in the same place that other people
> > have reported it in the past (namely
> > cometContext.addCometHandler(handler); in doPost()) only I have
> > checked that the context used to invoke the servlet is the same as
> > that in its mapping configuration. I am using the latest Grizzly.
> >
> > Are there other possible reasons for getting this exception? The
> > servlet mapping is "/ChatServlet" and the code to register it is:
> >
> > contextPath = config.getServletContext().getContextPath() +
> > "/ChatServlet";
> >
> > The chat.jsp used to invoke the servlet has:
> >
> > <frameset>
> >
> > <iframe src ="/examples/ChatServlet?action=openchat" name="CometChat"
> > width="100%" scrolling="auto"> </iframe>
> >
> > <iframe name="post" src="post.jsp" width="100%" scrolling="no"/>
> >
> > </frameset>
> >
> > Any ideas?
> >
> > Thanks,
> >
> > -JCT
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]