Getting error "unsupported major.minor version 52.0" when running server with openmrs sdk plugin 3.13.6

Dear Community.

I want to set up a server using the latest version of openmrs sdk (3.13.6) on Ubuntu 18.04. Installing the SDK and setting up the server is successful (all using Java 8). And when I am setting the server I specify that I want to run my server using Java 7, as I am using platform 1.9.11. And I have Tomcat 7 in my “CATALINA_HOME” environment variable.

My distribution artifact is: org.openmrs.module:pihmalawi:6.8.0-SNAPSHOT

However when I try to run my server I get the error “unsupported major.minor version 52.0”.

Has anyone come across this issue before or have an idea how to resolve the issue?

Thank you!

Limbani.

CC: @raff

1 Like

Thanks for reporting this. I have been able to reproduce it. Can you create a ticket for it?

As a workaround for now, run it like this: mvn org.openmrs.maven.plugins:openmrs-sdk-maven-plugin:3.13.4:run

1 Like

Thanks so much @dkayiwa. This worked perfectly!

I will create a ticket for the issue.

Thanks for reporting this guys - just linking back to the ticket that @lthengo created for this here: https://issues.openmrs.org/projects/SDK/issues/SDK-265 . We ran into this same issue for our Rwanda development environment today and this talk post helped us get unblocked.

@dkayiwa - did you ever manage to diagnose why this issue cropped up?

FYI - @jbyiringiro

Probably my fault :grimacing:. An earlier draft of what became this commit had a Java 8 lambda instead of a complete class and the bump in compiler version to Java 8 apparently remained unchanged. That can be reverted, though.

Out of curiosity, is there any reason that 1.9.x wouldn’t run on Java 8?

Thanks @ibacher. Yeah, there are things hard-coded into core that are incompatible. I would imagine those could theoretically be fixed in a maintenance release, but no one has ever done that.

If fixing this just requires reverting the source/target versions in the pom to 1.7 and releasing, that would be great to do.

1 Like