-
Notifications
You must be signed in to change notification settings - Fork 931
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cf push
fails with jars generated with the Spring Boot 1.3.0 snapshot release
#411
Comments
We have created an issue in Pivotal Tracker to manage this. You can view the current status of your issue at: https://www.pivotaltracker.com/story/show/92378762. |
Here's a link to a demo project. You can use this instead of creating a new project in the repo instructions above. https://drive.google.com/file/d/0Byv8UPk_0AMORS0zU1I4OXpsX1k/view?usp=sharing |
For a little more background on this issue and it's root cause see spring-projects/spring-boot#1117. We are trying to use a little known technique with Spring Boot 1.3 of embedding a Bash script at the start of the jar file so that it can be easily run and installed as a service. The zip file format is a little unusual in that a central directory record is usually read from the end of the file, meaning that you can put whatever you want at the front. You can see how we deal with reading file by looking at this class. I imagine that your unzip code or whatever library you use might need updating to deal with the additional bytes at the front of the file. |
I've updated one of the existing tests to reproduce the issue. See philwebb@a67df0d. Unfortunately it looks like the root cause is coming from archive/zip in go itself which probably means there isn't going to be an easy fix. |
I've raised an issue with |
We'll need to watch to see when Go picks up this fix. We're already looking to upgr to go 1.4. |
@goehmen So far they don't seem too keen to merge the fix. I need to find find out what techniques other tools use to deal with this. I'm stacked at the moment so If you have any time to add relevant feedback to golang/go#10464 please do. |
@goehmen The suggested patch isn't going to make Go 1.5 but an alternative fix as been suggested. Can we reopen this one to consider if it's possible to support this ourselves without waiting for Go? |
We have created an issue in Pivotal Tracker to manage this. You can view the current status of your issue at: https://www.pivotaltracker.com/story/show/93671532. |
reopened. Greg Oehmen On Thu, Apr 30, 2015 at 2:43 PM, Phil Webb notifications@github.com wrote:
|
@philwebb: The cli unpacks the jar before uploading it. What would the expected behavior be with an embedded file in the jar after unpacking? How would it need to be uploaded? |
We're not going to add a dependency on a patched golang library that we then have to maintain ourselves. |
@krishicks The embedded script wouldn't actually need to be uploaded, It's can simply be ignored. |
@philwebb, @krishicks Thanks for the extra clarification. Sounds like there is a clear plan on how to tackle this. |
This is a huge issue for us ( jhipster/generator-jhipster#2225 ) as this means no JHipster application can be deployed to CloudFoundry. |
FYI, the error on this seems different now. With Spring Boot 1.3.0 RELEASE & cf cli 6.13, I see this behavior.
When looking at the trace log, you can see that it's sending null to the resource_match api, which is what's causing the failure.
Disabling the executable JAR / WAR, makes this error go away.
Looking forward to a fix in the cli, so this won't be necessary. |
See #411 (comment) for background. [#93671532] Signed-off-by: Kris Hicks <khicks@pivotal.io>
See #411 (comment) for background. [#93671532] Signed-off-by: Kris Hicks <khicks@pivotal.io>
@dmikusa-pivotal , @philwebb We have made a fix. Can you try with our edge binary? Cheers, |
Works for me with the edge binary. Thanks! |
Thanks Dan for the quick confirmation! |
Sweet. Thanks @dkoper & @simonleung8 for the fix. I realize this is a bit of an edge case so I really appreciate it 👍 |
😓 |
This fix is included in cf CLI release v6.14.1 published today. |
Steps to reproduce:
mvn package
cf push <some-app-name> -p target/demo-0.0.1-SNAPSHOT.jar
.It will fail with the following:
The jar files can be extracted using a tool like
jar
orunzip
and all of the files are present.The text was updated successfully, but these errors were encountered: