Take the 2-minute tour ×

im learning the google app engine framework and service and for that i built the tutorial google itself provides under "docs" on their google app engine homepage.

the tutorial is very simple, build a guestbook web app that uses a datastore to save "greetings" from users. i did everything on the tutorial by hand and everything exacly like they said to. it works just fine when i run it from eclipse, no errors what so ever.

so i deployed it (with no errors, "deploy successful") just to see it running before moving on to more difficult examples but i get an error 500. checking the logs i get a: "java.lang.ClassNotFoundException: guestbook.SignGuestbookServlet" thats the only servlet from the app, and it runs just fine from my machine why not from app engine?

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

EDIT: ok now i feel dumb. apparently i have to build before deploying, i thought the deply procedure would build everything from scratch for me, guess i was wrong. sorry for wasting anyone time and i hope maybe sometime it will help someone with the same problem.

share|improve this question
Can you put complete stack trace –  vishal.biyani Mar 14 '12 at 22:57
add comment

3 Answers

up vote 2 down vote accepted

I had the same problem once. As I remembered it I had forgotton to add some dependencies in the war file. The local server had the jars on it's class path but the appengine server did not and thereby I got a ClassNotFoundException.

So you may need to check which jars is included in the war.

share|improve this answer
thanks for the answer. so the only .java i have is one single servlet called SignGuestbookServlet.java, i tried copy it to the war folder and didnt work. i have it mapped on the web.xml file (thats inside the war folder) with <servlet-class>guestbook.SignGuestbookServlet</servlet-class> still doesnt work. i dont use any external .jar except for the app engine ones, that are inside the war/lib folder. is there another file i should edit to add classpath? maybe appengine-web.xml? is mostly empty (was a automatic generated one). –  sap Mar 14 '12 at 22:54
Your problem might be different, and answer is very generic. –  vishal.biyani Mar 14 '12 at 22:57
add comment

The problem with running from Eclipse is that Eclipse put everything and the kitchen sink into its classpath.

I would suggest that you explode out your deployment war file and examine WEB-INF/classes and WEB-INF/lib and make sure your .class files are present.

share|improve this answer
add comment

I had the same issue, then I realized that I pointed appcfg to the directory with wrong WEB-INF.

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

share|improve this answer
add comment

Your Answer


