criticalNotification can only be used in UIDL requests

Hi,

I’ve hit a brick wall while trying to use Vaadin (6.3.2) with GAE. I started getting “criticalNotification can only be used in UIDL requests” exceptions and managed to work around this by making all my classes serializable.

However, now that I am hooking my code up to the GAE persistence I get the exception below all the time.

I found this defect which looks related, but hasn’t been updated for a while:
http://dev.vaadin.com/ticket/4569

Anybody got any ideas?

Cheers,
Chris

HTTP ERROR 500

Problem accessing /. Reason:

    criticalNotification can only be used in UIDL requests
Caused by:

java.lang.RuntimeException: criticalNotification can only be used in UIDL requests
	at com.vaadin.terminal.gwt.server.AbstractApplicationServlet.criticalNotification(AbstractApplicationServlet.java:644)
	at com.vaadin.terminal.gwt.server.GAEApplicationServlet.sendCriticalErrorNotification(GAEApplicationServlet.java:163)
	at com.vaadin.terminal.gwt.server.GAEApplicationServlet.service(GAEApplicationServlet.java:278)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)
	at com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFilter.java:51)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
	at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
	at com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java:122)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
	at com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java:70)
	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
	at com.google.appengine.tools.development.JettyContainerService$ApiProxyHandler.handle(JettyContainerService.java:349)
	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
	at org.mortbay.jetty.Server.handle(Server.java:326)
	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
	at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923)
	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:547)
	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
	at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)

Seems my code was throwing an exception and I didn’t spot it until I stepped through the code.

I’m having the same problem with Vaadin 6.3.2 and Google App Engine SDK 1.3.3.1. Exceptions that come through GAEApplicationServlet are not displayed in the console, but only arise by the above mentioned stack trace in the browser. Locally, this is not a problem, because you can step through the code with Eclipse’s debugger, to see the actual exception message.

However when deployed on the App Engine, this is not possible, so only the cryptic stack trace is visible in the logs of the App Engine console. Does anyone know of a solution for this problem?

Can anybody provide a test case for this problem? I tried to reproduce it but could not. Most likely it is the same problem as #4569

I’ve attached an Eclipse project as testcase to ticket 4569 in Trac.

I’m also, constantly getting “criticalNotification can only be used in UIDL requests” Exceptions for weird cases.

For instance, this line of code will cause it to be thrown.

aPercFont = new Font(“Sans-serif”, Font.PLAIN, 46);

as well as these lines:

InputStream is = new BufferedInputStream(“lung.PNG”));
aBuff = ImageIO.read(is);

To add, I also made every class Serializable as described above.

Found the solution to my own problem again.

After, upgrading to from Vaadin 6.3.2 to 6.3.4. The error messages become much more descriptive. I found out thatthe java.awt.Font class is restrictedby Google App Engine.

Cheers,

Tristan