Open dolonnen opened 2 years ago
Please note: The reflective access operation is deprecaded and will cause an error in Java 17. https://openjdk.org/jeps/403#Description
@dolonnen yeah this is a known issue and nothing this project specifically does but more the underlying jclouds library. I've seen this being talked about with them in the past but not sure if anything ever came of it and never circled back around to check in on things.
@cdancy thanks for the information. I will continue to follow the matter.
Is there any news on this? It blocks the upgrade to JDK 17...
@dokaspar nothing from my end and with jclouds development slowing down over the past couple years I doubt it will be patched within their code base. Are you actually getting an exception in your case or just a warning?
Expected Behavior
get a BitbucketClient (whitout Warnings about denies in the future)
Current Behavior
with explicit guava 27.1-jre as dependency in pom.xml:
Making a BB-Client... WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/C:/Users/xce35i5/.m2/repository/com/google/inject/guice/4.2.3/guice-4.2.3.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1 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 Version{version=7.19.3, buildNumber=7019003, buildDate=1641876828571, displayName=Bitbucket}
without guava 27.1-jre as dependency in pom.xml (guava 18.0 is using):
Exception in thread "main" java.lang.NoSuchMethodError: 'void com.google.common.base.Preconditions.checkArgument(boolean, java.lang.String, java.lang.Object, java.lang.Object)' at com.google.inject.TypeLiteral.getSupertype(TypeLiteral.java:238) at com.google.inject.spi.InjectionPoint.hierarchyFor(InjectionPoint.java:805) at com.google.inject.spi.InjectionPoint.getInjectionPoints(InjectionPoint.java:649) at com.google.inject.spi.InjectionPoint.forInstanceMethodsAndFields(InjectionPoint.java:376) at com.google.inject.spi.InjectionPoint.forInstanceMethodsAndFields(InjectionPoint.java:395) at com.google.inject.internal.BindingBuilder.toProvider(BindingBuilder.java:118) at com.google.inject.internal.BindingBuilder.toProvider(BindingBuilder.java:107) at com.google.inject.internal.BindingBuilder.toProvider(BindingBuilder.java:42) at com.cdancy.bitbucket.rest.config.BitbucketAuthenticationModule.configure(BitbucketAuthenticationModule.java:37) at com.google.inject.AbstractModule.configure(AbstractModule.java:61) at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:347) at com.google.inject.spi.Elements.getElements(Elements.java:104) at com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:137) at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:105) at com.google.inject.Guice.createInjector(Guice.java:87) at org.jclouds.ContextBuilder.buildInjector(ContextBuilder.java:405) at org.jclouds.ContextBuilder.buildInjector(ContextBuilder.java:328) at org.jclouds.ContextBuilder.buildApi(ContextBuilder.java:651) at org.jclouds.ContextBuilder.buildApi(ContextBuilder.java:643) at com.cdancy.bitbucket.rest.BitbucketClient.createApi(BitbucketClient.java:87) at com.cdancy.bitbucket.rest.BitbucketClient.<init>(BitbucketClient.java:71) at com.cdancy.bitbucket.rest.BitbucketClient$Builder.build(BitbucketClient.java:222) at de.test.test.bb_rest_test.App.main(App.java:18)
Context
Steps to Reproduce (for bugs)
I have tested this with a new generated minimal maven project. Only the App.java and the pom.xml are different from that.
Your Environment
pom-xml.txt App-java.txt