atmosphere chat on tomcat threw java.lang.NullPointerException

classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

atmosphere chat on tomcat threw java.lang.NullPointerException

choesang
Hi Jeanfrancois,

Thank you very much for the hint last time. atmosphere.xml was the problem, I added it to the META-INF and it worked flawlessly until i faced the following problem. I hope you can reproduce this bug.

Tomcat 6.0.18 running on another machine

created two clients: A and B by opening two browsers to http://localhost:8080/atmsophere-chat/ on two machines

Tomcat launches the project without any error and messages are sent and received between the clients. I have been manually stress testing the clients by sending ~5 messages/sec.  After a certain period of time, the following error is thrown.




Apr 22, 2009 5:12:12 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet AtmosphereServlet threw exception
java.lang.NullPointerException
        at org.apache.coyote.http11.InternalNioOutputBuffer.addToBB(InternalNioOutputBuffer.java:620)
        at org.apache.coyote.http11.InternalNioOutputBuffer.access$000(InternalNioOutputBuffer.java:46)
        at org.apache.coyote.http11.InternalNioOutputBuffer$SocketOutputBuffer.doWrite(InternalNioOutputBuffer.java:808)
        at org.apache.coyote.http11.filters.ChunkedOutputFilter.doWrite(ChunkedOutputFilter.java:124)
        at org.apache.coyote.http11.InternalNioOutputBuffer.doWrite(InternalNioOutputBuffer.java:589)
        at org.apache.coyote.Response.doWrite(Response.java:560)
        at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:353)
        at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:434)
        at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:309)
        at org.apache.catalina.connector.OutputBuffer.flush(OutputBuffer.java:288)
        at org.apache.catalina.connector.CoyoteWriter.flush(CoyoteWriter.java:95)
        at org.atmosphere.samples.chat.ChatAtmosphereHandler.onMessage(ChatAtmosphereHandler.java:141)
        at org.atmosphere.cpr.DefaultBroadcaster.broadcast(DefaultBroadcaster.java:116)
        at org.atmosphere.cpr.DefaultBroadcaster.broadcast(DefaultBroadcaster.java:75)
        at org.atmosphere.samples.chat.ChatAtmosphereHandler.onEvent(ChatAtmosphereHandler.java:107)
        at org.atmosphere.cpr.WebContainer.action(WebContainer.java:115)
        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:355)
        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:231)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        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.Http11NioProcessor.process(Http11NioProcessor.java:880)
        at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:719)
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:2081)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
        at java.lang.Thread.run(Thread.java:595)




Client A gets stuck and doesn't react while the client B works and client B's message is received on the client A even though it self is blocked and can not send message.

I closed client A (does not react) and opened another tab and pointed to the atmosphere chat. Every time i send a message, it is shown 3 times on its chat history but the client B gets once and it also happens when the client B sends a message, it is shown 3 times in client A's chat history.

I tested the same chat project under jetty 6.1.16 and until now, its working smoothly.
Do you think it has to do with tomcat cometProcessor?

your opinion is really important in choosing the right application server for our project.

Thanks!



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: atmosphere chat on tomcat threw java.lang.NullPointerException

choesang
I really tested the above on two separate machines: http://10.0.64.4/atmosphere-chat/ 

Below is the screen shot of the 3 messages shown for every message send

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: atmosphere chat on tomcat threw java.lang.NullPointerException

Jeanfrancois Arcand
In reply to this post by choesang
Hi,

choesang wrote:

