Vaadin 7.0.2 and Google App Engine -- No UIProvider Exception

I am taking a look at Vaadin 7 with GAE. When I create a GAE project using the Vaadin Eclipse plugin a couple problems occur. I have solved all but one. The problems are:

  1. After creating the project you still need to enable Google App Engine in project settings (the wiki page clearly outlines this step so its not a problem) and then re-order the libraries.

  2. Ivy and GAE do not get along at all. The resulting project needs to have the Vaadin libraries copied directly into WEB-INF/lib (not a big deal, but it would be nice if that was resolved).

  3. The template project runs fine if I deploy it to app engine. However, when I run it on the local GAE server all appears correct (i.e., the “Click Me” button display). When you click the button rather than seeing the “Thank you for clicking” text an exception occurs:


Mar 14, 2013 2:21:02 PM com.vaadin.server.DefaultErrorHandler doDefault
SEVERE: 
javax.servlet.ServletException: No UIProvider returned a UI for the request.
	at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:312)
	at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:201)
	at com.vaadin.server.GAEVaadinServlet.service(GAEVaadinServlet.java:249)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	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.socket.dev.DevSocketFilter.doFilter(DevSocketFilter.java:74)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
	at com.google.appengine.tools.development.ResponseRewriterFilter.doFilter(ResponseRewriterFilter.java:123)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
	at com.google.appengine.tools.development.HeaderVerificationFilter.doFilter(HeaderVerificationFilter.java:34)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
	at com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFilter.java:61)
	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:125)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
	at com.google.appengine.tools.development.BackendServersFilter.doFilter(BackendServersFilter.java:97)
	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.appengine.tools.development.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java:94)
	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
	at com.google.appengine.tools.development.JettyContainerService$ApiProxyHandler.handle(JettyContainerService.java:409)
	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.content(HttpConnection.java:938)
	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:755)
	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
	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)

It is certainly not a very acceptable development cycle to deploy to app engine since it is slow and debugging does not work. I am ok with the workarounds, but does anyone have any idea how to get rid of the exception?

I am having the exact same problem. Is it something with the web.xml? This is what mine looks like:

I’m having the same problem when launching stress tests with JMeter to an application deployed on Oracle Weblogic 11g.

My web.xml has the production mode set to true and the xsrf-protection disabled.

Any idea?

I’m using Vaadin 7.0.1.

Well I have managed to discover a solution (although I don’t think it should be required). The first problem is that IvyDE does not get along with GAE deployment. You can either remove the IvyDE and manually copy the needed Vaadin jars to your lib directory or modify the IvyDE to resolve the jars in the lib directory instead of the .ivy cache. This solution is documented in another thread here.

The second problem (and this is the one that caused the UIProvider exception running locally) is a result of the development server trying to serve static files from a jar. The delivery includes two such jars (themes and widgetsets). The GAE wiki indicates that serving static files and be a performance problem, in fact when running locally it cause this problem. My solution was to un-jar the themes and widgetsets. You also need to add an entry to appengine-web.xml to point to the static files Something like this:

<static-files>
    <include path="/VAADIN/**" />
</static-files>

However, there is a possible problem with the number of files in this case. So I settled on the Chameleon these which as far fewer files than Runo or Reindeer (I deleted both sets of those theme files).

This seems to be working fine now and I can run and test locally and deploy successfully to GAE.

Hello,

I’m having the same error :

“com.vaadin.server.DefaultErrorHandler doDefault:
javax.servlet.ServletException: No UIProvider returned a UI for the request.”

The error appears on deployed google app engine applications and not locally.

Is the error occurs locally for you ?

Can you explain a bit more your workaround ?

Thank you

I got the same problem.
I just try to deploy default project, which is generated by vaadin plug-in, to the GAE and I got this error no matter local or GAE.
It looks like there are lots people have the same problem and no one can really fix this problem.

Can any Vaadin expert to confirm whether this is a bug of vaadin7 or we just need config something more?

I have the same issue. It happens locally. I tried Rich’s solution but it didn’t work for me. I added the static files XML, I removed vaadin-themes-7.0.4.jar and vaadin-client-compiled-7.0.4.jar and moved the widgetsets and themes (just chameleon and base) to VAADIN. Still the same problem.

This is the second hack that Vaadin 7 seems to require to work. Ivy wasn’t working and it took a while to figure out how to remove it. I hate to say it but this is more indicative of alpha stage software than a released product.