Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Need help debugging GWT - Jetty 'unknown realm'

I am trying to debug a GWT application, but it seems I can't do it with jetty. Whenever I try to run it in hosted mode for debugging I get an 'unknown realm' 500 error message (nothing loads). I am doing this via eclipse. It is very uncovenient to have to compile everything to debug in the browser afterwards.

After compilation I deploy the war into JBoss (using EJB on the server). But compilation takes time and when the code has been turned into javascript, you can't really debug. How can I debug the java code? I am looking into the -noserver option, but I wonder if I could still do it with jetty. And if not, why not.

like image 406
grasshopper Avatar asked Nov 05 '22 00:11

grasshopper


1 Answers

There are two points in your question:

  • using authentication in the embedded Jetty (I presume you have a <login-config> in your web.xml): see http://code.google.com/p/google-web-toolkit/issues/detail?id=4462#c5 (now that this bug is fixed, you only have to put the userRealm in the jetty-web.xml and you can now use <login-config> in your web.xml)
  • using -noserver to debug GWT code: using -noserver you won't be using the embedded Jetty in DevMode, so only your client-side code will run in DevMode. Your server-side code will run within the server where you deployed the app, and you'll debug it as you would debug any other Java server-side code (i.e. launch your JBoss server in debug mode and connect to it remotely with a Java debugger). To use -noserver you have to make sure the .nocache.js and hosted.html files are served by your server, either by first compiling your GWT code and deploying it, or by using your server's app folder as the -warof the DevMode (so DevMode will generate the files in the same folder as the web server serves files from)
like image 144
Thomas Broyer Avatar answered Nov 15 '22 11:11

Thomas Broyer