maven-googlewebtoolkit2-plugin fails trying to set the CLASSPATH due to limitation of characters on windows.

4 views
Skip to first unread message

edelln

unread,
Mar 10, 2008, 7:00:28 AM3/10/08
to gwt-maven
Hi,

I am trying to use the webtookkit but it fails on windows due to the
limitations of the length of characters when it is attempting to set
the CLASSPATH.

I see in the code in com.totsp.mavenplugin.gwt.ScriptWriterWindows
class in both methods

writeRunScript(...) and writeCompileScript(...)

there is a comparison

if( cpString.length() > 4000 ){

If I change this to 6000 - this works for me after rebuilding the
src.

Is it possible to increase this size ???

thanks, Edell.

Robert "kebernet" Cooper

unread,
Mar 10, 2008, 11:00:51 AM3/10/08
to gwt-...@googlegroups.com
There is a fix for this in CVS. Once I get the new plugin version up, this should be corrected.
--
:Robert "kebernet" Cooper
::kebe...@gmail.com
Alice's cleartext
Charlie is the attacker
Bob signs and encrypts
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x9E8759F8

edelln

unread,
Mar 11, 2008, 6:42:37 AM3/11/08
to gwt-maven
Hi,

Thats great! Do you have any idea when that will be ?

Are we talking days or weeks ?

thanks, Edell.

On Mar 10, 3:00 pm, "Robert \"kebernet\" Cooper" <keber...@gmail.com>
wrote:
> There is a fix for this in CVS. Once I get the new plugin version up, this
> should be corrected.
>
>
>
>
>
> On Mon, Mar 10, 2008 at 7:00 AM, edelln <edell.no...@gmail.com> wrote:
>
> > Hi,
>
> > I am trying to use the webtookkit but it fails on windows due to the
> > limitations of the length of characters when it is attempting to set
> > the CLASSPATH.
>
> > I see in the code in  com.totsp.mavenplugin.gwt.ScriptWriterWindows
> > class in both methods
>
> > writeRunScript(...) and writeCompileScript(...)
>
> > there is a comparison
>
> >  if( cpString.length() > 4000 ){
>
> > If I change this to 6000 - this works for me after rebuilding the
> > src.
>
> > Is it possible to increase this size ???
>
> > thanks, Edell.
>
> --
> :Robert "kebernet" Cooper
> ::keber...@gmail.com
> Alice's cleartext
> Charlie is the attacker
> Bob signs and encryptshttp://pgp.mit.edu:11371/pks/lookup?op=get&search=0x9E8759F8- Hide quoted text -
>
> - Show quoted text -

edelln

unread,
Mar 26, 2008, 7:59:19 AM3/26/08
to gwt-maven
Any Update on when this is going to be released ?

thanks, Edell.
> > Bob signs and encryptshttp://pgp.mit.edu:11371/pks/lookup?op=get&search=0x9E8759F8-Hide quoted text -
>
> > - Show quoted text -- Hide quoted text -

Robert "kebernet" Cooper

unread,
Mar 29, 2008, 1:06:50 PM3/29/08
to gwt-...@googlegroups.com
Please try the 2.0beta8 version and let me know of it works for you.
--
:Robert "kebernet" Cooper
::kebe...@gmail.com

edelln

unread,
Apr 8, 2008, 12:58:24 PM4/8/08
to gwt-maven
I get the following error below with 2.0-beta8 and still get line too
long with version 9.

[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Exception attempting compile.

[INFO]
------------------------------------------------------------------------
[DEBUG] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Exception
attempting com
pile.
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:564)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi
fecycle(DefaultLifecycleExecutor.java:480)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
ltLifecycleExecutor.java:459)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
dleFailures(DefaultLifecycleExecutor.java:311)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
ts(DefaultLifecycleExecutor.java:278)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
fecycleExecutor.java:143)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:
334)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:
125)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:280)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)

at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: Exception
attempting
compile.
at
com.totsp.mavenplugin.gwt.CompileMojo.execute(CompileMojo.java:60)
at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
nManager.java:443)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:539)
... 16 more
Caused by: java.lang.NullPointerException
at
com.totsp.mavenplugin.gwt.ScriptWriterWindows.writeCompileScript(Scri
ptWriterWindows.java:130)
at
com.totsp.mavenplugin.gwt.CompileMojo.execute(CompileMojo.java:52)

On Mar 29, 5:06 pm, "Robert \"kebernet\" Cooper" <keber...@gmail.com>
wrote:
> Bob signs and encryptshttp://pgp.mit.edu:11371/pks/lookup?op=get&search=0x9E8759F8- Hide quoted text -

