Comments (4)
To repro, use a JDK17 for a mvn appengine:run command on a GAE project and you will see:
--- appengine-maven-plugin:2.4.3:run (default-cli) @ courteline ---
Aug 05, 2022 3:10:29 PM com.google.cloud.tools.appengine.operations.DevAppServerRunner run
INFO: submitting command: /Users/ludo/.sdkman/candidates/java/17.0.3-tem/bin/java -Duse_jetty9_runtime=true -D--enable_all_permissions=true -Dappengine.sdk.root=/Users/ludo/Library/Application Support/google-cloud-tools-java/managed-cloud-sdk/LATEST/google-cloud-sdk/platform/google_appengine/google/appengine/tools/java -cp /Users/ludo/Library/Application Support/google-cloud-tools-java/managed-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=courteline-nantes --allow_remote_shutdown --disable_update_check --no_java_agent /Users/ludo/a/courteline/target/courteline-1.0-SNAPSHOT
GCLOUD: java.lang.RuntimeException: Unable to create a DevAppServer
GCLOUD: at com.google.appengine.tools.development.DevAppServerFactory.doCreateDevAppServer(DevAppServerFactory.java:378)
GCLOUD: at com.google.appengine.tools.development.DevAppServerFactory.createDevAppServer(DevAppServerFactory.java:310)
GCLOUD: at com.google.appengine.tools.development.DevAppServerMain$StartAction.apply(DevAppServerMain.java:384)
GCLOUD: at com.google.appengine.tools.util.Parser$ParseResult.applyArgs(Parser.java:58)
GCLOUD: at com.google.appengine.tools.development.DevAppServerMain.run(DevAppServerMain.java:258)
GCLOUD: at com.google.appengine.tools.development.DevAppServerMain.main(DevAppServerMain.java:249)
GCLOUD: Caused by: java.lang.ExceptionInInitializerError
GCLOUD: at com.google.appengine.tools.development.DevAppServerImpl.(DevAppServerImpl.java:135)
GCLOUD: at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
GCLOUD: at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
GCLOUD: at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
GCLOUD: at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
GCLOUD: at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
GCLOUD: at com.google.appengine.tools.development.DevAppServerFactory.doCreateDevAppServer(DevAppServerFactory.java:363)
GCLOUD: ... 5 more
GCLOUD: Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make static java.net.URLStreamHandler java.net.URL.getURLStreamHandler(java.lang.String) accessible: module java.base does not "opens java.net" to unnamed module @531be3c5
GCLOUD: at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)
GCLOUD: at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
GCLOUD: at java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:199)
GCLOUD: at java.base/java.lang.reflect.Method.setAccessible(Method.java:193)
GCLOUD: at com.google.appengine.tools.development.StreamHandlerFactory.(StreamHandlerFactory.java:52)
GCLOUD: ... 12 more
from appengine-plugins.
As a side effect, these flags can be removed:
-Duse_jetty9_runtime=true -D--enable_all_permissions=true
as we are only on jetty9 now, and we do not have a security manager for java8, 11 and 17.
from appengine-plugins.
Confirmed that for command line mode, adding
--add-opens java.base/java.net=ALL-UNNAMED
--add-opens java.base/java.base/sun.net.www.protocol.http=ALL-UNNAMED
--add-opens java.base/java.base/sun.net.www.protocol.https=ALL-UNNAMED
allows the local devappserver to boot with JDK17
from appengine-plugins.
Ah, I see. I've added documentation for users to add the extra flags in GoogleCloudPlatform/app-maven-plugin#455, but we can definitely make the changes ourselves in core.
Long-term, it would be best if devserver did not modify JDK classes visibility...
from appengine-plugins.
Related Issues (20)
- Add support for binaries in the java11 standard buildpath HOT 3
- library icons are returning 404
- CloudSdk.getGCloudPath returns incorrect path for gcloud on PATH HOT 3
- Add error log to CommandExitException.toString() by default HOT 2
- Kokoro Windows test fails when installing latest managed Cloud SDK HOT 4
- Allow adding environment variables for SdkInstaller.newInstaller() methods
- Java 11 Mac test failures in ManagedCloudSdkTest HOT 1
- Kokoro Windows continuous test fails on HEAD due to an error when downgrading Cloud SDK HOT 1
- Latest Cloud SDK not in cloud storage bucket HOT 2
- Remove Java 7 support
- Fixing Flaky Test HOT 1
- Security Policy violation Binary Artifacts HOT 6
- Fix Kokoro windows build script from environment change
- Normalize labels based on the internal mapping
- "--add-opens" flags are being added to JDK 8 invocations HOT 5
- FilePermissionTest fails on release_build.sh HOT 1
- Fix `prepare-release.yml` CI job HOT 1
- fix failing kokoro-windows test
- Support for GAE Java21 is coming soon HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from appengine-plugins.