Access Control Exception - openjdk 9

I am trying to install Elasticsearch on a new install of Ubuntu 16.04 with openjdk 9 installed. I have installed the newest version of Elasticsearch from the deb available on the website. Installed with sudo dpkg -i ....

When I try to run Elasticsearch I get the following stacktrace, I have looked up the error but have not been able to come up with a solution.

[2016-12-05T14:53:21,253][INFO ][o.e.n.Node               ] [] initializing ...
[2016-12-05T14:53:21,482][INFO ][o.e.e.NodeEnvironment    ] [eF8zE82] using [1] data paths, mounts [[/ (/dev/sda1)]], net usable_space [17.3gb], net total_space [22.5gb], spins? [possibly], types [ext4]
[2016-12-05T14:53:21,483][INFO ][o.e.e.NodeEnvironment    ] [eF8zE82] heap size [1.9gb], compressed ordinary object pointers [true]
[2016-12-05T14:53:21,485][INFO ][o.e.n.Node               ] [eF8zE82] node name [eF8zE82] derived from node ID; set [node.name] to override
[2016-12-05T14:53:21,489][INFO ][o.e.n.Node               ] [eF8zE82] version[5.0.2], pid[23628], build[f6b4951/2016-11-24T10:07:18.101Z], OS[Linux/4.4.0-31-generic/amd64], JVM[Oracle Corporation/OpenJDK 64-Bit Server VM/9-internal/9-internal+0-2016-04-14-195246.buildd.src]
[2016-12-05T14:53:24,954][INFO ][o.e.p.PluginsService     ] [eF8zE82] loaded module [aggs-matrix-stats]
[2016-12-05T14:53:24,954][INFO ][o.e.p.PluginsService     ] [eF8zE82] loaded module [ingest-common]
[2016-12-05T14:53:24,955][INFO ][o.e.p.PluginsService     ] [eF8zE82] loaded module [lang-expression]
[2016-12-05T14:53:24,955][INFO ][o.e.p.PluginsService     ] [eF8zE82] loaded module [lang-groovy]
[2016-12-05T14:53:24,955][INFO ][o.e.p.PluginsService     ] [eF8zE82] loaded module [lang-mustache]
[2016-12-05T14:53:24,955][INFO ][o.e.p.PluginsService     ] [eF8zE82] loaded module [lang-painless]
[2016-12-05T14:53:24,955][INFO ][o.e.p.PluginsService     ] [eF8zE82] loaded module [percolator]
[2016-12-05T14:53:24,956][INFO ][o.e.p.PluginsService     ] [eF8zE82] loaded module [reindex]
[2016-12-05T14:53:24,956][INFO ][o.e.p.PluginsService     ] [eF8zE82] loaded module [transport-netty3]
[2016-12-05T14:53:24,956][INFO ][o.e.p.PluginsService     ] [eF8zE82] loaded module [transport-netty4]
[2016-12-05T14:53:24,956][INFO ][o.e.p.PluginsService     ] [eF8zE82] no plugins loaded

further stack trace

