Groovyc fork failing on Windows?

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

Groovyc fork failing on Windows?

Dave King
Just today we've started getting reports from all of our devs who use
windows that the build is failing.  We're getting an IOException when
forking groovyc.  There isn't anything in the error message event with
-s.

Anyone else seeing this?

It worked last night.

- Peace
Dave

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Groovyc fork failing on Windows?

Peter Niederwieser
Can you provide more information? E.g. Gradle version (gradle/gradlew -v), Groovy version, full stack trace (-S), debug log output (-d).

--
Peter Niederwieser
Developer, Gradle
http://www.gradle.org
Trainer & Consultant, Gradle Inc.
http://www.gradle.biz
Founder, Spock Framework
http://spockframework.org
Reply | Threaded
Open this post in threaded view
|

Re: Groovyc fork failing on Windows?

Dave King
The only thing in the stack trace that looks useful is
Cannot run program "c:\PROGRA~1\Java\jdk1.6.0_10\jre\bin\java":
CreateProcess error=87

How ever you can run c:\PROGRA~1\Java\jdk1.6.0_10\jre\bin\java
-version and get the expected result.  I don't think we got even that
bit of info from machine running the 1.5 JVM.

While the test machine I've been using is on Gradle 0.9 one of the
other dev's has upgraded to 9.2 and we still see the issue.

Info dump from the test machine:

Gradle 0.9
------------------------------------------------------------
Gradle build time: Sunday, 19 December 2010 1:42:19 PM EST
Groovy: 1.7.6
Ant: Apache Ant version 1.8.1 compiled on April 30 2010
Ivy: 2.2.0
JVM: 1.6.0_10 (Sun Microsystems Inc. 11.0-b15)
OS: Windows Vista 6.0 x86

* Where:
Build file 'D:\sandbox\git\Gemini\classroom\classroom-full\build.gradle'

* What went wrong:
Execution failed for task ':classroom-full:compileDemoGroovy'.
Cause: Error running forked groovyc.

* Try:
Run with -d option to get more details. Run with -S option to get the full (very
verbose) stacktrace.

* Exception is:
org.gradle.api.tasks.LocationAwareTaskExecutionException: Build file 'D:\sandbox
\git\Gemini\classroom\classroom-full\build.gradle'
Execution failed for task ':classroom-full:compileDemoGroovy'.
        at org.gradle.api.internal.tasks.DefaultTaskExecuter.executeActions(Defa
ultTaskExecuter.java:66)
        at org.gradle.api.internal.tasks.DefaultTaskExecuter.execute(DefaultTask
Executer.java:43)
        at org.gradle.api.internal.project.taskfactory.PostExecutionAnalysisTask
Executer.execute(PostExecutionAnalysisTaskExecuter.java:32)
        at org.gradle.api.internal.project.taskfactory.ExecutionShortCircuitTask
Executer.execute(ExecutionShortCircuitTaskExecuter.java:50)
        at org.gradle.api.internal.tasks.SkipTaskExecuter.doExecute(SkipTaskExec
uter.java:57)
        at org.gradle.api.internal.tasks.SkipTaskExecuter.execute(SkipTaskExecut
er.java:35)
        at org.gradle.api.internal.tasks.ExecuteAtMostOnceTaskExecuter.execute(E
xecuteAtMostOnceTaskExecuter.java:32)
        at org.gradle.api.internal.AbstractTask.execute(AbstractTask.java:231)
        at org.gradle.execution.DefaultTaskGraphExecuter.executeTask(DefaultTask
GraphExecuter.java:167)
        at org.gradle.execution.DefaultTaskGraphExecuter.doExecute(DefaultTaskGr
aphExecuter.java:160)
        at org.gradle.execution.DefaultTaskGraphExecuter.execute(DefaultTaskGrap
hExecuter.java:78)
        at org.gradle.execution.TaskNameResolvingBuildExecuter.execute(TaskNameR
esolvingBuildExecuter.java:113)
        at org.gradle.execution.DelegatingBuildExecuter.execute(DelegatingBuildE
xecuter.java:54)
        at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(Default
GradleLauncher.java:153)
        at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradle
Launcher.java:107)
        at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLaun
cher.java:75)
        at org.gradle.launcher.RunBuildAction.execute(RunBuildAction.java:41)
        at org.gradle.launcher.RunBuildAction.execute(RunBuildAction.java:27)
        at org.gradle.launcher.CommandLineActionFactory$WithLoggingAction.execut
e(CommandLineActionFactory.java:209)
        at org.gradle.launcher.CommandLineActionFactory$WithLoggingAction.execut
