Hello Thomas,
Am Montag, 2. Juli 2018 16:26:12 UTC+2 schrieb Thomas Broyer:
-- sorry for my slow response, work schedule was a bit full the last days...
Eventually I could solve my problems and get it up running again - I really appreciate your help Thomas, thank you!
Am Montag, 2. Juli 2018 16:26:12 UTC+2 schrieb Thomas Broyer:
Just to clarify: by "in the logs", I specifically meant the "Jetty" tab in the DevMode window.
Oh I see. I checked it, there was no log message of the kind you mentioned.
Given what you shared about your classpath and WEB-INF/lib (where both classes only exist in gwt-dev.jar), I'm ready to bet that this is a classloader issue, where at one point the gwt-dev.jar is added to the webapp classloader (almost as if it was in the WEB-INF/lib), and then there are "conflicts" between the same class from the system classloader (DevMode) and the webapp classloader (WEB-INF/lib) can't be cast from/to one another.
Thanks for the explanation, that might be the problem. I was not able to check that, but fortunately, I could solve the problem by using a separate webserver, as you suggested.
When you start the CodeServer with -launcherDir, it writes a special myapp.nocache.js that automatically calls the CodeServer to (re)compile the application and then load the compiled app.When it starts, the CodeServer starts a server (HTTP, port 9876 by default) and writes the a myapp/myapp.nocache.js in the -launcherDir, that references the CodeServer's URL (when you launch the DevMode, it actually launches the CodeServer behind the scene, with the -launcherDir being the same as the -war).When your browser loads that myapp.nocache.js (through the web server that serves your webapp), it automatically "calls" the CodeServer to compile the app and then load it; this is what the bookmarklets did prior to GWT 2.7 (and can still do, if you don't use -launcherDir).
It is really helpful that you took the time to describe the process, now I understand it way better.
I ended up using the Eclipse Jetty Plugin to start my webapp and I created an Ant task to start the CodeServer like this:
<java failonerror="true" fork="true" classname="com.google.gwt.dev.codeserver.CodeServer">
<classpath>
<path refid="gwtCodeServerClasspath" />
</classpath>
<jvmarg value="-Xmx1200m" />
<arg value="-launcherDir" />
<arg value="war" />
<arg value="-logLevel" />
<arg value="INFO" />
<arg value="-port" />
<arg value="9876" />
<arg value="de.myapp.MyWebApp" />
</java>
This setup works for me.
Just out of curiosity: Is there a difference between launching the DevMode with "-noserver" and CodeServer with "-launchDir"?
Thomas, thanks again for taking the time to help!
Kind regards
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment