Hi,
I just tried my first java servlet with google app engine. It works fine at localhost (Eclipse: Run As > Web Application), but it dosen't work at the Google App Engine (500 Server Error).The error message is not really meaningful.Error: Server Error
The server encountered an error and could not complete your request.
If the problem persists, please report your problem and mention this error message and the query that caused it.
How can I proceed to find the problem?package de.bvl.myhighscoreserver;import java.io.IOException;import java.util.List;import javax.servlet.http.*;import com.google.appengine.api.datastore.DatastoreService;import com.google.appengine.api.datastore.DatastoreServiceFactory;import com.google.appengine.api.datastore.Entity;import com.google.appengine.api.datastore.FetchOptions;import com.google.appengine.api.datastore.Key;import com.google.appengine.api.datastore.KeyFactory;import com.google.appengine.api.datastore.Query;@SuppressWarnings("serial")public class MyHighscoreServerServlet extends HttpServlet {public void doGet(HttpServletRequest req, HttpServletResponse resp)throws IOException {String game = req.getParameter("game");String name = req.getParameter("name");String pointsStr = req.getParameter("points");String maxStr = req.getParameter("max");int max = 10;if(maxStr!= null){max = Integer.parseInt(maxStr);}int points = 0;if(pointsStr != null){points = Integer.parseInt(pointsStr);}if(points>0 && name!=null){addHighscore(game,name,points);}returnHighscores(resp,game,max);}private void returnHighscores(HttpServletResponse resp, String game, int max) throws IOException {// TODO Auto-generated method stubDatastoreService datastore = DatastoreServiceFactory.getDatastoreService();Key gameKey = KeyFactory.createKey("game", game);Query query = new Query("highscore", gameKey);query.addSort("points", Query.SortDirection.DESCENDING);List<Entity> highscores = datastore.prepare(query).asList(FetchOptions.Builder.withLimit(max));for(Entity e : highscores){resp.getWriter().println(e.getProperty("name")+","+ e.getProperty("points"));}}private void addHighscore(String game, String name, int points){DatastoreService datastore = DatastoreServiceFactory.getDatastoreService();Key gameKey = KeyFactory.createKey("game", game);Entity highscore = new Entity("highscore",gameKey);highscore.setProperty("name", name);highscore.setProperty("points", points);datastore.put(highscore);}}
THX in advanceBo