Reputation: 1228
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.
Upvotes: 3
Views: 2565
Reputation: 962
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/).
Upvotes: 2
Reputation: 839
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.
Upvotes: 2
Reputation: 1895
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.
Upvotes: 2