问题
I am trying to deploy the SpringBoot Restful application in Pivotal Cloud factory. My JDK 1.8 and using Maven. Tried the below Sample application from pivotal: https://spring.io/guides/gs/rest-service/
Maven build is successful with the jar file generated at target folder.
I have added manifest.yml at the pom.xml file location as below.
---
applications:
- name: rest-mini
buildpack: https://github.com/gratiartis/java-buildpack
memory: 128M
instances: 1
host: rest-mini
domain: cfapps.io
path: target/gs-rest-service-0.1.0.jar
Logged into pivotal web service account and trying to push it as
"cf push" and getting the below error. Please advice. thanks
2016-05-16T01:48:49.88+0800 [API/1] OUT Created app with guid 281c1f5f-235d-497a-8d1a-2d396ccc48c3
2016-05-16T01:48:58.16+0800 [API/3] OUT Updated app with guid 281c1f5f-235d-497a-8d1a-2d396ccc48c3 ({"route"=>"ed5e6122-f52a-4562-9293-09da16281fba"})
2016-05-16T01:49:31.68+0800 [API/1] OUT Updated app with guid 281c1f5f-235d-497a-8d1a-2d396ccc48c3 ({"state"=>"STARTED"})
2016-05-16T01:49:31.98+0800 [STG/0] OUT Creating container
2016-05-16T01:49:32.45+0800 [STG/0] OUT Successfully created container
2016-05-16T01:49:32.45+0800 [STG/0] OUT Downloading app package...
2016-05-16T01:49:33.09+0800 [STG/0] OUT Downloaded app package (11.5M)
2016-05-16T01:49:33.09+0800 [STG/0] OUT Staging...
2016-05-16T01:49:33.80+0800 [STG/0] ERR /tmp/buildpacks/38ac912092c32b9507ea7ac5fc033650/lib/java_buildpack/component/versioned_dependency_component.rb:68: warning: circular argument reference - jar_name
2016-05-16T01:49:34.19+0800 [STG/0] OUT -----> Java Buildpack Version: 717d8bf | https://github.com/gratiartis/java-buildpack#717d8bf
2016-05-16T01:49:35.45+0800 [STG/0] OUT -----> Downloading Open Jdk JRE 1.8.0_91-unlimited-crypto from https://download.run.pivotal.io/openjdk/trusty/x86_64/openjdk-1.8.0_91-unlimited-crypto.tar.gz (1.0s)
2016-05-16T01:49:36.61+0800 [STG/0] OUT Expanding Open Jdk JRE to .java-buildpack/open_jdk_jre (1.1s)
2016-05-16T01:49:36.71+0800 [STG/0] OUT -----> Downloading Spring Auto Reconfiguration 1.10.0_RELEASE from https://download.run.pivotal.io/auto-reconfiguration/auto-reconfiguration-1.10.0_RELEASE.jar (0.0s)
**2016-05-16T01:49:36.71+0800 [STG/0] ERR [Buildpack] ERROR Compile failed with exception #<TypeError: no implicit conversion of nil into String>**
2016-05-16T01:49:36.71+0800 [STG/0] ERR no implicit conversion of nil into String
2016-05-16T01:49:36.72+0800 [STG/0] ERR Failed to compile droplet
2016-05-16T01:49:36.73+0800 [STG/0] OUT Exit status 223
2016-05-16T01:49:36.73+0800 [STG/0] ERR Staging failed: Exited with status 223
2016-05-16T01:49:36.83+0800 [API/3] ERR Failed to stage application: staging failed
回答1:
Use buildpack: https://github.com/cloudfoundry/java-buildpack
official CF buildpack.
The one you are using seems outdated, it was last updated on Sep 25, 2014.
Also assign more memory memory: 256M or 512M
, 128M might work as well.
来源:https://stackoverflow.com/questions/37242078/springboot-in-pivotal-cloud-issue