Invalid AtmosphereHandler

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

Invalid AtmosphereHandler

Okada Hitoshi
Hi,

The chat sample doesn't work on tomcat 6.0 due to the following error.
Do you know what happened?

--
javax.servlet.ServletException: Invalid AtmosphereHandler
        at org.atmosphere.cpr.WebContainer.map(WebContainer.java:134)
        at org.atmosphere.cpr.WebContainer.action(WebContainer.java:107)
        at org.atmosphere.cpr.WebContainer.suspended(WebContainer.java:93)
        at org.atmosphere.container.TomcatCometSupport.service(TomcatCometSupport.java:105)
        at org.atmosphere.cpr.AtmosphereServlet.event(AtmosphereServlet.java:326)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilterEvent(ApplicationFilterChain.java:470)
        at org.apache.catalina.core.ApplicationFilterChain.doFilterEvent(ApplicationFilterChain.java:363)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
        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:263)
        at org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:887)
        at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:696)
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:2009)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)

The request is here:
http://localhost:8080/atmosphere-chat/ChatAtmosphereHandler?0

Thank you in advance,

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

Reply | Threaded
Open this post in threaded view
|

Re: Invalid AtmosphereHandler

Jeanfrancois Arcand
Salut,

Okada Hitoshi wrote:

> Hi,
>
> The chat sample doesn't work on tomcat 6.0 due to the following error.
> Do you know what happened?
>
> --
> javax.servlet.ServletException: Invalid AtmosphereHandler
> at org.atmosphere.cpr.WebContainer.map(WebContainer.java:134)
> at org.atmosphere.cpr.WebContainer.action(WebContainer.java:107)
> at org.atmosphere.cpr.WebContainer.suspended(WebContainer.java:93)
> at org.atmosphere.container.TomcatCometSupport.service(TomcatCometSupport.java:105)
> at org.atmosphere.cpr.AtmosphereServlet.event(AtmosphereServlet.java:326)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilterEvent(ApplicationFilterChain.java:470)
> at org.apache.catalina.core.ApplicationFilterChain.doFilterEvent(ApplicationFilterChain.java:363)
> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
> 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:263)
> at org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:887)
> at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:696)
> at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:2009)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
> at java.lang.Thread.run(Unknown Source)
>
> The request is here:
> http://localhost:8080/atmosphere-chat/ChatAtmosphereHandler?0

Can you attach the Tomcat log? I just tried and it works fine for me.
Have you changed the distribution/war by any chance?

A+

-- Jeanfrancois




>
> Thank you in advance,
>
> ---------------------------------------------------------------------
> 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]

Reply | Threaded
Open this post in threaded view
|

Re: Invalid AtmosphereHandler

choesang
Hi!

I am getting the same errors as Okada

javax.servlet.ServletException: Invalid AtmosphereHandler
        org.atmosphere.cpr.WebContainer.map(WebContainer.java:134)
        org.atmosphere.cpr.WebContainer.action(WebContainer.java:107)
        org.atmosphere.cpr.WebContainer.suspended(WebContainer.java:93)
        org.atmosphere.container.TomcatCometSupport.service(TomcatCometSupport.java:105)
        org.atmosphere.cpr.AtmosphereServlet.event(AtmosphereServlet.java:355)
        org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
        org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:879)
        org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:719
)
        org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:2080)
        java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        java.lang.Thread.run(Thread.java:619)
Things I have changed in the war file are:

1. atmosphere-chat-0.1-20090407.224402-4 to atmosphere-chat
2. added META-INF/atmosphere.xml
    modified context-root="/chat" to context-root="/atmosphere-chat"

Any ideas, where i am making the mistake.

Reply | Threaded
Open this post in threaded view
|

Re: Invalid AtmosphereHandler

Jeanfrancois Arcand
Salut,

choesang wrote:

> Hi!
>
> I am getting the same errors as Okada
>
>
>
>> javax.servlet.ServletException: Invalid AtmosphereHandler
>> org.atmosphere.cpr.WebContainer.map(WebContainer.java:134)
>> org.atmosphere.cpr.WebContainer.action(WebContainer.java:107)
>> org.atmosphere.cpr.WebContainer.suspended(WebContainer.java:93)
>>
>> org.atmosphere.container.TomcatCometSupport.service(TomcatCometSupport.java:105)
>> org.atmosphere.cpr.AtmosphereServlet.event(AtmosphereServlet.java:355)
>>
>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
>>
>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
>>
>> org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:879)
>>
>> org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:719
>> )
>>
>> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:2080)
>>
>> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>>
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>> java.lang.Thread.run(Thread.java:619)
>>
>>
>
> Things I have changed in the war file are:
>
> 1. atmosphere-chat-0.1-20090407.224402-4 to atmosphere-chat
> 2. added META-INF/atmosphere.xml
>     modified context-root="/chat" to context-root="/atmosphere-chat"
>
> Any ideas, where i am making the mistake.

Hum when I download the following jar:

