"HTTP ERROR: 500 No realm" ejecutando la muestra "MobileWebApp" de GWT

I'm trying to run the GWT 2.4 sample app "MobileWebApp". I get a 500 "No Realm" error when I try to run the app in dev mode through Eclipse.

I understand this is an authentication problem.

I'm not familiar with Google App Engine or Jetty but from looking at the web.xml I can see there is a servlet filter where it is using the appengine UserService to presumably redirect the user to Google for authentication.

Estoy usando:

  • Eclipse 3.7 (Indigo SR1)
  • Complemento de Google para Eclipse 2.4
  • m2eclipse

I'm including an excerpt from the web.xml below. I'm not sure what other info would be helpful in diagnosing this problem.

      Redirect to the login page if needed before showing
      the host html page.
      <web-resource-name>Login required</web-resource-name>

      This filter demonstrates making GAE authentication
      services visible to a RequestFactory client.

Below is the output in the Eclipse console:

[WARN] Request /MobileWebApp.html failed - no realm
[ERROR] 500 - GET /MobileWebApp.html?gwt.codesvr= ( 1401 bytes
   Request headers
      User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:7.0.1) Gecko/20100101 Firefox/7.0.1
      Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
      Accept-Language: en-us,en;q=0.5
      Accept-Encoding: gzip, deflate
      Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
      Connection: keep-alive
   Response headers
      Content-Type: text/html; charset=iso-8859-1
      Content-Length: 1401

Many thanks for any helpful advice!

Edit on 11/11/11: I added Jetty tag since it seems relevant to this problem.

preguntado el 08 de noviembre de 11 a las 17:11

Note that we have the same thing without AppEngine: just having a <security-constraint> introduces the 'no realm' error 500 for us. Is there any advice for this specific situation? -

2 Respuestas

If your very first request fails, just getting the /MobileWebApp.html page, then it probably isn't an authentication problem. Do you have GAE enabled for that project (not only GWT)? That might be one issue.

I read somewhere that there's two ways of debugging an app in Eclipse, one is with run as/webapp, and forgot which was the other one (I don't use Eclipse). One of them works and another doesn't.

If that doesn't work, you can try replacing the built-in jetty:

  • add a GWT param: -server com.google.appengine.tools.development.gwt.AppEngineLauncher
  • VM param: -javaagent:/path_to/appengine-agent.jar

And the last option is with -noserver, but then you wont be able to debug the server-side code, just the client-side GWT stuff: first start jetty with mvn jetty:run and then debug in Eclipse with -noserver GWT param.

Respondido el 13 de diciembre de 11 a las 00:12

I had the same problem. Finally I noticed that when I switched to a newer version of Appengine, the older Appengine libraries remained in the WEB-INF/lib along with the new ones. Removing them solved the problem.

Respondido 08 Oct 12, 10:10

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.