IBM-Cloud / get-started-java

Sample and tutorial to help you get started with a Java EE app, REST API and a database.
https://console.bluemix.net/docs/runtimes/liberty/getting-started.html
Apache License 2.0
27 stars 88 forks source link

Unable to deploy to IBM Cloud #24

Closed ayatokura closed 3 years ago

ayatokura commented 4 years ago

When I tried steps in the tutorial, the site deployed to the cloud was not displayed correctly.

404 Not Found The application or context root for this request has not been found: /

Error_JavaApp_IBMCloud

This app works on locally.

wbigger commented 3 years ago

I had the same problem with the lite plan, analyzing the logs I found that the problem was the dimension of the JVM. As stated here, the default JVM memory size is 512MB, that doesn't fit on the memory limit of lite plan of 256MB.

I fixed the issue with the following command, as suggested in the page I linked:

ibmcloud cf set-env myapp JVM_ARGS -Xmx128m

where myapp has to be changed with the name of your app, of course.

Hope this help.

balajikadambi commented 3 years ago

I am facing the same issue. I have set the memory to 512MB.

image

The home page is not found: ![Uploading image.png…]()

balajikadambi commented 3 years ago

I was able to workaround by using the OpenLiberty sample instead to run locally. https://openliberty.io/downloads/

To deploy to IBM Cloud, I followed the below steps:

kevin-ortega commented 3 years ago

You need to append /GetStartedJava to the URL. The tutorial mentions this.

balajikadambi commented 3 years ago

@kevin-ortega Yes, appending /GetStartedJava to the URL worked. Thank you.