edelln

unread,
Jul 28, 2008, 8:57:09 AM7/28/08
to gwt-...@googlegroups.com
Hi,

I have tested with beta18 and this error this exists in the plugin

If you look in the the ScriptWriterWindows.java file and do a search
for 4000 - you will see

//break the line at 4000 characters to avout max size.
if (cpString.length() > 4000) {
writer.println(cpString);
cpString = new StringBuffer();
writer.print("set CLASSPATH=%CLASSPATH%;");
}

Can you change this to 6000 as it won't compile my classes as it says
the classpath is over 4000 but if i change it to 6000 it works fine.

thanks, Edell.

edelln

unread,
Sep 1, 2008, 12:33:47 PM9/1/08
to gwt-maven
Is there any update on this ?

thanks, Edell.
> > Bob signs and encryptshttp://pgp.mit.edu:11371/pks/lookup?op=get&search=0x9E8759F8-Hidequoted text -

Charlie Collins

unread,
Sep 1, 2008, 9:09:19 PM9/1/08
to gwt-maven
This is more complicated than just changing 4000 to 6000, I'm
afraid.

Other Maven plugins go to extraordinary lengths to deal with this (see
what Surefire does - http://maven.apache.org/plugins/maven-surefire-plugin/examples/class-loading.html).
At some point we may need to also, but it's not clear just using 6000
will solve it (it depends on what version of Windows, and so on).
> > > Bob signs and encryptshttp://pgp.mit.edu:11371/pks/lookup?op=get&search=0x9E8759F8-Hidequotedtext -

Peter Feltham

unread,
Sep 2, 2008, 6:56:25 PM9/2/08
to gwt-maven
We faced the same problem a while back and developed a complete
solution. Unfortunately it touches more than just the gwt-maven plugin
though... See the link below.

http://code.google.com/p/gwt-maven/issues/detail?id=88#c13

Mirko Nasato

unread,
Sep 3, 2008, 5:32:35 AM9/3/08
to gwt-...@googlegroups.com
That sounds pretty complex, and depends on the Classworlds issue

  http://jira.codehaus.org/browse/CLASSWORLDS-21

to be fixed first anyway.

Increasing your environment space seems the simplest workaround for the moment

  http://support.microsoft.com/kb/230205
  http://kipirvine.com/asm/4th/editor/environ.htm

Cheers

Mirko


2008/9/2 Peter Feltham <pfel...@infocomp.com>

Charlie Collins

unread,
Sep 3, 2008, 7:45:18 AM9/3/08
to gwt-maven
Thanks Peter, very impressive effort there.

While I think this is great work, I also agree with Mirko that it's
quite complex. Now, I would be willing to to also say I don't care
about the complexity as long as someone is willing to maintain it, but
that someone can't be me (I don't run Windows other than for a lone
test from time to time).

I am cognizant that this is a big problem right now for Windows users.
Also, I have solicited help on this issue on the forum several times,
and not really gotten any traction (I went so far as to add a few
people who said they wanted to do it, and had solutions, as project
members - then nothing materialized for months and they were removed
as members).

I appreciate the patch though, that's the best help we have gotten
thus far on this issue.

Question for the Windows world. One comment on the issue says "why
4000 btw, as the limit is 2048 on w2k and 8192 on
xp". What if we detected the version of windows and split
accordingly? Would that even help though, that poster says he tried a
few things but still had problems because of the expansion? That and
the comspec setting, does that work (some people seem to report it
does, others say no)? I am not sure which way to go here (and we
can't go the same way surefire did, classpath manifest jar, or
isolated classloader, that doesn't work with GWT tests, and maybe not
other stuff, haven't tried).

Maybe we can send everyone that has this problem a coupon for a real
computer (easy fellas, joking ;)).









On Sep 2, 6:56 pm, Peter Feltham <pfelt...@infocomp.com> wrote:
> We faced the same problem a while back and developed a complete
> solution. Unfortunately it touches more than just the gwt-maven plugin
> though... See the link below.
>
> http://code.google.com/p/gwt-maven/issues/detail?id=88#c13
>
> Charlie Collins wrote:
> > This is more complicated than just changing 4000 to 6000, I'm
> > afraid.
>
> > Other Maven plugins go to extraordinary lengths to deal with this (see
> > what Surefire does -http://maven.apache.org/plugins/maven-surefire-plugin/examples/class-...).
> > > > > Bob signs and encryptshttp://pgp.mit.edu:11371/pks/lookup?op=get&search=0x9E8759F8-Hidequot...-
Reply all
Reply to author
Forward
0 new messages