ROR 1.65.1 + Java -17

ROR Version: 1.65.1

Kibana Version: 8.18.3

Elasticsearch Version: 8.18.3

Steps to reproduce the issue
file:
/etc/sysconfig/elasticsearch
ES_JAVA_HOME=/usr/lib/jvm/java-17-openjdk

Expected result:

Plugins do not work on java version 17

java.lang.UnsupportedClassVersionError: org/elasticsearch/entitlement/runtime/policy/PolicyParser has been compiled by a more recent version of the Java Runtime (class file version 66.0), this version of the Java Runtime only recognizes class file versions up to 61.0

**
Actual Result**:
Elasticsearch should start.

{“customer_id”: “6c4a385b-2ae8-4f02-a9cd-ef24addfb5b3”, “subscription_id”: “32d4073f-dc2f-4056-a868-842727c637cd”}

Maybe I’m patching the plugin incorrectly?

I see that the Docker image of Elasticsearch 8.18.3 is bundled with Java 24.
Are you able to check this Java version?

$ docker run -ti -u root -p 9202:9200 -e “discovery.type=single-node” -e “ES_JAVA_OPTS=-Xms512m -Xmx512m” ``docker.elastic.co/elasticsearch/elasticsearch:8.18.3`` 

bashroot@ab269cc6cb4b:/usr/share/elasticsearch# jdk/bin/java -version
openjdk version “24” 2025-03-18
OpenJDK Runtime Environment (build 24+36-3646)
OpenJDK 64-Bit Server VM (build 24+36-3646, mixed mode, sharing)

We use our own version of java 17.
We are not ready to switch to version 24 yet.

Ok, got it.
Could you please show me the whole exception stack?

Elasticsearch 8.18.3 works fine without plugin.

only java java-17-openjdk-17.0.15.0.6
Running multiple nodes on one server.

Or do you need java parameters specifically?
If so, it would be better if you tell me the output of which commands you need.

there should be more context around this error:
```
java.lang.UnsupportedClassVersionError: org/elasticsearch/entitlement/runtime/policy/PolicyParser has been compiled by a more recent version of the Java Runtime (class file version 66.0), this version of the Java Runtime only recognizes class file versions up to 61.0
```
I want to see it.
I guess it was a patching step, not the Elasticsearch runtime?

If it’s difficult for you to gather the context now, I will try to reproduce it on my end, obviously.

This?

[2025-08-29T11:04:05,302][ERROR][o.e.b.Elasticsearch      ] [host-client]fatal exception while booting Elasticsearch
java.lang.UnsupportedClassVersionError: org/elasticsearch/entitlement/runtime/policy/PolicyParser has been compiled by a more recent version of the Java Runtime (class file version 66.0), this version of the Java Runtime only recognizes class file versions up to 61.0
	at java.lang.ClassLoader.defineClass1(Native Method) ~[?:?]
	at java.lang.ClassLoader.defineClass(ClassLoader.java:1017) ~[?:?]
	at java.lang.ClassLoader.defineClass(ClassLoader.java:1095) ~[?:?]
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:182) ~[?:?]
	at jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:821) ~[?:?]
	at jdk.internal.loader.BuiltinClassLoader.findClassInModuleOrNull(BuiltinClassLoader.java:741) ~[?:?]
	at jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:665) ~[?:?]
	at jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:639) ~[?:?]
	at jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188) ~[?:?]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:525) ~[?:?]
	at org.elasticsearch.entitlement.runtime.policy.PolicyUtils.parsePolicyIfExists(PolicyUtils.java:146) ~[elasticsearch-entitlement-8.18.3.jar:?]
	at org.elasticsearch.entitlement.runtime.policy.PolicyUtils.createPluginPolicies(PolicyUtils.java:71) ~[elasticsearch-entitlement-8.18.3.jar:?]
	at org.elasticsearch.bootstrap.Elasticsearch.initPhase2(Elasticsearch.java:244) ~[elasticsearch-8.18.3.jar:?]
	at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:96) ~[elasticsearch-8.18.3.jar:?]

No errors during patching. Error while starting elasticsearch.

Ok. Thank you very much.
I have everything I need to get started. Will let you know and send you a pre-build when it’s fixed.

1 Like

Thank you very much.

Here is the fixed plugin: ROR 1.66.1 for ES 8.18.3

When you confirm it works, we will release ROR 1.66.1.

I’m on vacation, I won’t have time to check. I believe in your skills=)

This is fixed in ROR 1.66.1