My project works fine locally, but when trying to deploy it to the GAE servers, I get the following error message:
Unable to update app: Failed to compile the generated JSP java files.
This happened mainly when I switched from Java 7 to Java 6, since apparently GAE doesn't support that yet. I am using GAE 1.7.4, is this a known problem? What is wrong with the project? Is it syntax within the JSPs? They used to compile before I starting using GAE 1.7.4, but I don't know the exact cause of when this started.
I have been having the same problem and was convinced that there was a GAE problem. However, now I realize that I had changed the name of a .java file referenced by a couple of my .jsp files and the file name had not gotten changed in the .jsp. After I fixed the file name in the .jsp deployment worked normally again. Arrgh.
I think before GAE started compiling the JSP files, JSP files with errors would deploy successfully. Also, when running locally, the JSP are apparently not compiled until they are accessed, so unless all the JSP files are tested locally, you may not know of the error. But if you try to deploy, the JSP compilation fails and the deploy is aborted. Unfortunately, there is no sensible error message to suggest where the problem was found.
I try to recompile java files on eclipse again and check the errors.
I think this is better way to check it.
This is my blog for the detail.
http://nurinamu.tumblr.com/post/62384368766/how-to-detect-the-jsp-compile-error-when-deploy-to
I had this same issue. I had changed the method signature of a method that was called by a JSP I didn't normally go to. So when running locally everything worked fine because I never went to the problematic JSP.
The way to resolve this is to run locally and go to every single JSP in your project. Eventually I got to a JSP that gave me a full stack trace locally in my browser window. When I fixed the error in that JSP I was again able to deploy to app engine production.
It would be better if GAE was able to report which JSP is failing, but this technique will work.
I was running in the same issue. Yes the error your get in Eclipse and in the log is really unhelpful, but wanted to share that deploying to the local dev server instead gave a very helpful error message, e.g. in my case:
HTTP ERROR 500
Problem accessing /. Reason:
Unable to compile class for JSP:
An error occurred at line: 286 in the jsp file: /dashboard.jsp
Duplicate local variable datastore
283: </head>
284: <body onload="initialize()">
285: <%
286: DatastoreService datastore = DatastoreServiceFactory.getDatastoreService();
287:
288: UserService userService = UserServiceFactory.getUserService();
289: User user = userService.getCurrentUser();
Saved a big headache.
nurinamu's answer is ok but it didn't work for me because my project was too complex and I wasn't able to resolve the errors I got from linking the source folder generated in the appengine staging area. However I did manage to fix my problem!
This method is a bit of a pain but in a worst case scenario: move the JSPs out of your project and do a test deploy until you narrow down and find which JSP is causing the issue.
This was really the only way I could figure out what was causing the problem.
UPDATE
For me the error was a rogue import that wasn't supported by appengine.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With