You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by "a-mroz (via GitHub)" <gi...@apache.org> on 2023/11/14 08:21:24 UTC
[I] Cannot install statsd-emitter when using Java 17 (druid)
a-mroz opened a new issue, #15369:
URL: https://github.com/apache/druid/issues/15369
### Affected Version
27.0.0.
### Description
I cannot install statsd-emitter extension when using Druid 27.0.0 with Java 17 (I tried with Zulu-17.46.19 and OpenJDK-17.0.2). The same command works with Java 11.
```bash
apache-druid-27.0.0 % java -cp "lib/*" -Ddruid.extensions.directory="extensions" -Ddruid.extensions.hadoopDependenciesDir="hadoop-dependencies" org.apache.druid.cli.Main tools pull-deps --no-default-hadoop -c "org.apache.druid.extensions.contrib:statsd-emitter:27.0.0"
Exception in thread "main" java.lang.ExceptionInInitializerError
at com.google.inject.internal.cglib.reflect.$FastClass$Generator.getProtectionDomain(FastClass.java:73)
at com.google.inject.internal.cglib.core.$AbstractClassGenerator.create(AbstractClassGenerator.java:206)
at com.google.inject.internal.cglib.reflect.$FastClass$Generator.create(FastClass.java:65)
at com.google.inject.internal.BytecodeGen.newFastClassForMember(BytecodeGen.java:252)
at com.google.inject.internal.BytecodeGen.newFastClassForMember(BytecodeGen.java:203)
at com.google.inject.internal.ProviderMethod.create(ProviderMethod.java:69)
at com.google.inject.internal.ProviderMethodsModule.createProviderMethod(ProviderMethodsModule.java:275)
at com.google.inject.internal.ProviderMethodsModule.getProviderMethods(ProviderMethodsModule.java:144)
at com.google.inject.internal.ProviderMethodsModule.configure(ProviderMethodsModule.java:123)
at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:340)
at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:349)
at com.google.inject.spi.Elements.getElements(Elements.java:110)
at com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:138)
at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:104)
at com.google.inject.Guice.createInjector(Guice.java:99)
at com.google.inject.Guice.createInjector(Guice.java:73)
at org.apache.druid.guice.BaseInjectorBuilder.build(BaseInjectorBuilder.java:66)
at org.apache.druid.cli.Main.main(Main.java:96)
Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) throws java.lang.ClassFormatError accessible: module java.base does not "opens java.lang" to unnamed module @4dca0ecd
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
at java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:199)
at java.base/java.lang.reflect.Method.setAccessible(Method.java:193)
at com.google.inject.internal.cglib.core.$ReflectUtils$1.run(ReflectUtils.java:52)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:318)
at com.google.inject.internal.cglib.core.$ReflectUtils.<clinit>(ReflectUtils.java:42)
... 18 more
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
Re: [I] Cannot install statsd-emitter when using Java 17 (druid)
Posted by "abhishekagarwal87 (via GitHub)" <gi...@apache.org>.
abhishekagarwal87 closed issue #15369: Cannot install statsd-emitter when using Java 17
URL: https://github.com/apache/druid/issues/15369
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
Re: [I] Cannot install statsd-emitter when using Java 17 (druid)
Posted by "rafitadiaz (via GitHub)" <gi...@apache.org>.
rafitadiaz commented on issue #15369:
URL: https://github.com/apache/druid/issues/15369#issuecomment-2468414228
Actually you don't need to set the flags if you use the wrapper, according to this: https://github.com/apache/druid/blob/master/docs/operations/java.md#strong-encapsulation
Instead using `/binjava` you should use `/opt/druid/bin/run-java`.
> Druid's bundled bin/run-java script automatically adds the proper flags.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
Re: [I] Cannot install statsd-emitter when using Java 17 (druid)
Posted by "a-mroz (via GitHub)" <gi...@apache.org>.
a-mroz commented on issue #15369:
URL: https://github.com/apache/druid/issues/15369#issuecomment-1809765042
The flags that seem to be needed for this extension:
```bash
--add-opens=java.base/java.lang=ALL-UNNAMED \
--add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
Re: [I] Cannot install statsd-emitter when using Java 17 (druid)
Posted by "SHA65536 (via GitHub)" <gi...@apache.org>.
SHA65536 commented on issue #15369:
URL: https://github.com/apache/druid/issues/15369#issuecomment-1866173452
How do I know which flags are needed for an extension?
I need to kafka-emitter and prometheus-emitter extensions, getting same error...
I added all these flags:
```
--add-exports=java.base/jdk.internal.ref=ALL-UNNAMED
--add-exports=java.base/jdk.internal.misc=ALL-UNNAMED
--add-opens=java.base/java.lang=ALL-UNNAMED
--add-opens=java.base/java.io=ALL-UNNAMED
--add-opens=java.base/java.nio=ALL-UNNAMED
--add-opens=java.base/jdk.internal.ref=ALL-UNNAMED
--add-opens=java.base/sun.nio.ch=ALL-UNNAMED
--add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
Re: [I] Cannot install statsd-emitter when using Java 17 (druid)
Posted by "abhishekagarwal87 (via GitHub)" <gi...@apache.org>.
abhishekagarwal87 commented on issue #15369:
URL: https://github.com/apache/druid/issues/15369#issuecomment-1809745653
https://github.com/apache/druid/blob/master/docs/operations/java.md#strong-encapsulation - You can add the flags that are suggested in the linked doc. You may not need all of them and can try adding them one by one as required.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org