[ https://issues.apache.org/jira/browse/CASSANDRA-15468?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17014332#comment-17014332 ]
Sam Tunnicliffe edited comment on CASSANDRA-15468 at 1/13/20 1:51 PM: ---------------------------------------------------------------------- bq. I'd like to respectfully ask that this not be resolved yet. Fair enough, I was a bit hasty in closing it. The patch looks good and absolutely improves the user experience so I've edited the title of this JIRA to reflect what it does. If you wouldn't mind opening follow up JIRAs for any work that needs to be done to support Uno-Jar or for making changes to the jar manifest, that'd be great. ||branch||CI|| |[15468-trunk|https://github.com/beobal/cassandra/tree/15468-trunk]|[circle|https://circleci.com/gh/beobal/workflows/cassandra/tree/15468-trunk]| (the few test failures are unrelated) Thanks was (Author: beobal): >I'd like to respectfully ask that this not be resolved yet. Fair enough, I was a bit hasty in closing it. The patch looks good and absolutely improves the user experience so I've edited the title of this JIRA to reflect what it does. If you wouldn't mind opening follow up JIRAs for any work that needs to be done to support Uno-Jar or for making changes to the jar manifest, that'd be great. ||branch||CI|| |[15468-trunk|https://github.com/beobal/cassandra/tree/15468-trunk]|[circle|https://circleci.com/gh/beobal/workflows/cassandra/tree/15468-trunk]| (the few test failures are unrelated) Thanks > Unable to start embedded cassandra on JDK 11 > -------------------------------------------- > > Key: CASSANDRA-15468 > URL: https://issues.apache.org/jira/browse/CASSANDRA-15468 > Project: Cassandra > Issue Type: Bug > Reporter: Gus Heck > Assignee: Gus Heck > Priority: Normal > Fix For: 4.0-alpha > > Attachments: CASSANDRA-15468.patch > > > Cassandra fails to start without the following jvm options from > jvm-11-server.options: > {code:java} > -Djdk.attach.allowAttachSelf=true > --add-exports java.base/jdk.internal.misc=ALL-UNNAMED > --add-exports java.base/jdk.internal.ref=ALL-UNNAMED > --add-exports java.base/sun.nio.ch=ALL-UNNAMED > --add-exports java.management.rmi/com.sun.jmx.remote.internal.rmi=ALL-UNNAMED > --add-exports java.rmi/sun.rmi.registry=ALL-UNNAMED > --add-exports java.rmi/sun.rmi.server=ALL-UNNAMED > --add-exports java.sql/java.sql=ALL-UNNAMED > --add-opens java.base/java.lang.module=ALL-UNNAMED > --add-opens java.base/jdk.internal.loader=ALL-UNNAMED > --add-opens java.base/jdk.internal.ref=ALL-UNNAMED > --add-opens java.base/jdk.internal.reflect=ALL-UNNAMED > --add-opens java.base/jdk.internal.math=ALL-UNNAMED > --add-opens java.base/jdk.internal.module=ALL-UNNAMED > --add-opens java.base/jdk.internal.util.jar=ALL-UNNAMED > --add-opens jdk.management/com.sun.management.internal=ALL-UNNAMED > {code} > Without these options the following stack trace appears and prevents startup > {code:java} > 2020-01-05T17:42:15,009 ERROR main > org.apache.cassandra.service.CassandraDaemon Exception encountered during > startup java.lang.ExceptionInInitializerError > at > org.apache.cassandra.config.DatabaseDescriptor.guessFileStore(DatabaseDescriptor.java:1127) > at > org.apache.cassandra.config.DatabaseDescriptor.applySimpleConfig(DatabaseDescriptor.java:541) > at > org.apache.cassandra.config.DatabaseDescriptor.applyAll(DatabaseDescriptor.java:340) > at > org.apache.cassandra.config.DatabaseDescriptor.daemonInitialization(DatabaseDescriptor.java:168) > at > org.apache.cassandra.config.DatabaseDescriptor.daemonInitialization(DatabaseDescriptor.java:152) > at > org.apache.cassandra.service.CassandraDaemon.applyConfig(CassandraDaemon.java:665) > at > org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:609) > at org.jesterj.ingest.persistence.Cassandra.start(Cassandra.java:135) > at > org.jesterj.ingest.scanners.SimpleFileScannerImplFTITest.testScanWithMemory(SimpleFileScannerImplFTITest.java:63) > at > java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.base/java.lang.reflect.Method.invoke(Method.java:566) > at > org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45) > at > org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) > at > org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42) > at > org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) > at > org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28) > at > org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30) > at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263) > at > org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68) > at > org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47) > at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231) > at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60) > at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229) > at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50) > at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222) > at org.junit.runners.ParentRunner.run(ParentRunner.java:300) > at org.junit.runner.JUnitCore.run(JUnitCore.java:157) > at > com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68) > at > com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47) > at > com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242) > at > com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70) > Caused by: java.lang.RuntimeException: java.lang.IllegalAccessException: > access to public member failed: > jdk.internal.ref.Cleaner.clean[Ljava.lang.Object;@779dfe55/invokeVirtual, > from org.apache.cassandra.io.util.FileUtils (unnamed module @2eda0940) > at org.apache.cassandra.io.util.FileUtils.<clinit>(FileUtils.java:95) > ... 33 more > Caused by: java.lang.IllegalAccessException: access to public member failed: > jdk.internal.ref.Cleaner.clean[Ljava.lang.Object;@779dfe55/invokeVirtual, > from org.apache.cassandra.io.util.FileUtils (unnamed module @2eda0940) > at > java.base/java.lang.invoke.MemberName.makeAccessException(MemberName.java:942) > at > java.base/java.lang.invoke.MethodHandles$Lookup.checkAccess(MethodHandles.java:2206) > at > java.base/java.lang.invoke.MethodHandles$Lookup.checkMethod(MethodHandles.java:2146) > at > java.base/java.lang.invoke.MethodHandles$Lookup.getDirectMethodCommon(MethodHandles.java:2290) > at > java.base/java.lang.invoke.MethodHandles$Lookup.getDirectMethodNoSecurityManager(MethodHandles.java:2283) > at > java.base/java.lang.invoke.MethodHandles$Lookup.unreflect(MethodHandles.java:1747) > at org.apache.cassandra.io.util.FileUtils.<clinit>(FileUtils.java:86) > ... 33 more > {code} > Use of --add-exports is described in the oracle documentation as > {quote}You may use the --add-exports option as a temporary workaround to > compile source code with references to JDK internal classes. > {quote} > which implies that this will not work forever. Also the code in FileUtils > seems somewhat confused as it prints out a warning, as if it means to allow > startup with a lower performance expectation, and then throws an exception > that entirely prevents startup. -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org