Cannot run build with jvm argument -verbose:class


(Alexey Tsvetkov) #1

When I add option:

-verbose:class

either to org.gradle.jvmargs or to GRADLE_OPTS, the following exception is thrown:

org.gradle.api.GradleException: Could not start Gradle daemon.
at org.gradle.launcher.daemon.client.DefaultDaemonStarter.startProcess(DefaultDaemonStarter.java:153)
at org.gradle.launcher.daemon.client.DefaultDaemonStarter.startDaemon(DefaultDaemonStarter.java:130)
at org.gradle.launcher.daemon.client.DefaultDaemonConnector.startDaemon(DefaultDaemonConnector.java:110)
at org.gradle.launcher.daemon.client.SingleUseDaemonClient.execute(SingleUseDaemonClient.java:53)
at org.gradle.launcher.daemon.client.SingleUseDaemonClient.execute(SingleUseDaemonClient.java:37)
at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:43)
at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:170)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:237)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:210)
at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:35)
at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:24)
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:206)
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:169)
at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
at org.gradle.launcher.Main.doAction(Main.java:33)
at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:54)
at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:35)
at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:33)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:130)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:48)
Caused by: org.gradle.api.UncheckedIOException: java.io.IOException: Unexpected value 91 received. It seems the stream was not encoded correctly.
at org.gradle.launcher.daemon.bootstrap.DaemonStartupCommunication.readDiagnostics(DaemonStartupCommunication.java:100)
at org.gradle.launcher.daemon.bootstrap.DaemonGreeter.parseDaemonOutput(DaemonGreeter.java:40)
at org.gradle.launcher.daemon.client.DefaultDaemonStarter.startProcess(DefaultDaemonStarter.java:149)
… 30 more
Caused by: java.io.IOException: Unexpected value 91 received. It seems the stream was not encoded correctly.
at org.gradle.process.internal.child.EncodedStream$EncodedInput.hexToByte(EncodedStream.java:59)
at org.gradle.process.internal.child.EncodedStream$EncodedInput.read(EncodedStream.java:49)
at java.io.DataInputStream.readBoolean(DataInputStream.java:242)
at org.gradle.internal.serialize.InputStreamBackedDecoder.readBoolean(InputStreamBackedDecoder.java:47)
at org.gradle.internal.serialize.AbstractDecoder.readNullableString(AbstractDecoder.java:53)
at org.gradle.launcher.daemon.bootstrap.DaemonStartupCommunication.readDiagnostics(DaemonStartupCommunication.java:85)
… 32 more


(Alexey Tsvetkov) #2

I’ve managed to find a workaround:
0. do not use daemon

  1. remove all org.gradle.jvmargs and GRADLE_OPTS options
  2. add -verbose:class to the last line in gradlew