How can I fix "The server encountered an error and could not complete your request", when working with appengine?

0 views
Skip to first unread message

Cropcircles via StackOverflow

unread,
May 28, 2013, 9:14:32 AM5/28/13
to google-appengin...@googlegroups.com

I am doing a my school project and I keep on getting an error, when I am deploying my java (web application) on appengine:

       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.

I have been working in parallel with a tutorial, following the same steps as in it: http://trumpy.cs.elon.edu/joel/sigcse2011/. I have been doing the same tutorial long long time ago, and it worked perfectly, but now I am redoing it with my very own data, I am just using it to have a structure that I am sure it works.

The problem is when I am trying to perform save in the datastore, I keep on getting this error. It might be because some eclipse updates I have been doing? Otherwise, I see no reason why this is not working (I've been rechecking my code over and over again, and I assume if it would've been a logical error or something I did wrong I should've receive another type of error).

I would like to add that the deployment is successful, and when I am accessing .appspot.com, I see the greeting message, but when I am clicking to lauch the servlet that performs the save operation, I get this error.

Thank you in advance and any help is appreciated.

LE: I have been trying to switch from app engine SDK 1.8.0 to 1.7.7, as I saw suggested in some websites, but with no successful result.



Please DO NOT REPLY directly to this email but go to StackOverflow:
http://stackoverflow.com/questions/16792940/how-can-i-fix-the-server-encountered-an-error-and-could-not-complete-your-reque

Cropcircles via StackOverflow

unread,
May 28, 2013, 9:29:38 AM5/28/13
to google-appengin...@googlegroups.com

I am doing a my school project and I keep on getting an error, when I am deploying my java (web application) on appengine:

       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.

I have been working in parallel with a tutorial, following the same steps as in it: http://trumpy.cs.elon.edu/joel/sigcse2011/. I have been doing the same tutorial long long time ago, and it worked perfectly, but now I am redoing it with my very own data, I am just using it to have a structure that I am sure it works.

The problem is when I am trying to perform save in the datastore, I keep on getting this error. It might be because some eclipse updates I have been doing? Otherwise, I see no reason why this is not working (I've been rechecking my code over and over again, and I assume if it would've been a logical error or something I did wrong I should've receive another type of error).

I would like to add that the deployment is successful, and when I am accessing .appspot.com, I see the greeting message, but when I am clicking to lauch the servlet that performs the save operation, I get this error.

Thank you in advance and any help is appreciated.

LE: I have been trying to switch from app engine SDK 1.8.0 to 1.7.7, as I saw suggested in some websites, but with no successful result.

LE: This is how my log looks like and I am trying to figure out how to interpret it. Any help in this sense is appreciated and I am sorry for these questions but everything is new for me related to google app engine :):

EXCEPTION 
java.lang.ClassNotFoundException: pack.classesDAO.projectServlet

javax.servlet.ServletContext log: unavailable
javax.servlet.UnavailableException: pack.classesDAO.projectServlet

Failed startup of context com.google.apphosting.utils.jetty.RuntimeAppEngineWebAppContext@190d003{/,/base/data/home/apps/s~projectServlet/1.367688587833153738}
java.lang.NullPointerException

Uncaught exception from servlet
javax.servlet.UnavailableException: Initialization failed.

This request caused a new process to be started for your application, and thus caused your application code to be loaded for the first time. This request may thus take longer and use more CPU than a typical request for your application.

Some are quite intuitive so I'll look again, but some I have no idea what they mean.

Cropcircles via StackOverflow

unread,
May 28, 2013, 9:54:35 AM5/28/13
to google-appengin...@googlegroups.com

Actually, this is the exception that I get now:

      java.lang.NullPointerException
at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1008)

I have an idea from where it might be:

      double theHeadacke = Double.parseDouble(req.getParameter("headacke"));

But I am not sure what's wrong here.

Here is my web.xml

    <?xml version="1.0" encoding="utf-8"?>
    <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="http://java.sun.com/xml/ns/javaee"
    xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
    http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5">
<servlet>
    <servlet-name>DiplomaThesisRoxana</servlet-name>
    <servlet-class>pack.servlets.DiplomaThesisRoxanaServlet</servlet-class>
</servlet>
<servlet-mapping>
    <servlet-name>DiplomaThesisRoxana</servlet-name>
    <url-pattern>/diplomathesisroxana</url-pattern>
</servlet-mapping>
<welcome-file-list>
    <welcome-file>index.html</welcome-file>
</welcome-file-list>

Sotirios Delimanolis via StackOverflow

unread,
May 28, 2013, 10:29:40 AM5/28/13
to google-appengin...@googlegroups.com

A java.lang.ClassNotFoundException occurs when the specified class is missing from your classpath. So pack.classesDAO.projectServlet is either not where you think it should be, is named differently, or just simply doesn't exist.

From your edit

  java.lang.NullPointerException
at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1008)
I have an idea from where it might be:

      double theHeadacke = Double.parseDouble(req.getParameter("headacke"));

HttpServletRequest#getParameter(String) returns null when there is no a parameter of that name in the HTTP request.



Please DO NOT REPLY directly to this email but go to StackOverflow:
http://stackoverflow.com/questions/16792940/how-can-i-fix-the-server-encountered-an-error-and-could-not-complete-your-reque/16794628#16794628
Reply all
Reply to author
Forward
0 new messages