Archive for April, 2019

Google Cloud: first create project, then create application

April 23, 2019

It seems quite obvious, first you create a project and eventually the application.
Well, as I could see it is not 100% clear.
If you just create the project, no app can be deployed and you would get something like

Beginning interaction for module default…
Feb 29, 2019 9:45:35 AM com.google.appengine.tools.admin.AbstractServerConnection send1
WARNING: Error posting to URL: https://appengine.google.com/api/appversion/getresourcelimits?app_id=helloworlddummyname-123456&version=1&
404 Not Found
This application does not exist (project_id=u’helloworlddummyname-123456′). To create an App Engine application in this project, run “gcloud app create” in your console.
This is try #0

As by the log, action is clear but some details are missing; here are 2 readymade options :
open Google Cloud Console, select your project and you should see something like this
GoogleCloud_CreateApplication

(clear enough? ;)) press “Create Application” and select the region you prefer
GoogleCloud_CreateApplication2-Region

or run the command from the Google Cloud SDK Shell
gcloud app create --project=[your project id] --region=[a region id]

I went for the cmd line 🙂

read more here “gcloud app creat ” needed permission?

Advertisements

Netbeans, Google Cloud and Java7-8

April 22, 2019

Again, this is just a reminder for myself … and maybe helpful for other Java-beginners 😉

Wanted to try Google Cloud … with Java…and Netbeans.

I have been forwarded this helpfull tutorial: How to Setup Google App Engine Server in NetBeans IDE

Found two issues, relative small if you are in Java world for quite a while … but I start as a total beginner:

First: JAVA_HOME was missing.
I installed the JDK 1.8 (this jdk-8u212-windows-x64.exe here) and JAVA_HOME was missing, so for the 100% beginners out there a good tutorial is How to set JAVA_HOME on Windows 10

Second: could not deploy the hello world app and had this error messagE:

com.google.apphosting.utils.config.AppEngineConfigException: GAE Java7 is not supported anymore.
Unable to update app: GAE Java7 is not supported anymore.

Workaround seems well known: in my WebApplication edited appengine-web.xml and added

<runtime>java8</runtime>

more info on appengine-web.xml Reference

That’s all! 🙂