Internal Error occurs after redeployment

I get an ‘internal error’ (see log below) involving the CommunicationManager class.
This occurs after I redeploy my application which was working ok before.
I suppose I changed something in a wrong way, but I can’t guess what ?

ps : I use JBoss 4.0.5, and the error persists, even after a full server restart …

2009-09-23 10:34:50,087 ERROR [STDERR]
java.lang.NullPointerException
2009-09-23 10:34:50,087 ERROR [STDERR]
at com.vaadin.terminal.gwt.server.CommunicationManager.paintAfterVariablechanges(CommunicationManager.java:364)
2009-09-23 10:34:50,087 ERROR [STDERR]
at com.vaadin.terminal.gwt.server.CommunicationManager.handleUidlRequest(CommunicationManager.java:314)
2009-09-23 10:34:50,087 ERROR [STDERR]
at com.vaadin.terminal.gwt.server.AbstractApplicationServlet.service(AbstractApplicationServlet.java:425)
2009-09-23 10:34:50,087 ERROR [STDERR]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
2009-09-23 10:34:50,087 ERROR [STDERR]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
2009-09-23 10:34:50,103 ERROR [STDERR]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
2009-09-23 10:34:50,103 ERROR [STDERR]
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
2009-09-23 10:34:50,103 ERROR [STDERR]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
2009-09-23 10:34:50,103 ERROR [STDERR]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
2009-09-23 10:34:50,103 ERROR [STDERR]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
2009-09-23 10:34:50,103 ERROR [STDERR]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
2009-09-23 10:34:50,103 ERROR [STDERR]
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
2009-09-23 10:34:50,103 ERROR [STDERR]
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
2009-09-23 10:34:50,103 ERROR [STDERR]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
2009-09-23 10:34:50,103 ERROR [STDERR]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
2009-09-23 10:34:50,103 ERROR [STDERR]
at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
2009-09-23 10:34:50,103 ERROR [STDERR]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
2009-09-23 10:34:50,103 ERROR [STDERR]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
2009-09-23 10:34:50,103 ERROR [STDERR]
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
2009-09-23 10:34:50,103 ERROR [STDERR]
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
2009-09-23 10:34:50,103 ERROR [STDERR]
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
2009-09-23 10:34:50,103 ERROR [STDERR]
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
2009-09-23 10:34:50,103 ERROR [STDERR]
at java.lang.Thread.run(Thread.java:595)

Either there is some additional stack trace which you have left out or something is eating the real cause. I would recommend you run JBoss in debug mode and set a NullPointerException break point to see where the error is actually coming from. You don’t mention which Vaadin version you are using and in my current copy CommunicationManager:364 is

JsonPaintTarget paintTarget = new JsonPaintTarget(this, outWriter, which makes no sense for a NPE.

So I did what you suggest : I set a nullpointer exception break point, but it gives me the same answer :

“CommunicationManager.paintAfterVariableChanges Line 364…”

The stack trace I sent is all I could find in my server log (nothing before, nothing after).

I use vaadin-6.1.0.jar with a Jboss 4.0.5, running with a JDK 1.5 in an eclipse J2EE 3.4.2

By the way I also compile my sources with JDK 1.5, could it be the reason ?

Sorry, it seems the line numbers in my version was way off, the correct line 364 is

        if (!window.getName().equals(closingWindowName)) {

So my guess would be that you create a window with null name, something you can confirm when the debugger breaks on the NPE. It should not be possible for “window” to be null at this point.

Problem partially solved !

The only window I create is the main window, so I set a name on it (window.setName()), and the error disappeared !

Now, I get a blank page, but with the debug window (?debug) I can see that I have layout pb.
Running the ‘Analyze layout’ it gives me the following messages :

[font=Courier New]
Layouts analyzed on server, total top level problems: 2
Root problems

(null) id: PID0
Height problem: A component with relative height needs a parent with defined height.
Emphasis component in UI

(null) id: PID1
Height problem: Component with relative height inside a VerticalLayout with no height defined.
Emphasis component in UI
Expand this node to show problems that may be dependent on this problem.

(null) id: PID2
Height problem: A component with relative height needs a parent with defined height.
Emphasis component in UI
Expand this node to show problems that may be dependent on this problem.

(null) id: PID3
Height problem: Component with relative height inside a VerticalLayout with no height defined.
Emphasis component in UI


Processing time was 78ms for 931 characters of JSON
Referenced paintables: 0
[/font]

Any way, I know where to search now, and I suppose these problems were the cause of the other…

Thanks for your help