Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
DontPushOzoneLayer addon NPE with multiple windows.
Hi
I'm getting the following stack trace with the DontPushOzoneLayer addon. It happens when I try to access a window other than the main window in the application.
Before using the addon, I could access the window successfully, but now I cannot.
This is my configuration:
Vaadin 6.7.6Guice-Servlet: 3.0DontPushOzoneLayer: 0.4.6Jetty: 8.1.2
<servlet>
<description>AtmosphereServlet</description>
<servlet-name>AtmosphereServlet</servlet-name>
<servlet-class>org.atmosphere.cpr.AtmosphereServlet</servlet-class>
<init-param>
<!-- prevent deadlocks -->
<param-name>org.atmosphere.disableOnStateEvent</param-name>
<param-value>true</param-value>
</init-param>
<load-on-startup>0</load-on-startup>
<!--Uncomment if you want to use Servlet 3.0 Async Support -->
<async-supported>true</async-supported>
</servlet>
<servlet-mapping>
<servlet-name>AtmosphereServlet</servlet-name>
<url-pattern>/UIDL/*</url-pattern>
</servlet-mapping>
Stack Trace:
WARN [Atmosphere-AsyncWrite-0] - Serializer exception: message: 4dc5bdb9-edc8-4edf-8833-ab478326d8c9
java.lang.NullPointerException
at org.atmosphere.cpr.AtmosphereResponse$1.write(AtmosphereResponse.java:297)
at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:202)
at sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:272)
at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:276)
at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:122)
at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:212)
at org.atmosphere.gwt.server.impl.GwtResponseWriterImpl.flush(GwtResponseWriterImpl.java:246)
at org.atmosphere.gwt.server.impl.GwtResponseWriterImpl.heartbeat(GwtResponseWriterImpl.java:235)
at org.atmosphere.gwt.server.impl.GwtResponseWriterImpl.write(GwtResponseWriterImpl.java:211)
at org.atmosphere.gwt.server.impl.GwtResponseWriterImpl.write(GwtResponseWriterImpl.java:190)
at org.atmosphere.gwt.server.impl.GwtAtmosphereResourceImpl$3.write(GwtAtmosphereResourceImpl.java:270)
at org.atmosphere.handler.AbstractReflectorAtmosphereHandler.onStateChange(AbstractReflectorAtmosphereHandler.java:86)
at org.atmosphere.cpr.DefaultBroadcaster.broadcast(DefaultBroadcaster.java:801)
at org.atmosphere.cpr.DefaultBroadcaster.executeAsyncWrite(DefaultBroadcaster.java:716)
at org.atmosphere.cpr.DefaultBroadcaster$3.run(DefaultBroadcaster.java:749)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
DEBUG [Atmosphere-AsyncWrite-0] - onException()
java.io.IOException: java.lang.NullPointerException
at org.atmosphere.handler.AbstractReflectorAtmosphereHandler.onStateChange(AbstractReflectorAtmosphereHandler.java:89)
at org.atmosphere.cpr.DefaultBroadcaster.broadcast(DefaultBroadcaster.java:801)
at org.atmosphere.cpr.DefaultBroadcaster.executeAsyncWrite(DefaultBroadcaster.java:716)
at org.atmosphere.cpr.DefaultBroadcaster$3.run(DefaultBroadcaster.java:749)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.NullPointerException
at org.atmosphere.cpr.AtmosphereResponse$1.write(AtmosphereResponse.java:297)
at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:202)
at sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:272)
at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:276)
at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:122)
at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:212)
at org.atmosphere.gwt.server.impl.GwtResponseWriterImpl.flush(GwtResponseWriterImpl.java:246)
at org.atmosphere.gwt.server.impl.GwtResponseWriterImpl.heartbeat(GwtResponseWriterImpl.java:235)
at org.atmosphere.gwt.server.impl.GwtResponseWriterImpl.write(GwtResponseWriterImpl.java:211)
at org.atmosphere.gwt.server.impl.GwtResponseWriterImpl.write(GwtResponseWriterImpl.java:190)
at org.atmosphere.gwt.server.impl.GwtAtmosphereResourceImpl$3.write(GwtAtmosphereResourceImpl.java:270)
at org.atmosphere.handler.AbstractReflectorAtmosphereHandler.onStateChange(AbstractReflectorAtmosphereHandler.java:86)
... 9 more
DEBUG [Atmosphere-AsyncWrite-0] - connection thre exception; cleaning up
java.io.IOException: java.lang.NullPointerException
at org.atmosphere.handler.AbstractReflectorAtmosphereHandler.onStateChange(AbstractReflectorAtmosphereHandler.java:89)
at org.atmosphere.cpr.DefaultBroadcaster.broadcast(DefaultBroadcaster.java:801)
at org.atmosphere.cpr.DefaultBroadcaster.executeAsyncWrite(DefaultBroadcaster.java:716)
at org.atmosphere.cpr.DefaultBroadcaster$3.run(DefaultBroadcaster.java:749)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.NullPointerException
at org.atmosphere.cpr.AtmosphereResponse$1.write(AtmosphereResponse.java:297)
at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:202)
at sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:272)
at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:276)
at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:122)
at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:212)
at org.atmosphere.gwt.server.impl.GwtResponseWriterImpl.flush(GwtResponseWriterImpl.java:246)
at org.atmosphere.gwt.server.impl.GwtResponseWriterImpl.heartbeat(GwtResponseWriterImpl.java:235)
at org.atmosphere.gwt.server.impl.GwtResponseWriterImpl.write(GwtResponseWriterImpl.java:211)
at org.atmosphere.gwt.server.impl.GwtResponseWriterImpl.write(GwtResponseWriterImpl.java:190)
at org.atmosphere.gwt.server.impl.GwtAtmosphereResourceImpl$3.write(GwtAtmosphereResourceImpl.java:270)
at org.atmosphere.handler.AbstractReflectorAtmosphereHandler.onStateChange(AbstractReflectorAtmosphereHandler.java:86)
... 9 more
Figured it out.
As my servlets are configured by guice, the order was incorrect. Merely switching them around solved the problem.
When the order was incorrect, I couldn't serve "/*" with my vaadin servlet, so I changed it to "/".
Now that the atmosphere servlet is configured first, I can serve "/*" successfully with my vaadin servlet.
EDIT:
How do I address the "You have set an infinite timeout for your comet connection..." warning?
Where should this be configured and does it matter?