问题
I am developing a project with Google App Engine in Eclipse. Three days ago, everything worked fine. But I do not what I do but now I cant to run project in debug mode in local host.
When I run it I get the following error:
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.appengine.tools.development.StreamHandlerFactory (file:/Users/gallavie/Library/Application%20Support/google-cloud-tools-java/managed-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)
WARNING: Please consider reporting this to the maintainers of com.google.appengine.tools.development.StreamHandlerFactory
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
java.lang.RuntimeException: Unable to create a DevAppServer
at com.google.appengine.tools.development.DevAppServerFactory.doCreateDevAppServer(DevAppServerFactory.java:369)
at com.google.appengine.tools.development.DevAppServerFactory.createDevAppServer(DevAppServerFactory.java:301)
at com.google.appengine.tools.development.DevAppServerMain$StartAction.apply(DevAppServerMain.java:383)
at com.google.appengine.tools.util.Parser$ParseResult.applyArgs(Parser.java:45)
at com.google.appengine.tools.development.DevAppServerMain.run(DevAppServerMain.java:257)
at com.google.appengine.tools.development.DevAppServerMain.main(DevAppServerMain.java:248)
Caused by: java.lang.ExceptionInInitializerError
at com.google.appengine.tools.development.DevAppServerImpl.<init>(DevAppServerImpl.java:124)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481)
at com.google.appengine.tools.development.DevAppServerFactory.doCreateDevAppServer(DevAppServerFactory.java:354)
... 5 more
Caused by: java.lang.IllegalStateException: java.lang.NoSuchMethodException: java.net.SocksSocketImpl.<init>()
at com.google.appengine.tools.development.DevSocketImplFactory.<clinit>(DevSocketImplFactory.java:76)
... 12 more
Caused by: java.lang.NoSuchMethodException: java.net.SocksSocketImpl.<init>()
at java.base/java.lang.Class.getConstructor0(Class.java:3350)
at java.base/java.lang.Class.getDeclaredConstructor(Class.java:2554)
at com.google.appengine.tools.development.DevSocketImplFactory.<clinit>(DevSocketImplFactory.java:72)
... 12 more
How can I fix this?
thank you for replay when i downgrade to java 12 to java 8 i get this error
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.appengine.tools.development.StreamHandlerFactory (file:/Users/gallavie/Library/Application%20Support/google-cloud-tools-java/managed-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)
WARNING: Please consider reporting this to the maintainers of com.google.appengine.tools.development.StreamHandlerFactory
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Dec 14, 2019 7:34:01 PM com.google.appengine.tools.development.SystemPropertiesManager setSystemProperties
INFO: Overwriting system property key 'java.util.logging.config.file', value '/Users/gallavie/Library/Application Support/google-cloud-tools-java/managed-cloud-sdk/LATEST/google-cloud-sdk/platform/google_appengine/google/appengine/tools/java/config/sdk/logging.properties' with value 'WEB-INF/logging.properties' from '/Users/gallavie/Documents/workspaces/eclipse/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/Darimpo/WEB-INF/appengine-web.xml'
java.lang.NullPointerException
at java.base/java.util.concurrent.ConcurrentHashMap.putVal(ConcurrentHashMap.java:1011)
at java.base/java.util.concurrent.ConcurrentHashMap.put(ConcurrentHashMap.java:1006)
at java.base/java.util.Properties.put(Properties.java:1316)
at java.base/java.util.Collections$CheckedMap.put(Collections.java:3638)
at com.google.appengine.tools.development.SharedMain.setTimeZone(SharedMain.java:183)
at com.google.appengine.tools.development.SharedMain.postServerActions(SharedMain.java:152)
at com.google.appengine.tools.development.DevAppServerMain$StartAction.apply(DevAppServerMain.java:398)
at com.google.appengine.tools.util.Parser$ParseResult.applyArgs(Parser.java:45)
at com.google.appengine.tools.development.DevAppServerMain.run(DevAppServerMain.java:257)
at com.google.appengine.tools.development.DevAppServerMain.main(DevAppServerMain.java:248)
回答1:
You are using Google App Engine in a version that does not work with Java 13.
The root cause is:
Caused by: java.lang.NoSuchMethodException: java.net.SocksSocketImpl.<init>()
This means java.net.SocksSocketImp
exists but does not have a default constructor (constructor without parameters). The Google App Engine (com.google.appengine.tools.development
) was compiled with java.net.SocksSocketImp
with default constructor, but is now executed with java.net.SocksSocketImp
without default constructor. In Java 12 and lower the system library contains java.net.SocksSocketImp
with default constructor, but in Java 13 java.net.SocksSocketImp
has no default constructor anymore.
来源:https://stackoverflow.com/questions/59332691/google-app-engine-project-not-running-in-debug-mode