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

bcprov-jdk18on:1.78.1, bcpkix-jdk18on:1.78.1 causing build failure #1908

Open
swaruparameshpajju opened this issue Nov 13, 2024 · 8 comments
Labels
question Further information is requested

Comments

@swaruparameshpajju
Copy link

[root@25ed8f435384 pkix]# export JAVA_HOME=/opt/jdk-17.0.8
[root@25ed8f435384 pkix]# export PATH=$JAVA_HOME/bin:$PATH
[root@25ed8f435384 pkix]# gradle jar
Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details

Configure project :
Environment setup:
Looking for JDK ENV 'BC_JDK8' found null

FAILURE: Build failed with an exception.

  • Where:
    Build file '/root/bc-java/build.gradle' line: 21

  • What went wrong:
    A problem occurred evaluating root project 'bc-java'.

Looking for JDK ENV 'BC_JDK8' but found null, see README 'Environmental variables'

  • 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 3s

@vanitasvitae
Copy link
Contributor

Looking for JDK ENV 'BC_JDK8' but found null, see README 'Environmental variables'

So did you look at the README? :D
You need to either use Java 21, or install JDK 8, 11 and 17 and point the BC_JDK8, BC_JDK11, BC_JDK17 environment variables to those installations.

@swaruparameshpajju
Copy link
Author

Environment setup:
[10 02:41:13.804] | Looking for JDK ENV 'BC_JDK8' found /path/to/java8
[10 02:41:13.804] | Looking for JDK ENV 'BC_JDK11' found /path/to/java11
[10 02:41:13.805] | Looking for JDK ENV 'BC_JDK17' found /path/to/java17
[10 02:41:13.805] | Looking for JDK ENV 'BC_JDK21' found /path/to/java21
[10 02:41:14.590] |
[10 02:41:14.590] | FAILURE: Build failed with an exception.
[10 02:41:14.590] |
[10 02:41:14.590] | * What went wrong:
[10 02:41:14.590] | Could not determine the dependencies of task ':jmail:compileJava'.
[10 02:41:14.591] | > Failed to query the value of extension 'errorprone' property 'enabled'.
[10 02:41:14.591] | > Failed to calculate the value of task ':jmail:compileJava' property 'javaCompiler'.
[10 02:41:14.591] | > No matching toolchains found for requested specification: {languageVersion=17, vendor=any, implementation=vendor-specific} for LINUX on x86_64.
[10 02:41:14.591] | > No locally installed toolchains match and toolchain auto-provisioning is not enabled.
[10 02:41:14.592] |
[10 02:41:14.592] | * Try:
[10 02:41:14.592] | > Learn more about toolchain auto-detection at https://docs.gradle.org/8.2.1/userguide/toolchains.html#sec:auto_detection.
[10 02:41:14.592] | > Run with --info or --debug option to get more log output.
[10 02:41:14.592] | > Run with --scan to get full insights.
[10 02:41:14.592] | > Get more help at https://help.gradle.org.
[10 02:41:14.592] |
[10 02:41:14.593] | * Exception is:
[10 02:41:14.593] | org.gradle.api.internal.tasks.TaskDependencyResolveException: Could not determine the dependencies of task ':jmail:compileJava'.
[10 02:41:14.593] | at org.gradle.api.internal.tasks.CachingTaskDependencyResolveContext.getDependencies(CachingTaskDependencyResolveContext.java:68)
[10 02:41:14.593] | at org.gradle.execution.plan.TaskDependencyResolver.resolveDependenciesFor(TaskDependencyResolver.java:49)
[10 02:41:14.593] | at org.gradle.execution.plan.LocalTaskNode.getDependencies(LocalTaskNode.java:148)
[10 02:41:14.593] | at org.gradle.execution.plan.LocalTaskNode.resolveDependencies(LocalTaskNode.java:122)
[10 02:41:14.593] | at org.gradle.execution.plan.DefaultExecutionPlan.discoverNodeRelationships(DefaultExecutionPlan.java:184)
[10 02:41:14.593] | at org.gradle.execution.plan.DefaultExecutionPlan.doAddEntryNodes(DefaultExecutionPlan.java:156)
[10 02:41:14.593] | at org.gradle.execution.plan.DefaultExecutionPlan.addEntryTasks(DefaultExecutionPlan.java:131)
[10 02:41:14.593] | at org.gradle.execution.plan.DefaultExecutionPlan.addEntryTasks(DefaultExecutionPlan.java:123)