http://download.java.net/maven/2/org/atmosphere/samples/atmosphere-chat/0.1-SNAPSHOT/atmosphere-chat-0.1-20090407.224402-4.war

Also renamed, and then deployed (no need to add atmosphere.xml as the
name of the AtmosphereHandler will be used instead. The javascript will
properly send the correct url):

> 20-Apr-2009 10:31:32 AM org.apache.catalina.startup.HostConfig checkResources
> INFO: Undeploying context [/atmosphere-chat]
> 20-Apr-2009 10:31:32 AM org.apache.catalina.startup.HostConfig deployWAR
> INFO: Deploying web application archive atmosphere-chat.war
> 20-Apr-2009 10:31:32 AM org.atmosphere.cpr.AtmosphereServlet init
> WARNING: Missing META-INF/atmosphere.xml. Will try to autodetect AtmosphereHandler
> 20-Apr-2009 10:31:32 AM org.atmosphere.cpr.AtmosphereServlet autoDetectAtmosphereHandlers
> INFO: Sucessfully loaded org.atmosphere.samples.chat.ChatAtmosphereHandler@51127a mapped to context-path ChatAtmosphereHandler
> 20-Apr-2009 10:31:32 AM org.atmosphere.cpr.AtmosphereServlet autoDetectContainer
> INFO: Atmosphere Framework running under container Tomcat version 6.0.x

Can you try it and let me know? If you want to see an example of the
atmosphere.xml uses, take a look at:

http://download.java.net/maven/2/org/atmosphere/samples/atmosphere-flick-comet/0.1-SNAPSHOT/atmosphere-flick-comet-0.1-20090407.224402-7.war

Let me know how it goes.

Thanks

-- Jeanfrancois




>
>

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

Reply | Threaded
Open this post in threaded view
|

Re: Invalid AtmosphereHandler

choesang
Hi Jeanfrancois!

Thank you very much for providing support on your demos.

1. For the chat demo, i downloaded from the link and renamed it to atmosphere-chat.war and deployed on Tomcat 6.0.16. I am testing it under FF3 with firebug. I get the same error as before

500 Internal Server Error:
javax.servlet.ServletException: Invalid AtmosphereHandler
.......
2. The Flickr demo runs flawlessly.

The url points to http://localhost:8080/atmosphere-chat/  
and the posted message is send to http://localhost:8080/atmosphere-chat/ChatAtmosphereHandler 

May be here is the problem!

Reply | Threaded
Open this post in threaded view
|

Re: Invalid AtmosphereHandler

Jeanfrancois Arcand
Salut,

choesang wrote:

> Hi Jeanfrancois!
>
> Thank you very much for providing support on your demos.
>
> 1. For the chat demo, i downloaded from the link and renamed it to
> atmosphere-chat.war and deployed on Tomcat 6.0.16. I am testing it under FF3
> with firebug. I get the same error as before
>
>
>
>> 500 Internal Server Error:
>> javax.servlet.ServletException: Invalid AtmosphereHandler
>> .......
>>
>
> 2. The Flickr demo runs flawlessly.
>
> The url points to http://localhost:8080/atmosphere-chat/ 
> and the posted message is send to
> http://localhost:8080/atmosphere-chat/ChatAtmosphereHandler 
Hum this is strange. Which Connector are you using? Can you try with the
attached war file to see if that makes a difference? Deploy and then
http://localhost:8080/index.html

Sorry I can't reproduce the issue, but I really want to make sure it
works for you.

Thanks

-- Jeanfrancois


>
> May be here is the problem!
>
>

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

atmosphere-chat.war (144K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Invalid AtmosphereHandler

choesang
My connector looks like this: server.xml

<Connector port="8080" protocol="org.apache.coyote.http11.Http11NioProtocol"
               connectionTimeout="20000"
               redirectPort="8443" />

I tried the attached war file. The same error when launched in Tomcat 6.0.16.

This url http://localhost:8080/index.html is empty.

I will try it on Tomcat 6.0.18 this evening and hope to resolve this problem.

merci!
Reply | Threaded
Open this post in threaded view
|

Re: Invalid AtmosphereHandler

Jeanfrancois Arcand
Salut,

choesang wrote:

> My connector looks like this: server.xml
>
> <Connector port="8080" protocol="org.apache.coyote.http11.Http11NioProtocol"
>                connectionTimeout="20000"
>                redirectPort="8443" />
>
> I tried the attached war file. The same error when launched in Tomcat
> 6.0.16.
>
> This url http://localhost:8080/index.html is empty.
>
> I will try it on Tomcat 6.0.18 this evening and hope to resolve this
> problem.

I've tried to reproduce the issue with Tomcat unsuccessfully, but I was
able to reproduce the issue with Weblogic. It seems the WEB-INF/classes
doesn't only include AtmosphereHandler (class get annotated and moved
into another location). I will fix the sample by adding an
atmosphere.xml as this is the only way to make it work on all server. I
will commit and most probably release alpha-3 this week.

MANY thanks for the feedback!

-- Jeanfrancois


>
> merci!

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