Google App Engine: ClassNotFoundException after deployment but works fine on local server

im learning the structure and service of google app engine and for that i created a tutorial which google itself provides under "docs" section of google engine homepage.

the tutorial is very simple, create a guestbook web application that uses a datastore to store a "greeting" from users. i did everything in the tutorial by hand and everything was as they said. it works great when i run it from eclipse, no errors ever.

so I unwrapped it (no error, "deploy successfully") to see it before moving on to more difficult examples, but I get a 500 error. Checking the logs I get: "java.lang.ClassNotFoundException: guestbook.SignGuestbookServlet" is it the only servlet from the application and it works fine from my machine and not using the application engine?

the mapping in web.xml is correct (just like google one) and appengine-web.xml has the name of the application. what could it be? thanks in advance.

EDIT: OK now I feel stupid. apparently i need to build before deployment, i thought the distillation procedure would build everything from scratch for me i guess i was wrong. sorry for wasting time on that and I hope it helps someone someday with the same problem.


source to share

3 answers

I had the same problem. As I recall, I forgot to add some dependencies in the war file. The local server had bans on the way to it, but the application server was not executing, and thus I got a ClassNotFoundException.

Thus, you may need to check which banks are involved in the war.



The problem with starting Eclipse is that Eclipse puts everything in and the kitchen dives into its classpath.

I would suggest you blow up your military deployment file and examine WEB-INF / classes and WEB-INF / lib and make sure your .class files are present.



I had the same problem, then I realized I was pointing appcfg to the directory with the wrong WEB-INF.

Be aware not to point appcfg to the source WEB-INF but to the target WEB-INF (for example: the WEB-INF generated by the mvn package, the one that contains the / and lib / classes).



All Articles