Error starting Spring Boot applications on Bluemix
I created a spring starter app using http://start.spring.io/ , downloaded the zip compiled with mvn install
and pushed the jar to Bluemix
cf push myspringapp1155 -p target/demo-0.0.1-SNAPSHOT.jar
The application does not start. Output
cf logs myspringapp1155 --recent
shows:
2015-07-10T11:13:30.25-0400 [App/0] ERR Exception in thread "main" java.lang.UnsupportedClassVersionError: JVMCFRE003 bad major version; class=demo/DemoApplication, offset=6
source to share
jar, war and ears files on Bluemix are handled by the default Liberty builder on Bluemix. The Liberty Bundle is currently using Java 1.7 (this may change soon). You can:
-
Compile the source using 1.7. Change your pom.xml
<java.version>1.7</java.version>
or -
Use the JBP_CONFIG_OPENJDK environment variable to specify an alternate JRE version. For example, to use OPENJDK 8, set the following environment variable:
$ cf set-env myapp JBP_CONFIG_OPENJDK "version: 1.8.+"
source to share