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

      

+3


source to share


2 answers


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.+"

+6


source


Bluemix now supports 1.8 in the Liberty build package. Hence, a simple cf push command can deploy the application to bluemix using Liberty java.



0


source







All Articles