You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@groovy.apache.org by Jochen Theodorou <bl...@gmx.org> on 2016/09/26 19:14:09 UTC

uninformative gradle error messages

Hi all,

maybe some people here with more gradle knowledge can help me a bit. I 
am trying to run the jigsaw-136 build, of which I know gradle has 
problems with, but well I am trying to work around those. So I am 
starting our build with

GRADLE_OPTS="--add-exports-private java.base/java.lang=ALL-UNNAMED"

and ./gradlew -S

I get:
> * Exception is:
> org.gradle.api.GradleException: Unable to start the daemon process.
> This problem might be caused by incorrect configuration of the daemon.
> For example, an unrecognized jvm option is used.
> Please refer to the user guide chapter on the daemon at https://docs.gradle.org/3.1/userguide/gradle_daemon.html
> Please read the following process output to find out more:
> -----------------------
>
> FAILURE: Build failed with an exception.
>
> * What went wrong:
> java.lang.ExceptionInInitializerError (no error message)
>
> * Try:
> Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
>
> at org.gradle.launcher.daemon.bootstrap.DaemonGreeter.parseDaemonOutput(DaemonGreeter.java:34)
> at org.gradle.launcher.daemon.client.DefaultDaemonStarter.startProcess(DefaultDaemonStarter.java:152)
> at org.gradle.launcher.daemon.client.DefaultDaemonStarter.startDaemon(DefaultDaemonStarter.java:135)
> at org.gradle.launcher.daemon.client.DefaultDaemonConnector.startDaemon(DefaultDaemonConnector.java:203)
> at org.gradle.launcher.daemon.client.SingleUseDaemonClient.execute(SingleUseDaemonClient.java:52)

Can anyone tell me how I can get further information about what actually 
went wrong?

bye Jochen



Re: uninformative gradle error messages

Posted by Jochen Theodorou <bl...@gmx.org>.
On 26.09.2016 21:38, C�dric Champeau wrote:
> I'm seeing the same, and no better luck with an explicit error message.
> I tried with --no-daemon which goes a bit further but I doubt you'll be
> able to work around those easily.

adding --no-daemon does not change the output for me at all.

As for working around those... nobody said something about "easily" ;) 
Just trying to identify the things before there is a solution. I also 
want to bring those things up on the jigsaw-dev list if possible so the 
guys are aware of it.

bye Jochen


Re: uninformative gradle error messages

Posted by Cédric Champeau <ce...@gmail.com>.
I'm seeing the same, and no better luck with an explicit error message. I
tried with --no-daemon which goes a bit further but I doubt you'll be able
to work around those easily.

2016-09-26 21:14 GMT+02:00 Jochen Theodorou <bl...@gmx.org>:

> Hi all,
>
> maybe some people here with more gradle knowledge can help me a bit. I am
> trying to run the jigsaw-136 build, of which I know gradle has problems
> with, but well I am trying to work around those. So I am starting our build
> with
>
> GRADLE_OPTS="--add-exports-private java.base/java.lang=ALL-UNNAMED"
>
> and ./gradlew -S
>
> I get:
>
>> * Exception is:
>> org.gradle.api.GradleException: Unable to start the daemon process.
>> This problem might be caused by incorrect configuration of the daemon.
>> For example, an unrecognized jvm option is used.
>> Please refer to the user guide chapter on the daemon at
>> https://docs.gradle.org/3.1/userguide/gradle_daemon.html
>> Please read the following process output to find out more:
>> -----------------------
>>
>> FAILURE: Build failed with an exception.
>>
>> * What went wrong:
>> java.lang.ExceptionInInitializerError (no error message)
>>
>> * Try:
>> Run with --stacktrace option to get the stack trace. Run with --info or
>> --debug option to get more log output.
>>
>> at org.gradle.launcher.daemon.bootstrap.DaemonGreeter.parseDaem
>> onOutput(DaemonGreeter.java:34)
>> at org.gradle.launcher.daemon.client.DefaultDaemonStarter.start
>> Process(DefaultDaemonStarter.java:152)
>> at org.gradle.launcher.daemon.client.DefaultDaemonStarter.start
>> Daemon(DefaultDaemonStarter.java:135)
>> at org.gradle.launcher.daemon.client.DefaultDaemonConnector.sta
>> rtDaemon(DefaultDaemonConnector.java:203)
>> at org.gradle.launcher.daemon.client.SingleUseDaemonClient.exec
>> ute(SingleUseDaemonClient.java:52)
>>
>
> Can anyone tell me how I can get further information about what actually
> went wrong?
>
> bye Jochen
>
>
>

Re: uninformative gradle error messages

Posted by John Wagenleitner <jo...@gmail.com>.
On Tue, Sep 27, 2016 at 11:15 AM, John Wagenleitner <
john.wagenleitner@gmail.com> wrote:

