Skip to content
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

Incorrect steps mentioned on VS Code website to deploy Azure App Service #5911

Closed
tarekahf opened this issue Jan 5, 2023 · 5 comments
Closed
Labels
doc-bug out of date, inaccurate, confusing content java

Comments

@tarekahf
Copy link

tarekahf commented Jan 5, 2023

The steps mentioned on this link:

https://code.visualstudio.com/docs/java/java-on-azure

for the following:

Tutorial Description Related Tools
Deploy Java web appsto Azure App Service Deploy a web app to the cloud Apache MavenAzure App Service
Deploy Spring Boot appsto Azure Spring Apps Deploy a Spring Boot applicationto Azure Spring Apps Apache MavenAzure Spring Apps

The above articles provide steps to deploy App Service from VS Code. The steps are wrong and they are not working for:
https://code.visualstudio.com/docs/java/java-webapp
https://code.visualstudio.com/docs/java/java-spring-apps

It should be as follows:

  1. Clone the Sample Project
  2. Optional: Create the App Service with Linux, Java 17, and Java SE from Azure Portal. Could not create the App Service from VS Code.
  3. Follow the steps from here to config the project for Azure deployment:
    https://learn.microsoft.com/en-us/azure/app-service/quickstart-java?pivots=platform-linux-development-environment-maven&tabs=tomcat
PS> mvn com.microsoft.azure:azure-webapp-maven-plugin:2.5.0:config
PS> mvn package azure-webapp:deploy

The above PS commands will also create the App Service and deploy it.

Please fix the relevant web pages.

@gregvanl gregvanl added java doc-bug out of date, inaccurate, confusing content labels Jan 5, 2023
@nickzhums
Copy link
Member

@tarekahf thanks for creating this issue. The current web pages are creating App Service and Azure Spring Apps using the VS code extension, could you please clarify what went wrong for you? also @silenceJialuo as fyi

@tarekahf tarekahf changed the title Incorrect steps mentioned on VS Code website Incorrect steps mentioned on VS Code website to deploy Azure App Service Jan 6, 2023
@tarekahf
Copy link
Author

tarekahf commented Jan 6, 2023

I was following the steps here:
https://code.visualstudio.com/docs/java/java-webapp#_deploy-web-apps-to-the-cloud

and got this error when browsing the App Service:

HTTP Status 404 – Not Found
Type Status Report

Message The requested resource [/] is not available

Description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.

Apache Tomcat/8.5.78

Also, the default packaging of the sample project was JAR and it was not deploying JAR and was requesting WAR. I changed the packaging to WAR and deployed successfully but I got the above response error in the browser when navigating to the App Service URL.

What is wrong is the missing steps which I included in the initial post above.

Also, I tried creating App Service from VSCode for Java 17, Java SE, and Linux, but I got an error indicating something wrong with Java 17. However, I was able to create this App Service from the Azure Portal directly. See microsoft/vscode-azureappservice#2348 for details.

See https://stackoverflow.com/q/75010485/4180447 for more details.

Tarek

@silenceJialuo
Copy link
Contributor

Also, include @Flanker32 for awareness with the issue.

@Flanker32
Copy link
Member

Flanker32 commented Jan 9, 2023

@tarekahf Thanks a lot for your report, the issue for Java 17 creation in VSCode has been fixed in PR microsoft/vscode-azureappservice#2350.
We will update here once the fix is released, as a workaround, could you please create web app in portal or use other toolkits like webapp-maven-plugin or azure cli if necessary? Really sorry for the inconvenience and thanks again for your help

@gregvanl
Copy link

Looks like the extension has been released with the necessary fix for Java 17 https://github.com/microsoft/vscode-azureappservice/blob/main/CHANGELOG.md#0246---2023-02-08
Closing the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc-bug out of date, inaccurate, confusing content java
Projects
None yet
Development

No branches or pull requests

5 participants