e(CommandLineActionFactory.java:193)
        at org.gradle.launcher.Main.execute(Main.java:55)
        at org.gradle.launcher.Main.main(Main.java:40)
        at org.gradle.launcher.ProcessBootstrap.runNoExit(ProcessBootstrap.java:
46)
        at org.gradle.launcher.ProcessBootstrap.run(ProcessBootstrap.java:28)
        at org.gradle.launcher.GradleMain.main(GradleMain.java:24)
Caused by: : Error running forked groovyc.
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:106)
        at org.gradle.api.internal.project.ant.BasicAntBuilder.nodeCompleted(Bas
icAntBuilder.java:71)
        at org.gradle.api.internal.project.AntBuilderDelegate.nodeCompleted(Defa
ultIsolatedAntBuilder.groovy:137)
        at org.gradle.api.internal.tasks.compile.AntGroovyCompiler$_execute_clos
ure1.doCall(AntGroovyCompiler.groovy:66)
        at org.gradle.util.ConfigureUtil.configure(ConfigureUtil.java:61)
        at org.gradle.util.ConfigureUtil.configure(ConfigureUtil.java:31)
        at org.gradle.util.ConfigureUtil$configure.call(Unknown Source)
        at org.gradle.api.internal.project.DefaultIsolatedAntBuilder.execute(Def
aultIsolatedAntBuilder.groovy:98)
        at org.gradle.api.internal.project.IsolatedAntBuilder$execute.call(Unkno
wn Source)
        at org.gradle.api.internal.tasks.compile.AntGroovyCompiler.execute(AntGr
oovyCompiler.groovy:63)
        at org.gradle.api.internal.tasks.compile.IncrementalJavaSourceCompiler.e
xecute(IncrementalJavaSourceCompiler.java:73)
        at org.gradle.api.tasks.compile.GroovyCompile.compile(GroovyCompile.java
:60)
        at org.gradle.api.internal.BeanDynamicObject.invokeMethod(BeanDynamicObj
ect.java:158)
        at org.gradle.api.internal.CompositeDynamicObject.invokeMethod(Composite
DynamicObject.java:93)
        at org.gradle.api.tasks.compile.GroovyCompile_Decorated.invokeMethod(Unk
nown Source)
        at org.gradle.util.ReflectionUtil.invoke(ReflectionUtil.groovy:23)
        at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskF
actory$2.execute(AnnotationProcessingTaskFactory.java:131)
        at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskF
actory$2.execute(AnnotationProcessingTaskFactory.java:129)
        at org.gradle.api.internal.tasks.DefaultTaskExecuter.executeActions(Defa
ultTaskExecuter.java:58)
        ... 24 more
Caused by: java.io.IOException: Cannot run program "c:\PROGRA~1\Java\jdk1.6.0_10
\jre\bin\java": CreateProcess error=87, The parameter is incorrect
        at org.apache.tools.ant.taskdefs.Execute$Java13CommandLauncher.exec(Exec
ute.java:827)
        at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:445)
        at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:459)
        ... 44 more
Caused by: java.io.IOException: CreateProcess error=87, The parameter is incorre
ct
        ... 47 more

On Tue, Jan 25, 2011 at 3:53 PM, Peter Niederwieser <[hidden email]> wrote:

>
> Can you provide more information? E.g. Gradle version (gradle/gradlew -v),
> Groovy version, full stack trace (-S), debug log output (-d).
>
> --
> Peter Niederwieser
> Developer, Gradle
> http://www.gradle.org
> Trainer & Consultant, Gradle Inc.
> http://www.gradle.biz
> Founder, Spock Framework
> http://spockframework.org
> --
> View this message in context: http://gradle.1045684.n5.nabble.com/Groovyc-fork-failing-on-Windows-tp3357060p3357134.html
> Sent from the gradle-user mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Groovyc fork failing on Windows?

Dave King
After a bunch of experimentation we seem to have hit a size limit on
windows.  We have been adding a number of projects to the system, if
we remove enough of the projects it runs as expected, but with all of
them it fails.  We have one large project that if removed from the
classpath then groovyc runs just fine.  We can also include it but
remove a number of smaller  projects.

I think we'll need to separate runtime vs compile time requirements.

We're tried upping the memory settings and that doesn't seem to work,
so it looks like it's some string length limit on Windows. Arrrrrg!

Not sure yet where to file a bug report Gradle/Groovy/Oracle/MS?

Dave


