Skip to content

FAILURE: Build failed with an exception. #1580

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

Open
nkumar-mn opened this issue May 5, 2025 · 3 comments
Open

FAILURE: Build failed with an exception. #1580

nkumar-mn opened this issue May 5, 2025 · 3 comments
Labels
kotlin Kotlin SDK issues p3 Priority 3

Comments

@nkumar-mn
Copy link

I'm running into the attached issue while building kotlin (looker-kotlin-sdk) jar with jdk17. I have checked-out "https://github.com/looker-open-source/sdk-codegen" repo and set branch to master. Executed below command
./gradlew

Please find the attached files for reference and help me in resolving this issue.

daemon-2321947.out.log

@github-actions github-actions bot added p3 Priority 3 need triage labels May 5, 2025
@drstrangelooker
Copy link
Collaborator

Relevant details

FAILURE: Build failed with an exception.

* What went wrong:
Gradle could not start your build.
> Could not create service of type BuildLifecycleController using ServicesProvider.createBuildLifecycleController().
   > Could not create service of type GradleInternal using ServicesProvider.createGradleModel().
      > Could not create an instance of type org.gradle.invocation.DefaultGradle.
         > Could not configure services using GradleScopeCompileServices.configure().

* Try:
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org. 

@drstrangelooker drstrangelooker added kotlin Kotlin SDK issues and removed need triage labels May 5, 2025
@drstrangelooker
Copy link
Collaborator

Can you try with openjdk 21? That seems to be working for us.

Starting a Gradle Daemon (subsequent builds will be faster)
Path for java installation '/usr/lib/jvm/openjdk-21' (Common Linux Locations) does not contain a java executable
> Task :processResources NO-SOURCE
> Task :compileKotlin
w: file:///usr/local/google/home/drstrangelove/sdk-codegen/kotlin/src/main/com/looker/rtl/AuthSession.kt:105:53 'ok(SDKResponse): T' is deprecated. This method throws java.lang.Error, which is not recommended for use in application code. Please use SDKResponse.getOrThrow() instead.
w: file:///usr/local/google/home/drstrangelove/sdk-codegen/kotlin/src/main/com/looker/rtl/Transport.kt:154:49 'ok(SDKResponse): T' is deprecated. This method throws java.lang.Error, which is not recommended for use in application code. Please use SDKResponse.getOrThrow() instead.

> Task :compileJava NO-SOURCE
> Task :classes UP-TO-DATE
> Task :jar

BUILD SUCCESSFUL in 45s
2 actionable tasks: 2 executed

@nkumar-mn
Copy link
Author

nkumar-mn commented May 6, 2025

I know it will work with jdk21 but it should be backward compatible as well. can you please point to the branch or tag of looker-sdk on which it is compatible with jdk17?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kotlin Kotlin SDK issues p3 Priority 3
Projects
None yet
Development

No branches or pull requests

2 participants