> On Mon, Sep 26, 2016 at 12:14 PM, Jochen Theodorou <bl...@gmx.org>
> wrote:
>
>> Hi all,
>>
>> maybe some people here with more gradle knowledge can help me a bit. I am
>> trying to run the jigsaw-136 build, of which I know gradle has problems
>> with, but well I am trying to work around those. So I am starting our build
>> with
>>
>> GRADLE_OPTS="--add-exports-private java.base/java.lang=ALL-UNNAMED"
>>
>> and ./gradlew -S
>>
>> I get:
>>
>>> * Exception is:
>>> org.gradle.api.GradleException: Unable to start the daemon process.
>>> This problem might be caused by incorrect configuration of the daemon.
>>> For example, an unrecognized jvm option is used.
>>> Please refer to the user guide chapter on the daemon at
>>> https://docs.gradle.org/3.1/userguide/gradle_daemon.html
>>> Please read the following process output to find out more:
>>> -----------------------
>>>
>>> FAILURE: Build failed with an exception.
>>>
>>> * What went wrong:
>>> java.lang.ExceptionInInitializerError (no error message)
>>>
>>> * Try:
>>> Run with --stacktrace option to get the stack trace. Run with --info or
>>> --debug option to get more log output.
>>>
>>> at org.gradle.launcher.daemon.bootstrap.DaemonGreeter.parseDaem
>>> onOutput(DaemonGreeter.java:34)
>>> at org.gradle.launcher.daemon.client.DefaultDaemonStarter.start
>>> Process(DefaultDaemonStarter.java:152)
>>> at org.gradle.launcher.daemon.client.DefaultDaemonStarter.start
>>> Daemon(DefaultDaemonStarter.java:135)
>>> at org.gradle.launcher.daemon.client.DefaultDaemonConnector.sta
>>> rtDaemon(DefaultDaemonConnector.java:203)
>>> at org.gradle.launcher.daemon.client.SingleUseDaemonClient.exec
>>> ute(SingleUseDaemonClient.java:52)
>>>
>>
>> Can anyone tell me how I can get further information about what actually
>> went wrong?
>>
>
>
>
> I get a little further by doing the following:
>
> 1.  export GRADLE_OPTS=--add-exports-private
> java.base/java.lang=ALL-UNNAMED --add-exports-private
> java.base/java.util=ALL-UNNAMED
>
> 2.  add the same options above to the "org.gradle.jvmargs" in
> gradle.properties
>
> 3.  in buildSrc/build.gradle add
>
> if (JavaVersion.current().java9Compatible) {
>     allprojects {
>         tasks.withType(GroovyCompile) {
>             groovyOptions.forkOptions.jvmArgs.addAll(['--add-exports-private',
> 'java.base/java.lang=ALL-UNNAMED'])
>         }
>         test {
>             jvmArgs '-addmods', 'java.xml.bind'
>         }
>     }
> }
>
> After that it starts to fail resolving methods used in the gradle build
> files.
>


After getting past the build issues above, the latest jigsaw builds
(ea-b138) cause method invocations to fail.  I think the following commit
[1] on master fixes this problem, but since Gradle is using 2.4.7 it fails
to evaluate the build files when they execute methods [2].

[1]
https://github.com/apache/groovy/commit/71e6258c8fcd8ae5bea1f5a4d708c42e6bf69519

[2]
https://github.com/apache/groovy/blob/f93cb30a45a7fbc5a44061837c83114c14bcb074/gradle/filter.gradle#L29

Re: uninformative gradle error messages

Posted by John Wagenleitner <jo...@gmail.com>.
On Mon, Sep 26, 2016 at 12:14 PM, Jochen Theodorou <bl...@gmx.org>
wrote:

> Hi all,
>
> maybe some people here with more gradle knowledge can help me a bit. I am
> trying to run the jigsaw-136 build, of which I know gradle has problems
> with, but well I am trying to work around those. So I am starting our build
> with
>
> GRADLE_OPTS="--add-exports-private java.base/java.lang=ALL-UNNAMED"
>
> and ./gradlew -S
>
> I get:
>
>> * Exception is:
>> org.gradle.api.GradleException: Unable to start the daemon process.
>> This problem might be caused by incorrect configuration of the daemon.
>> For example, an unrecognized jvm option is used.
>> Please refer to the user guide chapter on the daemon at
>> https://docs.gradle.org/3.1/userguide/gradle_daemon.html
>> Please read the following process output to find out more:
>> -----------------------
>>
>> FAILURE: Build failed with an exception.
>>
>> * What went wrong:
>> java.lang.ExceptionInInitializerError (no error message)
>>
>> * Try:
>> Run with --stacktrace option to get the stack trace. Run with --info or
>> --debug option to get more log output.
>>
>> at org.gradle.launcher.daemon.bootstrap.DaemonGreeter.parseDaem
>> onOutput(DaemonGreeter.java:34)
>> at org.gradle.launcher.daemon.client.DefaultDaemonStarter.start
>> Process(DefaultDaemonStarter.java:152)
>> at org.gradle.launcher.daemon.client.DefaultDaemonStarter.start
>> Daemon(DefaultDaemonStarter.java:135)
>> at org.gradle.launcher.daemon.client.DefaultDaemonConnector.sta
>> rtDaemon(DefaultDaemonConnector.java:203)
>> at org.gradle.launcher.daemon.client.SingleUseDaemonClient.exec
>> ute(SingleUseDaemonClient.java:52)
>>
>
> Can anyone tell me how I can get further information about what actually
> went wrong?
>



I get a little further by doing the following:

1.  export GRADLE_OPTS=--add-exports-private
java.base/java.lang=ALL-UNNAMED --add-exports-private
java.base/java.util=ALL-UNNAMED

2.  add the same options above to the "org.gradle.jvmargs" in
gradle.properties

3.  in buildSrc/build.gradle add

if (JavaVersion.current().java9Compatible) {
    allprojects {
        tasks.withType(GroovyCompile) {

groovyOptions.forkOptions.jvmArgs.addAll(['--add-exports-private',
'java.base/java.lang=ALL-UNNAMED'])
        }
        test {
            jvmArgs '-addmods', 'java.xml.bind'
        }
    }
}

After that it starts to fail resolving methods used in the gradle build
files.