On Tue, Jan 25, 2011 at 5:15 PM, Dave King <[hidden email]> wrote:

> The only thing in the stack trace that looks useful is
> Cannot run program "c:\PROGRA~1\Java\jdk1.6.0_10\jre\bin\java":
> CreateProcess error=87
>
> How ever you can run c:\PROGRA~1\Java\jdk1.6.0_10\jre\bin\java
> -version and get the expected result.  I don't think we got even that
> bit of info from machine running the 1.5 JVM.
>
> While the test machine I've been using is on Gradle 0.9 one of the
> other dev's has upgraded to 9.2 and we still see the issue.
>
> Info dump from the test machine:
>
> Gradle 0.9
> ------------------------------------------------------------
> Gradle build time: Sunday, 19 December 2010 1:42:19 PM EST
> Groovy: 1.7.6
> Ant: Apache Ant version 1.8.1 compiled on April 30 2010
> Ivy: 2.2.0
> JVM: 1.6.0_10 (Sun Microsystems Inc. 11.0-b15)
> OS: Windows Vista 6.0 x86
>
> * Where:
> Build file 'D:\sandbox\git\Gemini\classroom\classroom-full\build.gradle'
>
> * What went wrong:
> Execution failed for task ':classroom-full:compileDemoGroovy'.
> Cause: Error running forked groovyc.
>
> * Try:
> Run with -d option to get more details. Run with -S option to get the full (very
> verbose) stacktrace.
>
> * Exception is:
> org.gradle.api.tasks.LocationAwareTaskExecutionException: Build file 'D:\sandbox
> \git\Gemini\classroom\classroom-full\build.gradle'
> Execution failed for task ':classroom-full:compileDemoGroovy'.
>        at org.gradle.api.internal.tasks.DefaultTaskExecuter.executeActions(Defa
> ultTaskExecuter.java:66)
>        at org.gradle.api.internal.tasks.DefaultTaskExecuter.execute(DefaultTask
> Executer.java:43)
>        at org.gradle.api.internal.project.taskfactory.PostExecutionAnalysisTask
> Executer.execute(PostExecutionAnalysisTaskExecuter.java:32)
>        at org.gradle.api.internal.project.taskfactory.ExecutionShortCircuitTask
> Executer.execute(ExecutionShortCircuitTaskExecuter.java:50)
>        at org.gradle.api.internal.tasks.SkipTaskExecuter.doExecute(SkipTaskExec
> uter.java:57)
>        at org.gradle.api.internal.tasks.SkipTaskExecuter.execute(SkipTaskExecut
> er.java:35)
>        at org.gradle.api.internal.tasks.ExecuteAtMostOnceTaskExecuter.execute(E
> xecuteAtMostOnceTaskExecuter.java:32)
>        at org.gradle.api.internal.AbstractTask.execute(AbstractTask.java:231)
>        at org.gradle.execution.DefaultTaskGraphExecuter.executeTask(DefaultTask
> GraphExecuter.java:167)
>        at org.gradle.execution.DefaultTaskGraphExecuter.doExecute(DefaultTaskGr
> aphExecuter.java:160)
>        at org.gradle.execution.DefaultTaskGraphExecuter.execute(DefaultTaskGrap
> hExecuter.java:78)
>        at org.gradle.execution.TaskNameResolvingBuildExecuter.execute(TaskNameR
> esolvingBuildExecuter.java:113)
>        at org.gradle.execution.DelegatingBuildExecuter.execute(DelegatingBuildE
> xecuter.java:54)
>        at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(Default
> GradleLauncher.java:153)
>        at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradle
> Launcher.java:107)
>        at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLaun
> cher.java:75)
>        at org.gradle.launcher.RunBuildAction.execute(RunBuildAction.java:41)
>        at org.gradle.launcher.RunBuildAction.execute(RunBuildAction.java:27)
>        at org.gradle.launcher.CommandLineActionFactory$WithLoggingAction.execut
> e(CommandLineActionFactory.java:209)
>        at org.gradle.launcher.CommandLineActionFactory$WithLoggingAction.execut
> e(CommandLineActionFactory.java:193)
>        at org.gradle.launcher.Main.execute(Main.java:55)
>        at org.gradle.launcher.Main.main(Main.java:40)
>        at org.gradle.launcher.ProcessBootstrap.runNoExit(ProcessBootstrap.java:
> 46)
>        at org.gradle.launcher.ProcessBootstrap.run(ProcessBootstrap.java:28)
>        at org.gradle.launcher.GradleMain.main(GradleMain.java:24)
> Caused by: : Error running forked groovyc.
>        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
>        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
> a:106)
>        at org.gradle.api.internal.project.ant.BasicAntBuilder.nodeCompleted(Bas
> icAntBuilder.java:71)
>        at org.gradle.api.internal.project.AntBuilderDelegate.nodeCompleted(Defa
> ultIsolatedAntBuilder.groovy:137)
>        at org.gradle.api.internal.tasks.compile.AntGroovyCompiler$_execute_clos
> ure1.doCall(AntGroovyCompiler.groovy:66)
>        at org.gradle.util.ConfigureUtil.configure(ConfigureUtil.java:61)
>        at org.gradle.util.ConfigureUtil.configure(ConfigureUtil.java:31)
>        at org.gradle.util.ConfigureUtil$configure.call(Unknown Source)
>        at org.gradle.api.internal.project.DefaultIsolatedAntBuilder.execute(Def
> aultIsolatedAntBuilder.groovy:98)
>        at org.gradle.api.internal.project.IsolatedAntBuilder$execute.call(Unkno
> wn Source)
>        at org.gradle.api.internal.tasks.compile.AntGroovyCompiler.execute(AntGr
> oovyCompiler.groovy:63)
>        at org.gradle.api.internal.tasks.compile.IncrementalJavaSourceCompiler.e
> xecute(IncrementalJavaSourceCompiler.java:73)
>        at org.gradle.api.tasks.compile.GroovyCompile.compile(GroovyCompile.java
> :60)
>        at org.gradle.api.internal.BeanDynamicObject.invokeMethod(BeanDynamicObj
> ect.java:158)
>        at org.gradle.api.internal.CompositeDynamicObject.invokeMethod(Composite
> DynamicObject.java:93)
>        at org.gradle.api.tasks.compile.GroovyCompile_Decorated.invokeMethod(Unk
> nown Source)
>        at org.gradle.util.ReflectionUtil.invoke(ReflectionUtil.groovy:23)
>        at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskF
> actory$2.execute(AnnotationProcessingTaskFactory.java:131)
>        at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskF
> actory$2.execute(AnnotationProcessingTaskFactory.java:129)
>        at org.gradle.api.internal.tasks.DefaultTaskExecuter.executeActions(Defa
> ultTaskExecuter.java:58)
>        ... 24 more
> Caused by: java.io.IOException: Cannot run program "c:\PROGRA~1\Java\jdk1.6.0_10
> \jre\bin\java": CreateProcess error=87, The parameter is incorrect
>        at org.apache.tools.ant.taskdefs.Execute$Java13CommandLauncher.exec(Exec
> ute.java:827)
>        at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:445)
>        at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:459)
>        ... 44 more
> Caused by: java.io.IOException: CreateProcess error=87, The parameter is incorre
> ct
>        ... 47 more
>
> On Tue, Jan 25, 2011 at 3:53 PM, Peter Niederwieser <[hidden email]> wrote:
>>
>> Can you provide more information? E.g. Gradle version (gradle/gradlew -v),
>> Groovy version, full stack trace (-S), debug log output (-d).
>>
>> --
>> Peter Niederwieser
>> Developer, Gradle
>> http://www.gradle.org
>> Trainer & Consultant, Gradle Inc.
>> http://www.gradle.biz
>> Founder, Spock Framework
>> http://spockframework.org
>> --
>> View this message in context: http://gradle.1045684.n5.nabble.com/Groovyc-fork-failing-on-Windows-tp3357060p3357134.html
>> Sent from the gradle-user mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>    http://xircles.codehaus.org/manage_email
>>
>>
>>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Groovyc fork failing on Windows?