@vanitasvitae
Copy link
Contributor

You need to either use Java 21, or install JDK 8, 11 and 17 and point the BC_JDK8, BC_JDK11, BC_JDK17 environment variables to those installations.

@swaruparameshpajju
Copy link
Author

Environment setup:
[11 05:06:07.155] | Looking for JDK ENV 'BC_JDK8' found /opt/java8
[11 05:06:07.155] | Looking for JDK ENV 'BC_JDK11' found /opt/java11
[11 05:06:07.156] | Looking for JDK ENV 'BC_JDK17' found /opt/java17
[11 05:06:07.156] | Looking for JDK ENV 'BC_JDK21' found /opt/java21
these are already found in the path '/opt/java8' for BC_JDK8. please help me if i miss any thing

@swaruparameshpajju
Copy link
Author

[root@f6733bc42dec bc-java]# gradle :pkix:build -x test

Configure project :
Environment setup:
Looking for JDK ENV 'BC_JDK8' found /opt/jdk-17
Looking for JDK ENV 'BC_JDK11' found /opt/jdk-11.0.20
Looking for JDK ENV 'BC_JDK17' found /opt/jdk-17
Looking for JDK ENV 'BC_JDK21' found /opt/jdk-21.0.2
FAILURE: Build failed with an exception.

  • What went wrong:
    java.lang.UnsupportedClassVersionError: aQute/bnd/gradle/BndBuilderPlugin has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 52.0

aQute/bnd/gradle/BndBuilderPlugin has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 52.0

  • 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/.
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
For more on this, please refer to https://docs.gradle.org/8.2.1/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
BUILD FAILED in 640ms
1:04
[root@f6733bc42dec bc-java]# export BC_JDK17=/opt/jdk-17
[root@f6733bc42dec bc-java]# export BC_JDK11=/opt/jdk-11.0.20
[root@f6733bc42dec bc-java]# export BC_JDK21=/opt/jdk-21.0.2

these jdk i had downloaded and exported

[root@f6733bc42dec opt]# ls /opt
apache-ant-1.10.14 apache-maven-3.3.1 apache-maven-3.9.4 gradle-6.9 java jdk-17 jdk-22.0.1 node-v16.20.2-linux-x64 python3.9
apache-ant-1.9.16 apache-maven-3.5.2 go1.22.0 gradle-7.3.3 jdk-11.0.20 jdk-17.0.8 jdk-9.0.4 node-v20.10.0-linux-x64 sbt
apache-maven-3.2.5 apache-maven-3.6.1 gradle-4.9 gradle-8.2.1 jdk-11.0.20.1+1 jdk-17_linux-x64_bin.tar.gz jdk8u382-b05 python3.12

@vanitasvitae
Copy link
Contributor

Are you using gradle 8.8?

@swaruparameshpajju
Copy link
Author

ENV | VALUE |
|----------------------+---------------------------------------------------------------------------------------------|
| PACKAGE | org.bouncycastle:bcpkix-jdk18on:1.78.1 |
| LANGUAGE | java |
| FRAMEWORK | gradle |
| BUILD_CMD | gradle :pkix:build -x test |
| OS_NAME | Oracle Linux Server |
| OS_VERSION | 8.8 |
| COMPILER/INTERPRETER | javac |
| PYTHON_VERSION | 3.12.4 |
| JAVA_VERSION | 17 |
| MAVEN_VERSION | 3.9.4 |
| GRADLE_VERSION | 8.2.1 |
| ANT_VERSION | 1.10.14 |
| NODE_VERSION | 16.20.2 |
| CPP_VERSION | 8.5.0 |
| GO_VERSION | go1.22.0 |
| CARGO_VERSION | 1.75.0 |
| HTTP_PROXY | www-proxy.us.oracle.com |
| HTTPS_PROXY | www-proxy.us.oracle.com |
| JAVA_HOME | /tmp/jdk_storage/java/17

@vanitasvitae
Copy link
Contributor

You need at least gradle 8.8. afaik.

@winfriedgerlach winfriedgerlach added the question Further information is requested label Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants