issue of migration from Java8 to Java 11 for app engine standard model

1,048 views
Skip to first unread message

Han Ju Kim

unread,
Nov 19, 2019, 10:04:16 PM11/19/19
to Google App Engine
Hi I'm trying to migrate existing app engine standard model (JDK8) to Java11 according to the guide at Google cloud 

There is no issue on compile, but we I try to run on local development server it generates this error. I'm using maven and tried "maven package appengine:run".
Please find my error as below

Any guide and information will be appreciated.



Nov 20, 2019 3:53:17 PM com.google.cloud.tools.appengine.operations.DevAppServerRunner run
INFO: submitting command: C:\Program Files\Java\openjdk-11.0.5-1\bin\java.exe -Xms2048m -Xmx8092m -Duse_jetty9_runtime=true -D--enable_all_permissions=true -Dappengine.sdk.root=C:\Users\hkim\AppData\Local\google\ct4j-cloud-sdk\LATEST\google-cloud-sdk\platform\google_appengine\google\appengine\tools\java -cp C:\Users\hkim\AppData\Local\google\ct4j-cloud-sdk\LATEST\google-cloud-sdk\platform\google_appengine\google\appengine\tools\java\lib\appengine-tools-api.jar com.google.appengine.tools.development.DevAppServerMain --application=mywms --allow_remote_shutdown --disable_update_check --no_java_agent D:\xxxx\Iridium\target\iridium-1.0.0
[INFO] GCLOUD: WARNING: An illegal reflective access operation has occurred
[INFO] GCLOUD: WARNING: Illegal reflective access by com.google.appengine.tools.development.StreamHandlerFactory (file:/C:/Users/hkim/AppData/Local/google/ct4j-cloud-sdk/LATEST/google-cloud-sdk/platform/google_appengine/google/appengine/tools/java/lib/impl/appengine-local-runtime.jar) to method java.net.URL.getURLStreamHandler(java.lang.String)
[INFO] GCLOUD: WARNING: Please consider reporting this to the maintainers of com.google.appengine.tools.development.StreamHandlerFactory
[INFO] GCLOUD: WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
[INFO] GCLOUD: WARNING: All illegal access operations will be denied in a future release
[INFO] GCLOUD: com.google.apphosting.utils.config.AppEngineConfigException: Invalid configuration
[INFO] GCLOUD:  at com.google.appengine.tools.development.DevAppServerImpl.reportDeferredConfigurationException(DevAppServerImpl.java:432)
[INFO] GCLOUD:  at com.google.appengine.tools.development.DevAppServerImpl.doStart(DevAppServerImpl.java:233)
[INFO] GCLOUD:  at com.google.appengine.tools.development.DevAppServerImpl.access$000(DevAppServerImpl.java:44)
[INFO] GCLOUD:  at com.google.appengine.tools.development.DevAppServerImpl$1.run(DevAppServerImpl.java:220)
[INFO] GCLOUD:  at com.google.appengine.tools.development.DevAppServerImpl$1.run(DevAppServerImpl.java:218)
[INFO] GCLOUD:  at java.base/java.security.AccessController.doPrivileged(Native Method)
[INFO] GCLOUD:  at com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:218)
[INFO] GCLOUD:  at com.google.appengine.tools.development.DevAppServerMain$StartAction.apply(DevAppServerMain.java:404)
[INFO] GCLOUD:  at com.google.appengine.tools.util.Parser$ParseResult.applyArgs(Parser.java:45)
[INFO] GCLOUD:  at com.google.appengine.tools.development.DevAppServerMain.run(DevAppServerMain.java:257)
[INFO] GCLOUD:  at com.google.appengine.tools.development.DevAppServerMain.main(DevAppServerMain.java:248)
[INFO] GCLOUD: Caused by: com.google.apphosting.utils.config.AppEngineConfigException: Line 2, column 4: Unable to find property 'env' on class: com.google.apphosting.utils.config.AppYaml
[INFO] GCLOUD:  at com.google.apphosting.utils.config.AppYaml.parse(AppYaml.java:1491)
[INFO] GCLOUD:  at com.google.apphosting.utils.config.AppYamlProcessor.convert(AppYamlProcessor.java:42)
[INFO] GCLOUD:  at com.google.apphosting.utils.config.EarHelper.readWebModule(EarHelper.java:171)
[INFO] GCLOUD:  at com.google.appengine.tools.development.ApplicationConfigurationManager$WarModuleConfigurationHandle.readConfiguration(ApplicationConfigurationManager.java:416)
[INFO] GCLOUD:  at com.google.appengine.tools.development.ApplicationConfigurationManager.<init>(ApplicationConfigurationManager.java:157)
[INFO] GCLOUD:  at com.google.appengine.tools.development.ApplicationConfigurationManager.newWarConfigurationManager(ApplicationConfigurationManager.java:99)
[INFO] GCLOUD:  at com.google.appengine.tools.development.ApplicationConfigurationManager.newWarConfigurationManager(ApplicationConfigurationManager.java:85)
[INFO] GCLOUD:  at com.google.appengine.tools.development.DevAppServerImpl.<init>(DevAppServerImpl.java:143)
[INFO] GCLOUD:  at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[INFO] GCLOUD:  at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
[INFO] GCLOUD:  at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
[INFO] GCLOUD:  at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
[INFO] GCLOUD:  at com.google.appengine.tools.development.DevAppServerFactory.doCreateDevAppServer(DevAppServerFactory.java:354)
[INFO] GCLOUD:  at com.google.appengine.tools.development.DevAppServerFactory.createDevAppServer(DevAppServerFactory.java:301)
[INFO] GCLOUD:  at com.google.appengine.tools.development.DevAppServerMain$StartAction.apply(DevAppServerMain.java:383)
[INFO] GCLOUD:  ... 3 more
[INFO] GCLOUD: Caused by: com.google.appengine.repackaged.com.esotericsoftware.yamlbeans.YamlReader$YamlReaderException: Line 2, column 4: Unable to find property 'env' on class: com.google.apphosting.utils.config.AppYaml
[INFO] GCLOUD:  at com.google.appengine.repackaged.com.esotericsoftware.yamlbeans.YamlReader.readValueInternal(YamlReader.java:344)
[INFO] GCLOUD:  at com.google.appengine.repackaged.com.esotericsoftware.yamlbeans.YamlReader.readValue(YamlReader.java:136)
[INFO] GCLOUD:  at com.google.appengine.repackaged.com.esotericsoftware.yamlbeans.YamlReader.read(YamlReader.java:103)
[INFO] GCLOUD:  at com.google.appengine.repackaged.com.esotericsoftware.yamlbeans.YamlReader.read(YamlReader.java:90)
[INFO] GCLOUD:  at com.google.apphosting.utils.config.AppYaml.parse(AppYaml.java:1474)
[INFO] GCLOUD:  ... 17 more
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  29.568 s
[INFO] Finished at: 2019-11-20T15:53:18+13:00
[INFO] ------------------------------------------------------------------------

