Exception Starting OpenMRS 1.11.5 Standalone with Java 8

I am trying to run OpenMRS 1.11.5 standalone but it fails with this exception. With java 6 it starts just fine.

It seems the bundled ASM version does not support java 8 yet. Is there a way/hack to make this run?

Thanks.

Update This SO answer says it has to do with a bug in Spring which causes ASM reader to load jdk classes (java.* & javax.*) compiled with -target 1.8 which can not be parsed because the ASM version in Spring 3.2.8 and below is not capable of parsing java 8 bytecode (Note that 1.11.5 comes with Spring 3.2.7.RELEASE). Well it seems the fix is coming in Spring 3.2.9.

Follow up question If the above explanation is correct which I have no reason to doubt since there is even a ticket on Spring JIRA for the same then how come I have been able to deploy the same version on tomcat7 using java 8? Is ASM used only in standalone version?

1 Like

There is no released version of the standalone in sourceforge that you can run on java 8, you would have to build the standalone with java 8 from the latest code in github, be sure to carefully follow the read me file.

FYI, you should be able to run 1.11.5 with tomcat 7 and java 8