Application error on Azure App Service trying to run Java/Springboot jar

Suren 1 Reputation point
2021-05-05T22:39:58.143+00:00

Trying to deploy/run a springbok application (jar) on Azure App Service, but seeing an "Application Error".

94172-screen-shot-2021-05-05-at-20149-pm.png

Application

We built the application using Springboot and wanted to deploy the prebuilt jar file (from /target" folder.

Azure Setup

  1. Created a new App Service using Java 11
  2. Under "Deployment Center" linked with the Github repository that holds the code and jar file under /target
    94174-screen-shot-2021-05-05-at-15733-pm.png
  3. Under App service > Configuration > General Settings > Startup Command
    java -jar /target/lead-processing-0.0.1-SNAPSHOT.jar
    94133-screen-shot-2021-05-05-at-1-59-04-pm.png

Logs

   2021-05-05T22:25:23.730536337Z STARTUP_FILE=  
   2021-05-05T22:25:23.737427449Z STARTUP_COMMAND=java -jar /target/lead-processing-0.0.1-SNAPSHOT.jar  
   2021-05-05T22:25:23.738113651Z No STARTUP_FILE available.  
   2021-05-05T22:25:23.738719652Z Running STARTUP_COMMAND: java -jar /target/lead-processing-0.0.1-SNAPSHOT.jar  
   2021-05-05T22:25:24.003600232Z Finished running startup command 'java -jar /target/lead-processing-0.0.1-SNAPSHOT.jar'. Exiting with exit code 1.  
   2021-05-05T22:25:24.004755134Z Error: Unable to access jarfile /target/lead-processing-0.0.1-SNAPSHOT.jar  

Are we missing anything?

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,939 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ryan Hill 30,281 Reputation points Microsoft Employee Moderator
    2021-05-06T15:29:58.093+00:00

    @Suren , it appears the platform couldn't find your jar file. Verify lead-processing-0.0.1-SNAPSHOT.jar matches the location in your workflow and that it is in the specified /target folder. See https://learn.microsoft.com/en-us/azure/app-service/deploy-github-actions?tabs=applevel#java.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.