Archive for the ‘app engine’ tag
Google App Engine on Google Apps Domains
At Uproar, Objective-C isn’t the only thing I do. Recently, I’ve been hacking away on a Java Google App Engine project (more on this later…). After deploying the app, the following exception was thrown upon hitting my app’s URL:
Uncaught exception from servlet java.lang.ClassCastException: java.lang.IllegalArgumentException cannot be cast to javax.servlet.ServletException at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:754) at org.apache.jsp.xxxxxxxx_jsp._jspService(xxxxxxxx_jsp.java:107) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) at javax.servlet.http.HttpServlet.service(HttpServlet.java:806) <snip /> at java.lang.Thread.run(Unknown Source)
This was confusing as my app worked fine when running locally. Some googling uncovered this Google App Engine issue. If a RuntimeException is thrown in your jsp, Apache Jasper attempts to cast it to a ServletException (which it is unable to do on app engine). However, this is really just masking the real issue which for me was found when I read comment #8 in the issue:
I needed to add Google App Engine as a service on my domain's Google Apps page, and add Guestbook as an app.
This caught my eye because my app was configured to run under my own Google Apps domain (upon creating an app, you have to specify whether it will authenticate against Google’s appspot.com or your own Google Apps domain). After enabling the app service under my domain, all is well and my deployed app engine service now works as expected.




