Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gradle Build Fails #9567

Closed
bensiegler opened this issue Apr 7, 2021 · 5 comments
Closed

Gradle Build Fails #9567

bensiegler opened this issue Apr 7, 2021 · 5 comments
Assignees
Labels
status: feedback-provided Feedback has been provided status: invalid An issue that we don't feel is valid type: bug A general bug

Comments

@bensiegler
Copy link

When attempting to build the gradle project in Intelij, the build fails as JavadocApiPluginITest.groovy throws an exception at line 44. I thought maybe it was a local change I made by accident, but I cloned the project from this repo into a completely new file and the build still failed.

I'll include the gradle output below:

22:14:34: Executing task 'build'...

Task :buildSrc:checkApolloVersions UP-TO-DATE
Task :buildSrc:generateMainServiceApolloSources UP-TO-DATE
Task :buildSrc:checkMainServiceApolloDuplicates UP-TO-DATE
Task :buildSrc:generateTestServiceApolloSources NO-SOURCE
Task :buildSrc:checkTestServiceApolloDuplicates UP-TO-DATE
Task :buildSrc:compileJava UP-TO-DATE
Task :buildSrc:compileGroovy UP-TO-DATE
Task :buildSrc:pluginDescriptors UP-TO-DATE
Task :buildSrc:processResources UP-TO-DATE
Task :buildSrc:classes UP-TO-DATE
Task :buildSrc:jar UP-TO-DATE
Task :buildSrc:assemble UP-TO-DATE
Task :buildSrc:pluginUnderTestMetadata UP-TO-DATE
Task :buildSrc:compileTestJava UP-TO-DATE
Task :buildSrc:compileTestGroovy UP-TO-DATE
Task :buildSrc:processTestResources UP-TO-DATE
Task :buildSrc:testClasses UP-TO-DATE

Task :buildSrc:test
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.codehaus.groovy.reflection.CachedClass (file:/Users/bensiegler/.gradle/wrapper/dists/gradle-6.8.3-bin/7ykxq50lst7lb7wx1nijpicxn/gradle-6.8.3/lib/groovy-all-1.3-2.5.12.jar) to method java.lang.Object.finalize()
WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.reflection.CachedClass
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

io.spring.gradle.convention.JavadocApiPluginITest > multimodule api FAILED
org.spockframework.runtime.ConditionFailedWithExceptionError at JavadocApiPluginITest.groovy:44
Caused by: java.io.FileNotFoundException at JavadocApiPluginITest.groovy:44

io.spring.gradle.convention.JacocoPluginITest > check with java plugin FAILED
org.gradle.testkit.runner.UnexpectedBuildFailure at JacocoPluginITest.groovy:30

io.spring.gradle.convention.ShowcaseITest > build FAILED
org.gradle.testkit.runner.UnexpectedBuildFailure at ShowcaseITest.groovy:31

47 tests completed, 3 failed

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':buildSrc:test'.

There were failing tests. See the report at: ........

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 54s

Task :buildSrc:test FAILED

A build scan was not published as you have not authenticated with server 'ge.spring.io'.
22:15:29: Task execution finished 'build'.

@bensiegler bensiegler added status: waiting-for-triage An issue we've not yet triaged type: bug A general bug labels Apr 7, 2021
@jzheaux
Copy link
Contributor

jzheaux commented May 3, 2021

@bensiegler are you still seeing build failures? If so, what are your OS and JDK version so I can try to reproduce?

@jzheaux jzheaux self-assigned this May 3, 2021
@jzheaux jzheaux added status: waiting-for-feedback We need additional information before we can continue and removed status: waiting-for-triage An issue we've not yet triaged labels May 3, 2021
@spring-projects-issues
Copy link

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

@spring-projects-issues spring-projects-issues added the status: feedback-reminder We've sent a reminder that we need additional information before we can continue label May 10, 2021
@tt4g
Copy link
Contributor

tt4g commented May 15, 2021

I am encountering this problem when running Gradle task in Intellij IDEA.

OS: Windows 10

$ ver

Microsoft Windows [Version 10.0.19042.985]

JDK: AdoptOpenJDK-11.0.11+9

$ <OATH_TO_JAVA>\java.exe -version
openjdk version "11.0.11" 2021-04-20
OpenJDK Runtime Environment AdoptOpenJDK-11.0.11+9 (build 11.0.11+9)
OpenJDK 64-Bit Server VM AdoptOpenJDK-11.0.11+9 (build 11.0.11+9, mixed mode)
Gradle outputs
> Task :buildSrc:test
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.codehaus.groovy.reflection.CachedClass (file:/<OMIT>/.gradle/wrapper/dists/gradle-6.9-bin/2ecsmyp3bolyybemj56vfn4mt/gradle-6.9/lib/groovy-all-1.3-2.5.12.jar) to method java.lang.Object.finalize()
WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.reflection.CachedClass
An illegal reflective access operation has occurred

WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
Illegal reflective access by org.codehaus.groovy.reflection.CachedClass (file:/<OMIT>/.gradle/wrapper/dists/gradle-6.9-bin/2ecsmyp3bolyybemj56vfn4mt/gradle-6.9/lib/groovy-all-1.3-2.5.12.jar) to method java.lang.Object.finalize()

Please consider reporting this to the maintainers of org.codehaus.groovy.reflection.CachedClass

WARNING: All illegal access operations will be denied in a future release
Use --illegal-access=warn to enable warnings of further illegal reflective access operations

All illegal access operations will be denied in a future release


io.spring.gradle.convention.JavadocApiPluginITest > multimodule api FAILED
    org.spockframework.runtime.ConditionFailedWithExceptionError at JavadocApiPluginITest.groovy:44
        Caused by: java.io.FileNotFoundException at JavadocApiPluginITest.groovy:44
        Caused by: java.io.FileNotFoundException at JavadocApiPluginITest.groovy:44


63 tests completed, 1 failed

> Task :buildSrc:test FAILED

Execution failed for task ':buildSrc:test'.
> There were failing tests. See the report at: file:///<OMIT>/workspace/github/tt4g/spring-security/buildSrc/build/reports/tests/test/index.html

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

My machine has multiple JDKs installed, and when the problem occurred, the JAVA_HOME showed the path to AdoptOpenJDK 16.
After changing JAVA_HOME to AdoptOpenJDK 11, this problem no longer occurs.

@spring-projects-issues spring-projects-issues added status: feedback-provided Feedback has been provided and removed status: waiting-for-feedback We need additional information before we can continue status: feedback-reminder We've sent a reminder that we need additional information before we can continue labels May 15, 2021
@jzheaux
Copy link
Contributor

jzheaux commented May 18, 2021

@tt4g, Gradle 7 adds support for JDK 16, so we can look at building against 16 once #9615 is complete.

In the absence of other reports, I'm going to close this issue.

@jzheaux jzheaux closed this as completed May 18, 2021
@jzheaux jzheaux added the status: invalid An issue that we don't feel is valid label May 18, 2021
@lmagyar89
Copy link
Contributor

On my side it was because in the "IDEA built in JDK" path has space character, that's why processbuilder thrown an exception.
Solution was: download the required JDK, put it some path without space character, use this JDK as Gradle JVM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: feedback-provided Feedback has been provided status: invalid An issue that we don't feel is valid type: bug A general bug
Projects
None yet
Development

No branches or pull requests

5 participants