> Hi Jeanfrancois,
>
> Thank you very much for the hint last time. atmosphere.xml was the problem,
> I added it to the META-INF and it worked flawlessly until i faced the
> following problem. I hope you can reproduce this bug.
>
> Tomcat 6.0.18 running on another machine
>
> created two clients: A and B by opening two browsers to
> http://localhost:8080/atmsophere-chat/ on two machines
>
> Tomcat launches the project without any error and messages are sent and
> received between the clients. I have been manually stress testing the
> clients by sending ~5 messages/sec.  After a certain period of time, the
> following error is thrown.
>
>
>
>
> Apr 22, 2009 5:12:12 PM org.apache.catalina.core.StandardWrapperValve invoke
> SEVERE: Servlet.service() for servlet AtmosphereServlet threw exception
> java.lang.NullPointerException
> at
> org.apache.coyote.http11.InternalNioOutputBuffer.addToBB(InternalNioOutputBuffer.java:620)
> at
> org.apache.coyote.http11.InternalNioOutputBuffer.access$000(InternalNioOutputBuffer.java:46)
> at
> org.apache.coyote.http11.InternalNioOutputBuffer$SocketOutputBuffer.doWrite(InternalNioOutputBuffer.java:808)
> at
> org.apache.coyote.http11.filters.ChunkedOutputFilter.doWrite(ChunkedOutputFilter.java:124)
> at
> org.apache.coyote.http11.InternalNioOutputBuffer.doWrite(InternalNioOutputBuffer.java:589)
> at org.apache.coyote.Response.doWrite(Response.java:560)
> at
> org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:353)
> at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:434)
> at
> org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:309)
> at org.apache.catalina.connector.OutputBuffer.flush(OutputBuffer.java:288)
> at org.apache.catalina.connector.CoyoteWriter.flush(CoyoteWriter.java:95)
> at
> org.atmosphere.samples.chat.ChatAtmosphereHandler.onMessage(ChatAtmosphereHandler.java:141)
> at
> org.atmosphere.cpr.DefaultBroadcaster.broadcast(DefaultBroadcaster.java:116)
> at
> org.atmosphere.cpr.DefaultBroadcaster.broadcast(DefaultBroadcaster.java:75)
> at
> org.atmosphere.samples.chat.ChatAtmosphereHandler.onEvent(ChatAtmosphereHandler.java:107)
> at org.atmosphere.cpr.WebContainer.action(WebContainer.java:115)
> 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:355)
> 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:231)
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
> 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.Http11NioProcessor.process(Http11NioProcessor.java:880)
> at
> org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:719)
> at
> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:2081)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
> at java.lang.Thread.run(Thread.java:595)
>
>
>
>
> Client A gets stuck and doesn't react while the client B works and client
> B's message is received on the client A even though it self is blocked and
> can not send message.
>
> I closed client A (does not react) and opened another tab and pointed to the
> atmosphere chat. Every time i send a message, it is shown 3 times on its
> chat history but the client B gets once and it also happens when the client
> B sends a message, it is shown 3 times in client A's chat history.
>
> I tested the same chat project under jetty 6.1.16 and until now, its working
> smoothly.
> Do you think it has to do with tomcat cometProcessor?

Yes it is probably related to my implementation. Can you file an issue here:

https://atmosphere.dev.java.net/issues/

Meanwhile I will do more testing. Which JDK/platform are you using?

>
> your opinion is really important in choosing the right application server
> for our project.

Did you try with GlassFish v3 by any chance or you need to stay
lightweight with Tomcat or Jetty?

Thanks!

-- Jeanfrancois

>
> Thanks!
>
>
>
>

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

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: atmosphere chat on tomcat threw java.lang.NullPointerException

Jeanfrancois Arcand
In reply to this post by choesang
Salut,

choesang wrote:
> I really tested the above on two separate machines:
> http://10.0.64.4/atmosphere-chat/ 
>
> Below is the screen shot of the 3 messages shown for every message send
>
> http://n2.nabble.com/file/n2677244/chat%2Berror%2Bscreenshot.jpg 

Thanks for the info. Trying to reproduce...
-- Jeanfrancois


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

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [ANN] atmosphere chat on tomcat threw java.lang.NullPointerException

choesang
Hi Jeanfrancois,

I am using jdk 1.6.0_11. My application server choices are limited but i will definetly test it on GlassFish tommorow.

I will file the issue as soon as possible.

Thanks for doing a great job. It makes the web developers life much better.

regards,
choesang
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [ANN] atmosphere chat on tomcat threw java.lang.NullPointerException

choesang
Hi Jeanfrancois,

I ran it under GlassFish v3 prelude. I was able to deploy and launch the chat but as soon as i tried to send a message. I got the following error:

