Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):
<dependency>
<groupId>org.opensearch.client</groupId>
<artifactId>opensearch-java</artifactId>
<version>2.9.0</version>
</dependency>
Describe the issue:
I am trying to use the newly released (22.2.2024) opensearch-java client 2.9.0 in a project as a dependency. When I try to instantiate either the Rest Client transport or the AwsSdk2Transport per docs Java client - OpenSearch Documentation , my project compiles fine against Java 8 but when I run the app with Java8 I get this
nested exception is java.lang.UnsupportedClassVersionError: org/opensearch/client/util/ObjectBuilder has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
Was the opensearch-java compiled with JDK11 or I’m doing something wrong or I missed the whole point of the Java8 support feature mentioned here [PROPOSAL] Restore support for Java 8 · Issue #156 · opensearch-project/opensearch-java (github.com) ?
Configuration:
Java 8 project using opensearch-client v.2.9.0 to work with Opensearch serverless on AWS.
Relevant Logs or Screenshots:
During runtime of the application with Java 8:
nested exception is java.lang.UnsupportedClassVersionError: org/opensearch/client/util/ObjectBuilder has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0