Now on with the story...
Happy Independence Day!
I've been working on creating a web app using GWT 1.4RC1. For this, I borrowed some source from this other app I had, which I'd developed using GWT 1.3
All was well for a couple of days until today when I (quite suddenly) started getting this error:
[ERROR] Unable to find 'IndexService.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source?
I must admit I'm not sure what exactly caused this to happen.
I tried all the usual solutions. I tried compiling it outside of IDEA (I'm using IntelliJ IDEA 6.05 with the GWT Studio plugin), tried checking the location where java compilation was dropping class files and plenty of Googling. Finally I even tried moving back to 1.3. No luck. In fact, the move back to 1.3 caused a bunch of other things to break in weird ways including a request for a non-existent nocache.js file.
Finally, the solution turned out to be quite simple, though I'm not sure if this is a 1.4 requirement or is a 1.4RC bug, since it worked just fine under 1.3 with a warning or two.
The following line in IndexService was the culprit.
((ServiceDefTarget) app).setServiceEntryPoint("/IndexService");Here is the first solution I came up with.
((ServiceDefTarget) app).setServiceEntryPoint("/com.this.and.that.index.Index/IndexService");Incidentally, this is how you make the service call 'module relative' and get rid of the [WARN] Use of deprecated hosted mode servlet path mapping warning, by prefixing the GWT module name before your service path. However, the best solution seems to be to let GWT handle this bit like so:
Post a Comment