[#|2009-04-22T23:13:28.946+0200|SEVERE|glassfish|Atmosphere|_ThreadID=19;_ThreadName=Thread-3;|AtmosphereServlet exception
java.lang.IllegalStateException: Make sure you have enabled Comet or make sure the Thread invoking that method is the same a the request Thread.
        at com.sun.grizzly.comet.CometContext.addCometHandler(CometContext.java:263)
        at com.sun.grizzly.comet.CometContext.addCometHandler(CometContext.java:311)
        at com.sun.enterprise.web.connector.grizzly.comet.CometContext.addCometHandler(CometContext.java:87)
        at org.atmosphere.container.GlassFishv2CometSupport.service(GlassFishv2CometSupport.java:123)
        at org.atmosphere.cpr.AtmosphereServlet.service(AtmosphereServlet.java:328)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
        at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:431)
        at org.apache.catalina.core.StandardWrapperValve.preInvoke(StandardWrapperValve.java:462)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:139)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:186)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:719)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:657)
        at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:96)
        at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:98)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:187)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:719)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:657)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:651)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1030)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:142)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:719)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:657)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:651)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1030)
        at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:325)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:242)
        at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:180)
        at com.sun.grizzly.http.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:633)
        at com.sun.grizzly.http.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:570)
        at com.sun.grizzly.http.DefaultProcessorTask.process(DefaultProcessorTask.java:827)
        at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:152)
        at com.sun.enterprise.v3.services.impl.GlassfishProtocolChain.executeProtocolFilter(GlassfishProtocolChain.java:71)
        at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:103)
        at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:89)
        at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
        at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:67)
        at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:56)
        at com.sun.grizzly.util.WorkerThreadImpl.processTask(WorkerThreadImpl.java:325)
        at com.sun.grizzly.util.WorkerThreadImpl.run(WorkerThreadImpl.java:184)
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: atmosphere chat on tomcat threw java.lang.NullPointerException

Jeanfrancois Arcand
Salut,

choesang wrote:
> Hi Jeanfrancois,
>
> I ran it under GlassFish v3 prelude. I was able to deploy and launch the
> chat but as soon as i tried to send a message. I got the following error:

make sure you enable Comet by passing -Dv3.grizzly.cometSupport=true or
by editting, in ${glassfish.home}/domains/domain1/config/domain.xml

<http-listener ...port="8080">
  <property name="cometSupport" value="true"/>
<...>

Add the property line.

Thanks!

--Jeanfrancois


>
>
>
>> [#|2009-04-22T23:13:28.946+0200|SEVERE|glassfish|Atmosphere|_ThreadID=19;_ThreadName=Thread-3;|AtmosphereServlet
>> exception
>> java.lang.IllegalStateException: Make sure you have enabled Comet or make
>> sure the Thread invoking that method is the same a the request Thread.
>> at
>> com.sun.grizzly.comet.CometContext.addCometHandler(CometContext.java:263)
>> at
>> com.sun.grizzly.comet.CometContext.addCometHandler(CometContext.java:311)
>> at
>> com.sun.enterprise.web.connector.grizzly.comet.CometContext.addCometHandler(CometContext.java:87)
>> at
>> org.atmosphere.container.GlassFishv2CometSupport.service(GlassFishv2CometSupport.java:123)
>> at
>> org.atmosphere.cpr.AtmosphereServlet.service(AtmosphereServlet.java:328)
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
>> at
>> org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:431)
>> at
>> org.apache.catalina.core.StandardWrapperValve.preInvoke(StandardWrapperValve.java:462)
>> at
>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:139)
>> at
>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:186)
>> at
>> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:719)
>> at
>> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:657)
>> at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:96)
>> at
>> com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:98)
>> at
>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:187)
>> at
>> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:719)
>> at
>> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:657)
>> at
>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:651)
>> at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1030)
>> at
>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:142)
>> at
>> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:719)
>> at
>> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:657)
>> at
>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:651)
>> at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1030)
>> at
>> org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:325)
>> at
>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:242)
>> at
>> com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:180)
>> at
>> com.sun.grizzly.http.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:633)
>> at
>> com.sun.grizzly.http.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:570)
>> at
>> com.sun.grizzly.http.DefaultProcessorTask.process(DefaultProcessorTask.java:827)
>> at
>> com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:152)
>> at
>> com.sun.enterprise.v3.services.impl.GlassfishProtocolChain.executeProtocolFilter(GlassfishProtocolChain.java:71)
>> at
>> com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:103)
>> at
>> com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:89)
>> at
>> com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
>> at
>> com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:67)
>> at
>> com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:56)
>> at
>> com.sun.grizzly.util.WorkerThreadImpl.processTask(WorkerThreadImpl.java:325)
>> at com.sun.grizzly.util.WorkerThreadImpl.run(WorkerThreadImpl.java:184)
>>
>
>

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

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Tomcat NPE possibel fix