Peter Niederwieser
By default, groovyc is run in a forked JVM. I guess the class path that Gradle passes might get too long. Try:
gradle clean build -d | grep -A 50 'org.codehaus.groovy.tools.FileSystemCompiler'

If this confirms my assumption, feel free to raise an issue against Gradle. It puts too much on the compile class path currently.

Meanwhile, you can try to run groovyc in the same JVM:

[compileGroovy, compileTestGroovy]*.groovyOptions.fork = false

You might have to raise the heap limit for the Gradle JVM:

export GRADLE_OPTS=-Xmx512m

Hope this helps.

--
Peter Niederwieser
Developer, Gradle
http://www.gradle.org
Trainer & Consultant, Gradle Inc.
http://www.gradle.biz
Founder, Spock Framework
http://spockframework.org
Reply | Threaded
Open this post in threaded view
|

Re: Groovyc fork failing on Windows?

Dave King
Thanks Peter will give that a try.  We've did up the heap that doesn't
seem to be the issue.  I think Windows has a hard limit that we're
hitting.

Dave


On Wed, Jan 26, 2011 at 8:15 AM, Peter Niederwieser <[hidden email]> wrote:

>
> By default, groovyc is run in a forked JVM. I guess the class path that
> Gradle passes might get too long. Try:
> gradle clean build -d | grep -A 50
> 'org.codehaus.groovy.tools.FileSystemCompiler'
>
> If this confirms my assumption, feel free to raise an issue against Gradle.
> It puts too much on the compile class path currently.
>
> Meanwhile, you can try to run groovyc in the same JVM:
>
> [compileGroovy, compileTestGroovy]*.groovyOptions.fork = false
>
> You might have to raise the heap limit for the Gradle JVM:
>
> export GRADLE_OPTS=-Xmx512m
>
> Hope this helps.
>
> --
> Peter Niederwieser
> Developer, Gradle
> http://www.gradle.org
> Trainer & Consultant, Gradle Inc.
> http://www.gradle.biz
> Founder, Spock Framework
> http://spockframework.org
> --
> View this message in context: http://gradle.1045684.n5.nabble.com/Groovyc-fork-failing-on-Windows-tp3357060p3358039.html
> Sent from the gradle-user mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Groovyc fork failing on Windows?