[2016-12-05T14:53:26,090][ERROR][o.e.b.ElasticsearchUncaughtExceptionHandler] [] fatal error in thread [main], exiting
java.lang.ExceptionInInitializerError
        at org.apache.lucene.analysis.miscellaneous.StemmerOverrideFilter$Builder.build(StemmerOverrideFilter.java:205) ~[lucene-analyzers-common-6.2.1.jar:6.2.1 43ab70147eb494324a1410f7a9f16a896a59bc6f - shalin - 2016-09-15 05:15:51]
        at org.apache.lucene.analysis.nl.DutchAnalyzer.<init>(DutchAnalyzer.java:133) ~[lucene-analyzers-common-6.2.1.jar:6.2.1 43ab70147eb494324a1410f7a9f16a896a59bc6f - shalin - 2016-09-15 05:15:51]
        at org.apache.lucene.analysis.nl.DutchAnalyzer.<init>(DutchAnalyzer.java:106) ~[lucene-analyzers-common-6.2.1.jar:6.2.1 43ab70147eb494324a1410f7a9f16a896a59bc6f - shalin - 2016-09-15 05:15:51]
        at org.elasticsearch.indices.analysis.PreBuiltAnalyzers$20.create(PreBuiltAnalyzers.java:246) ~[elasticsearch-5.0.2.jar:5.0.2]
        at org.elasticsearch.indices.analysis.PreBuiltAnalyzers.getAnalyzer(PreBuiltAnalyzers.java:487) ~[elasticsearch-5.0.2.jar:5.0.2]
        at org.elasticsearch.index.analysis.AnalysisRegistry$PrebuiltAnalysis.<init>(AnalysisRegistry.java:335) ~[elasticsearch-5.0.2.jar:5.0.2]
        at org.elasticsearch.index.analysis.AnalysisRegistry$PrebuiltAnalysis.<init>(AnalysisRegistry.java:320) ~[elasticsearch-5.0.2.jar:5.0.2]
        at org.elasticsearch.index.analysis.AnalysisRegistry.<init>(AnalysisRegistry.java:55) ~[elasticsearch-5.0.2.jar:5.0.2]
        at org.elasticsearch.indices.analysis.AnalysisModule.<init>(AnalysisModule.java:175) ~[elasticsearch-5.0.2.jar:5.0.2]
        at org.elasticsearch.node.Node.<init>(Node.java:304) ~[elasticsearch-5.0.2.jar:5.0.2]
        at org.elasticsearch.node.Node.<init>(Node.java:217) ~[elasticsearch-5.0.2.jar:5.0.2]
        at org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:196) ~[elasticsearch-5.0.2.jar:5.0.2]
        at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:196) ~[elasticsearch-5.0.2.jar:5.0.2]
        at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:291) ~[elasticsearch-5.0.2.jar:5.0.2]
        at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:121) ~[elasticsearch-5.0.2.jar:5.0.2]
        at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:112) ~[elasticsearch-5.0.2.jar:5.0.2]
        at org.elasticsearch.cli.SettingCommand.execute(SettingCommand.java:54) ~[elasticsearch-5.0.2.jar:5.0.2]
        at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:96) ~[elasticsearch-5.0.2.jar:5.0.2]
        at org.elasticsearch.cli.Command.main(Command.java:62) ~[elasticsearch-5.0.2.jar:5.0.2]
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:89) ~[elasticsearch-5.0.2.jar:5.0.2]
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:82) ~[elasticsearch-5.0.2.jar:5.0.2]
Caused by: java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "accessDeclaredMembers")
        at java.security.AccessControlContext.checkPermission(java.base@9-internal/AccessControlContext.java:468) ~[?:?]
        at java.security.AccessController.checkPermission(java.base@9-internal/AccessController.java:894) ~[?:?]
        at java.lang.SecurityManager.checkPermission(java.base@9-internal/SecurityManager.java:541) ~[?:?]
        at java.lang.Class.checkMemberAccess(java.base@9-internal/Class.java:2584) ~[?:?]
        at java.lang.Class.getDeclaredFields(java.base@9-internal/Class.java:2092) ~[?:?]
        at org.apache.lucene.util.RamUsageEstimator$1.run(RamUsageEstimator.java:339) ~[lucene-core-6.2.1.jar:6.2.1 43ab70147eb494324a1410f7a9f16a896a59bc6f - shalin - 2016-09-15 05:15:20]
        at org.apache.lucene.util.RamUsageEstimator$1.run(RamUsageEstimator.java:336) ~[lucene-core-6.2.1.jar:6.2.1 43ab70147eb494324a1410f7a9f16a896a59bc6f - shalin - 2016-09-15 05:15:20]
        at java.security.AccessController.doPrivileged(java.base@9-internal/Native Method) ~[?:?]
        at org.apache.lucene.util.RamUsageEstimator.shallowSizeOfInstance(RamUsageEstimator.java:336) ~[lucene-core-6.2.1.jar:6.2.1 43ab70147eb494324a1410f7a9f16a896a59bc6f - shalin - 2016-09-15 05:15:20]
        at org.apache.lucene.util.RamUsageEstimator.shallowSizeOf(RamUsageEstimator.java:313) ~[lucene-core-6.2.1.jar:6.2.1 43ab70147eb494324a1410f7a9f16a896a59bc6f - shalin - 2016-09-15 05:15:20]
        at org.apache.lucene.util.fst.ByteSequenceOutputs.<clinit>(ByteSequenceOutputs.java:154) ~[lucene-core-6.2.1.jar:6.2.1 43ab70147eb494324a1410f7a9f16a896a59bc6f - shalin - 2016-09-15 05:15:20]
        ... 21 more

Hey,

JDK9 is still in development and cannot be considered stable. Elasticsearch needs java 8 in order to be stable. We are testing our daily builds with JDK9 already, but it's not supported for ES5.

--Alex

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.