Jeanfrancois Arcand
Salut,

I've committed a possible fix and uploading the jars now here (look for
today's date):

http://download.java.net/maven/2/org/atmosphere/atmosphere-portable-runtime/0.1-SNAPSHOT/

Thanks!

-- Jeanfrancois


Jeanfrancois Arcand wrote:

> Salut,
>
> choesang wrote:
>> Hi Jeanfrancois,
>>
>> I ran it under GlassFish v3 prelude. I was able to deploy and launch the
>> chat but as soon as i tried to send a message. I got the following error:
>
> make sure you enable Comet by passing -Dv3.grizzly.cometSupport=true or
> by editting, in ${glassfish.home}/domains/domain1/config/domain.xml
>
> <http-listener ...port="8080">
>  <property name="cometSupport" value="true"/>
> <...>
>
> Add the property line.
>
> Thanks!
>
> --Jeanfrancois
>
>
>>
>>
>>
>>> [#|2009-04-22T23:13:28.946+0200|SEVERE|glassfish|Atmosphere|_ThreadID=19;_ThreadName=Thread-3;|AtmosphereServlet
>>>
>>> exception
>>> java.lang.IllegalStateException: Make sure you have enabled Comet or
>>> make
>>> sure the Thread invoking that method is the same a the request Thread.
>>>     at
>>> com.sun.grizzly.comet.CometContext.addCometHandler(CometContext.java:263)
>>>
>>>     at
>>> com.sun.grizzly.comet.CometContext.addCometHandler(CometContext.java:311)
>>>
>>>     at
>>> com.sun.enterprise.web.connector.grizzly.comet.CometContext.addCometHandler(CometContext.java:87)
>>>
>>>     at
>>> org.atmosphere.container.GlassFishv2CometSupport.service(GlassFishv2CometSupport.java:123)
>>>
>>>     at
>>> org.atmosphere.cpr.AtmosphereServlet.service(AtmosphereServlet.java:328)
>>>     at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
>>>     at
>>> org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:431)
>>>
>>>     at
>>> org.apache.catalina.core.StandardWrapperValve.preInvoke(StandardWrapperValve.java:462)
>>>
>>>     at
>>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:139)
>>>
>>>     at
>>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:186)
>>>
>>>     at
>>> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:719)
>>>
>>>     at
>>> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:657)
>>>
>>>     at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:96)
>>>     at
>>> com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:98)
>>>
>>>     at
>>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:187)
>>>
>>>     at
>>> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:719)
>>>
>>>     at
>>> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:657)
>>>
>>>     at
>>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:651)
>>>
>>>     at
>>> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1030)
>>>     at
>>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:142)
>>>
>>>     at
>>> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:719)
>>>
>>>     at
>>> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:657)
>>>
>>>     at
>>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:651)
>>>
>>>     at
>>> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1030)
>>>     at
>>> org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:325)
>>>
>>>     at
>>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:242)
>>>
>>>     at
>>> com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:180)
>>>
>>>     at
>>> com.sun.grizzly.http.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:633)
>>>
>>>     at
>>> com.sun.grizzly.http.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:570)
>>>
>>>     at
>>> com.sun.grizzly.http.DefaultProcessorTask.process(DefaultProcessorTask.java:827)
>>>
>>>     at
>>> com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:152)
>>>
>>>     at
>>> com.sun.enterprise.v3.services.impl.GlassfishProtocolChain.executeProtocolFilter(GlassfishProtocolChain.java:71)
>>>
>>>     at
>>> com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:103)
>>>
>>>     at
>>> com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:89)
>>>
>>>     at
>>> com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
>>>
>>>     at
>>> com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:67)
>>>
>>>     at
>>> com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:56)
>>>
>>>     at
>>> com.sun.grizzly.util.WorkerThreadImpl.processTask(WorkerThreadImpl.java:325)
>>>
>>>     at
>>> com.sun.grizzly.util.WorkerThreadImpl.run(WorkerThreadImpl.java:184)
>>>
>>
>>
>
> ---------------------------------------------------------------------
> 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
|  
Report Content as Inappropriate

