Hi,

I'm trying to upgrade the gwt-maven plugin to support 1.6 release.
I've applied the shell / compiler changes and now try to launch the
compiler. I got a strange error :

[INFO]    Compiling 15 permutations
[INFO]    Process output
[INFO]       [ERROR] java.lang.NoClassDefFoundError: com/google/gwt/
dev/CompilePermsServer
[INFO]       [ERROR] Caused by: java.lang.ClassNotFoundException:
com.google.gwt.dev.CompilePermsServer
[INFO]       [ERROR]    at java.net.URLClassLoader$1.run
(URLClassLoader.java:200)
[INFO]       [ERROR]    at java.security.AccessController.doPrivileged
(Native Method)
[INFO]       [ERROR]    at java.net.URLClassLoader.findClass
(URLClassLoader.java:188)
[INFO]       [ERROR]    at java.lang.ClassLoader.loadClass
(ClassLoader.java:307)
[INFO]       [ERROR]    at sun.misc.Launcher$AppClassLoader.loadClass
(Launcher.java:301)
[INFO]       [ERROR]    at java.lang.ClassLoader.loadClass
(ClassLoader.java:252)
[INFO]       [ERROR]    at java.lang.ClassLoader.loadClassInternal
(ClassLoader.java:320)
[INFO]       [ERROR] Could not find the main class:
com.google.gwt.dev.CompilePermsServer.  Program will exit.
[INFO]       [ERROR] Exception in thread "main"

The plugin creates a native command script, like this one :

"D:\jdk6\jre\bin\java" -Xmx512M -cp "D:\repository\org\codehaus\mojo
\gwt-maven-plugin\1.1-SNAPSHOT\gwt-maven-plugin-1.1-SNAPSHOT.jar"
org.codehaus.mojo.gwt.fork.ForkBooter  "D:\projets\webapp\target
\gwt.classpath" com.google.gwt.dev.Compiler -gen "D:\projets\webapp
\target\gen" -logLevel INFO -style OBF -war "D:\projets\webapp\target
\webapp-1.0.0-SNAPSHOT" -localWorkers 2 com.sfr.bios.rc.CADM

The "ForkBooter" class is used to bypass Windows command line length
limitation. It created a child classloader based on project
dependencies list. In my case, the gwt.classpath file looks like :

D:\projets\webapp\src\main\java
D:\projets\webapp\target\generated-sources\gwt
D:\projets\webapp\src\main\resources
D:\projets\webapp\target\classes
D:\repository\com\google\gwt\gwt-user\1.6.0\gwt-user-1.6.0.jar
D:\repository\com\google\gwt\gwt-dev\1.6.0\gwt-dev-1.6.0-windows.jar
D:\repository\com\google\gwt\gwt-servlet\1.6.0\gwt-servlet-1.6.0.jar
...

As you can notice, the expected gwt-dev jar is present.

I suppose the "Compiling * permutations -  Process output" step has
some Classloader issue that doesn't support our nested ClassLoader.
Maybe it uses SystemClassloader directly ?

I didn't get further with this issue debugging the compiler to
understand what's wrong, maybe you've got an idea ?

Nicolas
--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---

Reply via email to