Hi all,The update from Jetty 6 to Jetty 8 wasn't without regressions. One of them is a classloader issue.First, when starting DevMode, sometimes (IIRC, not for all projects, might be because I tried with a WEB-INF/jetty-web.xml), it starts with:[WARN] Server resource 'org/eclipse/jetty/xml/configure_6_0.dtd' could not be found in the web app, but was found on the system classpath[WARN] Adding classpath entry 'file:/home/tbr/.m2/repository/com/google/gwt/gwt-dev/2.6.0/gwt-dev-2.6.0.jar' to the web app classpath for this sessionWhich is… bad! (it's gwt-dev.jar here!)and is btw probably the cause of https://code.google.com/p/google-web-toolkit/issues/detail?id=8526 (the other known regression)
In the end, I wonder if we shouldn't just basically revert https://code.google.com/p/google-web-toolkit/source/detail?r=4944, except issuing a warning when we find the class in the system classpath (but without automatically adding the JAR to the classpath and instead just saying they should move it to WEB-INF/lib). Maybe we could add a switch (in the form of a system property) to allow loading from the system classloader (not restricted to Jetty system and server classes).What do you think?
--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
---
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-co...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-contributors+unsubscribe@googlegroups.com.
Thanks Thomas. Can you also explain how things operate for GAE when and if I were to employ SuperDev mode
- I thought there would be no impact as the GWT module is loaded by redirecting the HTML script to the compiler web server, but when I looked at this before I ran into some issues where the "ip address" serving the hosted page (in GAE) needed to match the compiler server (SuperDev Mode) and until I was using the same "localhost" it wouldn't work.
Security: with 2.6 we believe it's safe to turn on the Super Dev Mode hook and leave it on in production. As an extra precaution, we recommend setting the devModeUrlWhitelistRegexp configuration property to ensure that it can only load JavaScript from localhost and your developers' machines in your own domain.
Do you know if much sociability testing between 2.6 and GAE is occurring?
If I run into issues should I post them with GAE or GWT? Who would be best/fastest to address them?
+1 The problem is determining what "provided by the server" actually means though. Servers generally just use their classpath, but in our case the classpath generally (because of Eclipse, and because of how DevMode loads client code too) contains the classes that also are in WEB-INF/lib, so delegation to the "server classpath" just won't work (or rather, it'll work "too well", and won't detect that "something is missing in WEB-INF/lib".I've written a memo on the issue, and possible solutions: https://docs.google.com/document/d/1bWfafaPA0m0Z1Swodnx7m3QTv31OdqFkE7aeadN_2BU/edit?usp=sharing
+1 The problem is determining what "provided by the server" actually means though. Servers generally just use their classpath, but in our case the classpath generally (because of Eclipse, and because of how DevMode loads client code too) contains the classes that also are in WEB-INF/lib, so delegation to the "server classpath" just won't work (or rather, it'll work "too well", and won't detect that "something is missing in WEB-INF/lib".
I've written a memo on the issue, and possible solutions: https://docs.google.com/document/d/1bWfafaPA0m0Z1Swodnx7m3QTv31OdqFkE7aeadN_2BU/edit?usp=sharingWouldn't it be a ton easier to just launch Jetty as a separate process using ProcessBuilder when DevMode is launched? Of course this new process should not have DevMode class path. Then its pretty much like -noserver but users do not have to setup a jetty server themselves.
Also I am curious why r4944 says its too much of a burden to get the class path right and why the old behavior causes integration problems. If class path is wrong and GWT "repairs" it, it will fail later in production. I don't really see the benefit.
But I have to say that I always use -noserver so maybe I am missing something.
Hi Thomas,
> (or rather, it'll work "too well", and won't detect that "something is
> missing in WEB-INF/lib".
I'm attempting to follow along, but classloader semantics are "fun", so
apologies if I'm wrong somewhere...
So, to clarify, if I have a dependency, say foo.jar, that isn't GWT, and
isn't Jetty, but my server-side code uses it, with your proposal, would
it now have to be in (say) src/main/webapp/WEB-INF/lib?
Or could it still come from the Eclipse classpath like it does today?
My two cents is that foo.jar being on the Eclipse classpath is just
fine/what I generally prefer anyway, even if it "works too well", as it
means I can skip the "make a war" or "put all jars into WEB-INF/lib"
steps while just developing.
That said, you are right that it could lead to false positives, but I
would really hope that developers are not using "it works on my machine
in dev mode against my exploded war" as their criteria for "will work in
production". Perhaps that is too optimistic.
Maybe it's a GPE issue after all (I never tried IntelliJ IDEA for webapps; I tend to prefer embedded servers these days, rather than wars deployed into servlet containers).
Sure, I get that Maven/Gradle/Ant will go through a copy-to-target step
> Neither one (depending on your build tool though).
first, and so not use any src/... artifacts. So, for them, having the
Jetty classloader not use the project classpath makes sense.
But at least we way run DevMode in Eclipse (as vanilla .launch files
with DevMode as the main class), we pass -war src/main/webapp, so we
can run directly against src/ without any copy-to-target/build system
steps at all.
And so then all of our IvyDE-managed jars and project .class files come
from the regular Eclipse/system classpath that "Java Applications" get.
> I don't have a strong opinion though; I'd be fine just using theWhich is the behavior today, right?
> system classloader as the parent of the webapp classloader (the end
> result would be the same as if you deployed all your code and
> dependencies to Jetty's lib/ or lib/ext/ or Tomcat's shared/ );
I'd be fine with a warning that could be disabled... :-)
> I think newbies would need/prefer warnings.