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
App not runnning once deployed to Heroku #36
Comments
Well, from your comments I see that Heroku has forward slash |
I tried changing the slashes to how it is in jbot-example\target\jbot-example-1.0.0-SNAPSHOT.jar in the procfile and this removed the slashes in heroku altogether and showed up under the resources tab as |
OK I moved the jar file to the root directory and this resolved the issue, now seeing: After googling it is saying that there should be a main-Class set in the manifest.mf file inside the jar, this does not exist, should this not have automatically been set when the jar was created? Have manually added the class package to the manifest.mf file and now seeing a different error: 2017-03-08T13:16:38.631889+00:00 app[web.1]: at example.jbot.JBotApplication.main(JBotApplication.java:16) 2017-03-08T13:16:38.632768+00:00 app[web.1]: Caused by: java.lang.ClassNotFoundException: org.springframework.boot.SpringApplication |
You need not move any jar files, it would mess things up. Have you followed the steps mentioned in the deploy to cloud section in the docs? |
Have resolved the issue, problem was that the jar did not contain org.springframework.boot dependencies |
So you mean there are dependencies missing from jbot-example? I will take a look at it this weekend and come back to you. Thanks for the issue. |
Yes thats correct, I have attached the link to the article I found that showed me how to solve this issue: |
Okay, if it's really an issue then I think it wouldn't even build locally but it is. I will give it a look and come back to you. |
The directions on the README for heroku do not work correctly. While @Stuartkenworthy is right that the fix for
There's also an issue with forcing the app to bind to port 8080. There are times when deploying to heroku where this will fail. Instead we should bind to port @ramswaroop the reason the build works fine locally is because this issue isn't about compiling, but rather about packaging. The jar needs to be executable to run in heroku correctly as paired with the given Procfile. |
See rampatra#36 for more details
See rampatra#36 for more details
See rampatra#36 for more details
See rampatra#36 for more details
Thanks @talbright , it makes sense. Can we also do something around the jar file name in the Procfile such that everytime I update the jbot-example jar I don't have to edit the Procfile. |
You bet 🎉 That seems to be the next logical step, to do something around automating version changes. Alternatively, it might just be better to go with deploying directly to heroku: https://devcenter.heroku.com/articles/deploying-java-applications-with-the-heroku-maven-plugin But I haven't had time to work through that approach yet but will in the next couple of weeks and can push a fix when I figure out the best way to do it. For now you shouldn't have to update I would suggest merging this in now since it fixes an immediate issue, and we can work on a better long term solution in another PR. |
Yes @talbright, I am reviewing the PR now. |
* Fixes jbot-example broken heroku deploy. See #36 for more details
|
в двух словах обьясни в чем ошибка и что нужно предпринять?) |
After deploying to Heroku and attempting to run the app I am seeing this error message in the logs:
Error: Unable to access jarfile jbot-example/target/jbot-example-1.0.0-SNAPSHOT.jar
I have checked this is the correct name for the jar file and this is the jar file that is auto-created when running mvn spring-boot:run.
My procfile looks like this: web: java -Dserver.port=8080 -jar jbot-example/target/jbot-example-1.0.0-SNAPSHOT.jar
And the path from the jbot directory to the jar file is jbot-example\target\jbot-example-1.0.0-SNAPSHOT.jar
Any help with this would be greatly appreciated
This is the first time I've used Heroku so not sure if I am missing anything.
The text was updated successfully, but these errors were encountered: