oracle / oci-java-sdk

Oracle Cloud Infrastructure SDK for Java
https://cloud.oracle.com/cloud-infrastructure
Other
201 stars 156 forks source link

Errors suddenly appear after updating to JDK versions: 8u381, 11.0.20, 17.0.8, or 21.0.0 #560

Open joshunter opened 11 months ago

joshunter commented 11 months ago

The following error message or similar might be encountered:

java.lang.ClassNotFoundException: com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider

This issue is a result of the listed Java versions, which have a default maximum signature file size smaller than some Java SDK JARs.

To resolve this problem, you can run Maven with the following parameter: -Djdk.jar.maxSignatureFileSize=16000000

If you're compiling with javac, you can use the following command: javac -J-Djdk.jar.maxSignatureFileSize=16000000 example.java

The low default value in Java will be addressed and resolved in upcoming minor Java version releases.