rbuitrago
This post has NOT been accepted by the mailing list yet.
I'm interested in learning how did things worked for you with this issue. I'm having almost the same issue on my Win XP box during a regular dev build and I'm a little stuck. Will keep on reading the documentation, but so far I haven't seen any lead to a possible solution.

Tried to set the options to disable the forking in GRADLE_OPTS as "-Xmx512m -DcompileGroovy.groovyOptions.fork=false" but it is still throwing "Error running forked groovyc".

Thanks in advance,

Rick
Reply | Threaded
Open this post in threaded view
|

Re: Groovyc fork failing on Windows?

Peter Niederwieser
rbuitrago wrote
Tried to set the options to disable the forking in GRADLE_OPTS as "-Xmx512m -DcompileGroovy.groovyOptions.fork=false" but it is still throwing "Error running forked groovyc".
You can't set compileGroovy.groovyOptions.fork via a system property; you have to do it in the build script.

--
Peter Niederwieser
Principal Engineer, Gradleware
http://gradleware.com
Creator, Spock Framework
http://spockframework.org
Twitter: @pniederw
Reply | Threaded
Open this post in threaded view
|

Re: Groovyc fork failing on Windows?

rbuitrago
This post has NOT been accepted by the mailing list yet.
In reply to this post by rbuitrago
I tried writting the property within the build.gradle as follows:

compileGroovy {
    groovyOptions.setFork(false)
}

And it works for me now on my XP machine. Thanks!
Reply | Threaded
Open this post in threaded view
|

Re: Groovyc fork failing on Windows?

hbogaards
In reply to this post by rbuitrago
For me the issue went away when I upgraded from java 1.6.0_27 to 1.6.0_30.

Maybe this helps.
--
Hans
Reply | Threaded
Open this post in threaded view
|

Re: Groovyc fork failing on Windows?

ajbeckwith
Hans, do you know why this is? I don't see anything in the 1.6.0_30 release notes indicating a fix in this area (or maybe I am missing it).

I upgraded to the latest 1.0 Gradle, and left my JDK at  _29, and still got the error.

Updated to _33 (the current latest), and all is well.

Anybody know why this is?
Reply | Threaded
Open this post in threaded view
|

Re: Groovyc fork failing on Windows?

Spencer Allain
I certainly do not know why, but for groovyhelp there is this specific note:
  1. Oracle JDK/JRE 1.6.0u10+ is strongly recommended to use GroovyHelp.(JDK/JRE 1.6.0u29 is NOT recommended).
-Spencer


From: ajbeckwith <[hidden email]>
To: [hidden email]
Sent: Tuesday, June 26, 2012 4:18 PM
Subject: [gradle-user] Re: Groovyc fork failing on Windows?

Hans, do you know why this is? I don't see anything in the 1.6.0_30 release
notes indicating a fix in this area (or maybe I am missing it).

I upgraded to the latest 1.0 Gradle, and left my JDK at  _29, and still got
the error.

Updated to _33 (the current latest), and all is well.

Anybody know why this is?


--
View this message in context: http://gradle.1045684.n5.nabble.com/Groovyc-fork-failing-on-Windows-tp3357060p5709907.html
Sent from the gradle-user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email