Re: [ANN] atmosphere chat on tomcat threw java.lang.NullPointerException

choesang
In reply to this post by Jeanfrancois Arcand
Salut Jeanfrancois!

I seem to be the guy, who brings up the weird bugs.I have another one: I downloaded the new jar file from the SNAPSHOT 22042009 and substituted the old atmosphere portable run time with the new jar. Launched it on TOMCAT, i logged in and than once i  sent the first message, the input field gets blocked and the same message repeats, over and over again.

The problem is easily reproducible. it happens all the time :(

NB: i have attached a screen shot of the problem.
--choesang

repeated system message.jpg (43K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: atmosphere chat on tomcat threw java.lang.NullPointerException

Jeanfrancois Arcand
Salut,

choesang wrote:
> Salut Jeanfrancois!
>
> I seem to be the guy, who brings up the weird bugs.I have another one: I
> downloaded the new jar file from the SNAPSHOT 22042009 and substituted
> the old atmosphere portable run time with the new jar. Launched it on
> TOMCAT, i logged in and than once i  sent the first message, the input
> field gets blocked and the same message repeats, over and over again.
>
> The problem is easily reproducible. it happens all the time :(

Sorry about that. If you instead download the chat sample, does it work:

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

Let me know and don't worry we will make it work this week. Great
feedback! Testing on my side as well.

A+

-- Jeanfrancois

>
> NB: i have attached a screen shot of the problem.
> --choesang
>
>
> *repeated system message.jpg* (43K) Download Attachment
> <http://n2.nabble.com/attachment/2682161/0/repeated%20system%20message.jpg>
>
> ------------------------------------------------------------------------
> View this message in context: Re: [ANN] atmosphere chat on tomcat threw
> java.lang.NullPointerException
> <http://n2.nabble.com/atmosphere-chat-on-tomcat-threw-java.lang.NullPointerException-tp2677192p2682161.html>
> Sent from the Atmosphere users mailling list mailing list archive
> <http://n2.nabble.com/Atmosphere-users-mailling-list-f2493822.html> at
> Nabble.com.

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

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [ANN] atmosphere chat on tomcat threw java.lang.NullPointerException

choesang
http://download.java.net/maven/2/org/atmosphere/samples/atmosphere-chat/0.1-SNAPSHOT/atmosphere-chat-0.1-20090422.214222-7.war

Deploying the war file gives the same error (repeating the messages over and over again)


--choesang
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: atmosphere chat on tomcat threw java.lang.NullPointerException

Jeanfrancois Arcand
Salut,

choesang wrote:
> http://download.java.net/maven/2/org/atmosphere/samples/atmosphere-chat/0.1-SNAPSHOT/atmosphere-chat-0.1-20090422.214222-7.war
>
> Deploying the war file gives the same error (repeating the messages over
> and over again)

found the issue. Fix will be commited in a minute.

Apology for that.

-- Jeanfrancois

>
>
> --choesang
>
> ------------------------------------------------------------------------
> View this message in context: Re: [ANN] atmosphere chat on tomcat threw
> java.lang.NullPointerException
> <http://n2.nabble.com/atmosphere-chat-on-tomcat-threw-java.lang.NullPointerException-tp2677192p2683434.html>
> Sent from the Atmosphere users mailling list mailing list archive
> <http://n2.nabble.com/Atmosphere-users-mailling-list-f2493822.html> at
> Nabble.com.

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

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: atmosphere chat on tomcat threw java.lang.NullPointerException

Jeanfrancois Arcand
Salut,

I'm attaching the new atmosphere-chat.war. Take a look at let me know.

Thanks!!

-- Jeanfrancois

Jeanfrancois Arcand wrote:

> Salut,
>
> choesang wrote:
>> http://download.java.net/maven/2/org/atmosphere/samples/atmosphere-chat/0.1-SNAPSHOT/atmosphere-chat-0.1-20090422.214222-7.war 
>>
>>
>> Deploying the war file gives the same error (repeating the messages
>> over and over again)
>
> found the issue. Fix will be commited in a minute.
>
> Apology for that.
>
> -- Jeanfrancois
>
>>
>>
>> --choesang
>>
>> ------------------------------------------------------------------------
>> View this message in context: Re: [ANN] atmosphere chat on tomcat
>> threw java.lang.NullPointerException
>> <http://n2.nabble.com/atmosphere-chat-on-tomcat-threw-java.lang.NullPointerException-tp2677192p2683434.html>
>>
>> Sent from the Atmosphere users mailling list mailing list archive
>> <http://n2.nabble.com/Atmosphere-users-mailling-list-f2493822.html> at
>> Nabble.com.
>
> ---------------------------------------------------------------------
> 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]

atmosphere-chat.war (149K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [ANN] atmosphere chat on tomcat threw java.lang.NullPointerException

choesang
Hi Jeanfrancois!

Now the problem seems to be gone. I have two questions

1. When the chat application is deployed, i catch this JavaScript error through firebug:

gPrefService is null
? in prototype.js@549()prototype.js (line 549)
? in prototype.js@77()prototype.js (line 83)
? in prototype.js@546()prototype.js (line 550)
? in prototype.js@623("/atmosphere-chat/ChatAtmosphereHandler", Object postBody=action=post&name=A&message=wwwwww)prototype.js (line 624)
? in prototype.js@19()prototype.js (line 20)
? in application.js@36()application.js (line 50)
[Break on this error] function() {return new ActiveXObject('Microsoft.XMLHTTP')},

Is it an insignificant error or something important??

2. I know the chat app is just a demo but it has this tiny bug. If you refresh the page (F5). I can understand that  it looses all the chat history and also log me of, but i expect to log myself again. Once i refresh the page, the chat application constantly tries to load and the button to log in is blocked.

--choesang

 


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: atmosphere chat on tomcat threw java.lang.NullPointerException

Jeanfrancois Arcand
Hi choesang,

choesang wrote:
> Hi Jeanfrancois!
>
> Now the problem seems to be gone. I have two questions

Great!

>
> 1. When the chat application is deployed, i catch this JavaScript error
> through firebug:
>
> gPrefService is null
> ? in prototype.js@549()prototype.js (line 549)
> ? in prototype.js@77()prototype.js (line 83)
> ? in prototype.js@546()prototype.js (line 550)
> ? in prototype.js@623("/atmosphere-chat/ChatAtmosphereHandler", Object
> postBody=action=post&name=A&message=wwwwww)prototype.js (line 624)
> ? in prototype.js@19()prototype.js (line 20)
> ? in application.js@36()application.js (line 50)
> [Break on this error] function() {return new
> ActiveXObject('Microsoft.XMLHTTP')},
>
> Is it an insignificant error or something important??

I'm not an expert with JavaScript, but I don't think this is important.


>
> 2. I know the chat app is just a demo but it has this tiny bug. If you
> refresh the page (F5). I can understand that  it looses all the chat
> history and also log me of, but i expect to log myself again. Once i
> refresh the page, the chat application constantly tries to load and the
> button to log in is blocked.

Yes I get that as well. I will explore why...Javascript is really not my
domains :-) But I agree it needs to work. BTW today I will add a Twitter
like application (more complex) like the one I did:

http://weblogs.java.net/blog/jfarcand/archive/2008/11/writing_a_twitt.html

Thanks for the feedback!

-- Jeanfrancois


>
> --choesang
>
>  
>
>
>
> ------------------------------------------------------------------------
> View this message in context: Re: [ANN] atmosphere chat on tomcat threw
> java.lang.NullPointerException
> <http://n2.nabble.com/atmosphere-chat-on-tomcat-threw-java.lang.NullPointerException-tp2677192p2683622.html>
> Sent from the Atmosphere users mailling list mailing list archive
> <http://n2.nabble.com/Atmosphere-users-mailling-list-f2493822.html> at
> Nabble.com.

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

Loading...