Java SDK App issue

I am facing an error when running the sample application provided in couchbase docs, need help in correcting the error.

Unsupported class file major version 58

This message means some of your code or dependencies were compiled to target Java 14, but you’re trying to run the with an earlier version of Java.


I have JDK 14 installed on my machine. I have added properties to the pom file to make use of JDK 14 for compiling the application.

If the properties are not changed, it is throwing and error to use java 7 or 8

 <!-- for jdk14 compilation -->

It looks like you might be using Spring Boot 2.1.5? The release notes for Spring Boot 2.2.6 say it’s the first version to support Java 14. Does upgrading to 2.2.6 resolve the issue?


Didn’t try that, will give a try

Able to run the app with changes to pom.xml redirecting it to spring boot 2.2.6

1 Like