{"action":"created","issue":{"url":"https://api.github.com/repos/gradle/gradle-profiler/issues/60","repository_url":"https://api.github.com/repos/gradle/gradle-profiler","labels_url":"https://api.github.com/repos/gradle/gradle-profiler/issues/60/labels{/name}","comments_url":"https://api.github.com/repos/gradle/gradle-profiler/issues/60/comments","events_url":"https://api.github.com/repos/gradle/gradle-profiler/issues/60/events","html_url":"https://github.com/gradle/gradle-profiler/issues/60","id":311432111,"number":60,"title":"Can't build gradle-profiler with OpenJDK 9.","user":{"login":"artem-zinnatullin","id":967132,"avatar_url":"https://avatars0.githubusercontent.com/u/967132?v=4","gravatar_id":"","url":"https://api.github.com/users/artem-zinnatullin","html_url":"https://github.com/artem-zinnatullin","followers_url":"https://api.github.com/users/artem-zinnatullin/followers","following_url":"https://api.github.com/users/artem-zinnatullin/following{/other_user}","gists_url":"https://api.github.com/users/artem-zinnatullin/gists{/gist_id}","starred_url":"https://api.github.com/users/artem-zinnatullin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/artem-zinnatullin/subscriptions","organizations_url":"https://api.github.com/users/artem-zinnatullin/orgs","repos_url":"https://api.github.com/users/artem-zinnatullin/repos","events_url":"https://api.github.com/users/artem-zinnatullin/events{/privacy}","received_events_url":"https://api.github.com/users/artem-zinnatullin/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-04-05T00:08:46Z","updated_at":"2018-05-10T21:11:41Z","closed_at":"2018-04-17T14:14:42Z","author_association":"CONTRIBUTOR","body":"Hi guys, I need to benchmark and profile build with OpenJDK 9.\r\n\r\nBut I can't even build gradle-profiler itself:\r\n\r\n```console\r\n./gradlew installDist --stacktrace\r\n```\r\n\r\nFails with following stacktrace:\r\n\r\n```console\r\n> Task :compileJava FAILED\r\n\r\nFAILURE: Build failed with an exception.\r\n\r\n* What went wrong:\r\nExecution failed for task ':compileJava'.\r\n> java.lang.reflect.UndeclaredThrowableException\r\n\r\n* Try:\r\nRun with --info or --debug option to get more log output. Run with --scan to get full insights.\r\n\r\n* Exception is:\r\norg.gradle.api.tasks.TaskExecutionException: Execution failed for task ':compileJava'.\r\n\tat org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:103)\r\n\tat org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:73)\r\n\tat org.gradle.api.internal.tasks.execution.OutputDirectoryCreatingTaskExecuter.execute(OutputDirectoryCreatingTaskExecuter.java:51)\r\n\tat org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:59)\r\n\tat org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)\r\n\tat org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:59)\r\n\tat org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:101)\r\n\tat org.gradle.api.internal.tasks.execution.FinalizeInputFilePropertiesTaskExecuter.execute(FinalizeInputFilePropertiesTaskExecuter.java:44)\r\n\tat org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:91)\r\n\tat org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:62)\r\n\tat org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:59)\r\n\tat org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)\r\n\tat org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)\r\n\tat org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)\r\n\tat org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.java:256)\r\n\tat org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:317)\r\n\tat org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:309)\r\n\tat org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:185)\r\n\tat org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:97)\r\n\tat org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)\r\n\tat org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:249)\r\n\tat org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:238)\r\n\tat org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:104)\r\n\tat org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:98)\r\n\tat org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:663)\r\n\tat org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:596)\r\n\tat org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:98)\r\n\tat org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)\r\n\tat org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)\r\n\tat org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)\r\nCaused by: java.lang.RuntimeException: java.lang.reflect.UndeclaredThrowableException\r\n\tat com.sun.tools.javac.api.JavacTool.getTask(jdk.compiler@9-internal/JavacTool.java:180)\r\n\tat com.sun.tools.javac.api.JavacTool.getTask(jdk.compiler@9-internal/JavacTool.java:109)\r\n\tat com.sun.tools.javac.api.JavacTool.getTask(jdk.compiler@9-internal/JavacTool.java:65)\r\n\tat org.gradle.api.internal.tasks.compile.JdkJavaCompiler.createCompileTask(JdkJavaCompiler.java:67)\r\n\tat org.gradle.api.internal.tasks.compile.JdkJavaCompiler.execute(JdkJavaCompiler.java:49)\r\n\tat org.gradle.api.internal.tasks.compile.JdkJavaCompiler.execute(JdkJavaCompiler.java:36)\r\n\tat org.gradle.api.internal.tasks.compile.NormalizingJavaCompiler.delegateAndHandleErrors(NormalizingJavaCompiler.java:98)\r\n\tat org.gradle.api.internal.tasks.compile.NormalizingJavaCompiler.execute(NormalizingJavaCompiler.java:51)\r\n\tat org.gradle.api.internal.tasks.compile.NormalizingJavaCompiler.execute(NormalizingJavaCompiler.java:37)\r\n\tat org.gradle.api.internal.tasks.compile.CleaningJavaCompilerSupport.execute(CleaningJavaCompilerSupport.java:35)\r\n\tat org.gradle.api.internal.tasks.compile.CleaningJavaCompilerSupport.execute(CleaningJavaCompilerSupport.java:25)\r\n\tat org.gradle.api.tasks.compile.JavaCompile.performCompilation(JavaCompile.java:156)\r\n\tat org.gradle.api.tasks.compile.JavaCompile.compile(JavaCompile.java:141)\r\n\tat org.gradle.api.tasks.compile.JavaCompile.compile(JavaCompile.java:114)\r\n\tat org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)\r\n\tat org.gradle.api.internal.project.taskfactory.IncrementalTaskAction.doExecute(IncrementalTaskAction.java:50)\r\n\tat org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:39)\r\n\tat org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:26)\r\n\tat org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:124)\r\n\tat org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:317)\r\n\tat org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:309)\r\n\tat org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:185)\r\n\tat org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:97)\r\n\tat org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)\r\n\tat org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:113)\r\n\tat org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:95)\r\n\t... 29 more\r\nCaused by: java.lang.reflect.UndeclaredThrowableException\r\n\tat com.sun.proxy.$Proxy68.handleOption(Unknown Source)\r\n\tat com.sun.tools.javac.api.ClientCodeWrapper$WrappedJavaFileManager.handleOption(jdk.compiler@9-internal/ClientCodeWrapper.java:265)\r\n\tat com.sun.tools.javac.main.Arguments.doProcessArgs(jdk.compiler@9-internal/Arguments.java:375)\r\n\tat com.sun.tools.javac.main.Arguments.processArgs(jdk.compiler@9-internal/Arguments.java:294)\r\n\tat com.sun.tools.javac.main.Arguments.init(jdk.compiler@9-internal/Arguments.java:250)\r\n\tat com.sun.tools.javac.api.JavacTool.getTask(jdk.compiler@9-internal/JavacTool.java:175)\r\n\t... 54 more\r\nCaused by: java.lang.IllegalAccessException: class org.gradle.api.internal.tasks.compile.reflect.SourcepathIgnoringInvocationHandler cannot access class com.sun.tools.javac.file.BaseFileManager (in module jdk.compiler) because module jdk.compiler does not export com.sun.tools.javac.file to unnamed module @6c75c834\r\n\tat org.gradle.api.internal.tasks.compile.reflect.SourcepathIgnoringInvocationHandler.invoke(SourcepathIgnoringInvocationHandler.java:65)\r\n\t... 60 more\r\n```\r\n\r\n---\r\n\r\nHere is Dockerfile to reproduce it on your end:\r\n\r\n```bash\r\nFROM ubuntu:16.04\r\n\r\nRUN apt-get update && \\\r\n    apt-get --assume-yes --quiet -o Dpkg::Options::=\"--force-overwrite\" install openjdk-9-jdk git && \\\r\n    java -version\r\n\r\nRUN mkdir -p /opt/projects && \\\r\n    cd /opt/projects && \\\r\n    git clone https://github.com/gradle/gradle-profiler.git gradle-profiler && \\\r\n    cd gradle-profiler && \\\r\n    git checkout 7b9ca3d93a76ee107f26534271f6f398360d4d03 && \\\r\n    ./gradlew installDist --stacktrace\r\n```\r\n\r\nJust place content above into `Dockerfile` and run \r\n\r\n```console\r\ndocker build -t gradle-profiler-test:latest .\r\n```\r\n\r\n---\r\n\r\nIt does however work with Oracle JDK 9:\r\n\r\nDockerfile\r\n```bash\r\nFROM ubuntu:16.04\r\n\r\n# Install add-apt-repository.\r\nRUN apt-get update && \\\r\n    apt-get --assume-yes --quiet install software-properties-common\r\n\r\n# Install Oracle JDK 9.\r\nRUN add-apt-repository ppa:webupd8team/java && \\\r\n    echo oracle-java9-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections && \\\r\n    apt-get update && \\\r\n    apt-get --assume-yes --quiet install oracle-java9-installer && \\\r\n    java -version\r\n\r\n# Build gradle-profiler\r\nRUN mkdir -p /opt/projects && \\\r\n    cd /opt/projects && \\\r\n    apt-get --assume-yes --quiet install git && \\\r\n    git clone https://github.com/gradle/gradle-profiler.git gradle-profiler && \\\r\n    cd gradle-profiler && \\\r\n    git checkout 7b9ca3d93a76ee107f26534271f6f398360d4d03 && \\\r\n    ./gradlew installDist --stacktrace\r\n```\r\n\r\nTest:\r\n\r\n```console\r\ndocker build -t gradle-profiler-test:latest .\r\n```"},"comment":{"url":"https://api.github.com/repos/gradle/gradle-profiler/issues/comments/388187445","html_url":"https://github.com/gradle/gradle-profiler/issues/60#issuecomment-388187445","issue_url":"https://api.github.com/repos/gradle/gradle-profiler/issues/60","id":388187445,"user":{"login":"jaypatel512","id":1309895,"avatar_url":"https://avatars0.githubusercontent.com/u/1309895?v=4","gravatar_id":"","url":"https://api.github.com/users/jaypatel512","html_url":"https://github.com/jaypatel512","followers_url":"https://api.github.com/users/jaypatel512/followers","following_url":"https://api.github.com/users/jaypatel512/following{/other_user}","gists_url":"https://api.github.com/users/jaypatel512/gists{/gist_id}","starred_url":"https://api.github.com/users/jaypatel512/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaypatel512/subscriptions","organizations_url":"https://api.github.com/users/jaypatel512/orgs","repos_url":"https://api.github.com/users/jaypatel512/repos","events_url":"https://api.github.com/users/jaypatel512/events{/privacy}","received_events_url":"https://api.github.com/users/jaypatel512/received_events","type":"User","site_admin":false},"created_at":"2018-05-10T21:11:41Z","updated_at":"2018-05-10T21:11:41Z","author_association":"NONE","body":"Curious how can I use this fix in my build.gradle ? I am on latest 4.7 version. Sorry about my limited knowledge on using gradle."}}
{"actor":{"display_login":"jaypatel512"}}