Elliott (Cloud Platform Support)

unread,
Nov 20, 2019, 4:17:07 PM11/20/19
to Google App Engine
Hello Han,

Please note that Google Groups are reserved for general Google Cloud Platform and product discussions and not for reporting issues, which is why I suggest moving the troubleshooting to Issue Tracker, where issues can be turned private in case we need to gather any project specific details.

Ludovic Champenois

unread,
Nov 21, 2019, 10:55:34 AM11/21/19
to google-a...@googlegroups.com, Han Ju Kim

Hi,

AppEngine Java11 does not have support for the local appserver emulator, as any type of workload can be used (not a Jetty Servlet Server anymore).

So for Java11, the DevAppServerRunner run action is not available (or produces this type of error). Only the deployment action is possible.

In order to test locally your application, you would have to locally run the equivalent of your entrypoint (in app.yaml). A default one is a command like

java -jar myjar.jar if this is your application in the jar.

Cheers,

Ludo

--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/09514b68-f659-4fa3-9b95-02b610173ba9%40googlegroups.com.

Han Ju Kim

unread,
Nov 21, 2019, 8:34:18 PM11/21/19
to Google App Engine
Hi Ludovic,

The Java 11 page of App engine described the guide for running application locally as below,

To run your application locally:

  1. Package your application:

    mvn clean package
  2. Start the server with your WAR file as an argument.

    For example, you can start the server in the helloworld-servlet sample by running the following command from your java-docs-samples/appengine-java11/appengine-simple-jetty-main/ folder:

    mvn exec:java -Dexec.args="../helloworld-java8/target/helloworld.war"
  3. In your web browser, enter the following address:

    http://localhost:8080

To unsubscribe from this group and stop receiving emails from it, send an email to google-a...@googlegroups.com.

Oqueli Martinez Sanchez

unread,
Nov 23, 2019, 12:37:48 AM11/23/19
to Google App Engine
Have you tried deploying a brand new App Engine version using the mvn spring-boot:run command? 

This could be useful to troubleshoot the issues you are having. Here [1] is the quickstart. 

Be sure to install the Java SDK [2]

Han Ju Kim

unread,
Nov 27, 2019, 12:17:13 PM11/27/19
to Google App Engine
Hi Oqueli,

I'm not generate new App Engine. As I described above, I have running App Engine solution for Java runtime 8 and try to migrate Java 11 according to the guide from Google Cloud document. 

Han Ju Kim

unread,
Nov 27, 2019, 12:17:15 PM11/27/19
to Google App Engine
Sorry for all,

As far as I understand, "mvn package appengine:run" type is not allowed due to new wrapping structure of Java11. So I should do wrapper as describe above, now it successfully initiate my war fie. However many errors regarding google.appengine.api.datastore. :(
Reply all
Reply to author
Forward
0 new messages