0
votes

I have an existing Java web app project. It works locally with Tomcat. I converted it into a maven project and deployed it on Heroku using webapp-runner. The application is deployed successfully but it does not run; it crashes. I cannot figure out from the logs what the reason is.

My Procfile looks like this: web: java $JAVA_OPTS -jar target/dependency/webapp-runner.jar --port $PORT target/*.war

App structure enter image description here

logs enter image description here

enter image description here

enter image description here

1
Setting JAVA_TOOL_OPTIONS defaults based on dyno size. Custom settings will override them. Picked up JAVA_TOOL_OPTIONS: -Xmx300m -Xss512k -Dfile.encoding=UTF-8 The specified path "target/*.war" does not exist.Nikolay

1 Answers

0
votes

It states clearly in the log: The specified path target/*.war does not exist. Run your build locally using mvn clean package and see if you actually have a war file in the target directory and what it's name is.

Then, open your Procfile and replace target/*.war with target/whateverTheNameIs.war and retry.