java.lang.RuntimeException: Unable to locate the App Engine agent. Please use dev_appserver, KickStart, or set the jvm flag: "-javaagent:<sdk_root>/lib/agent/appengine-agent.jar"
at com.google.appengine.tools.development.DevAppServerFactory.testAgentIsInstalled(DevAppServerFactory.java:102)
at com.google.appengine.tools.development.DevAppServerFactory.createDevAppServer(DevAppServerFactory.java:77)
at com.google.appengine.tools.development.DevAppServerFactory.createDevAppServer(DevAppServerFactory.java:38)
at com.google.appengine.tools.development.DevAppServerMain$StartAction.apply(DevAppServerMain.java:154)
at com.google.appengine.tools.util.Parser$ParseResult.applyArgs(Parser.java:48)
at com.google.appengine.tools.development.DevAppServerMain.<init>(DevAppServerMain.java:113)
at com.google.appengine.tools.development.DevAppServerMain.main(DevAppServerMain.java:89)
Caused by: java.lang.NoClassDefFoundError: com/google/appengine/tools/development/agent/AppEngineDevAgent
at com.google.appengine.tools.development.DevAppServerFactory.testAgentIsInstalled(DevAppServerFactory.java:98)
... 6 more
Caused by: java.lang.ClassNotFoundException: com.google.appengine.tools.development.agent.AppEngineDevAgent
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
... 7 more
I searched on google and they asked to change VM Argument. Those answers are not working with my eclipse. May be because those answers were for old versions of eclipse. Can anyone please help me with that?
Thanks in Advance.
Go to your project properties > java build path > edit your app engine sdk and configure it. Add the latest sdk there and problem will be solved.
I did the same thing, only the error still wouldn't go. However, you also need to remove all previously installed SDKs for everything to work.
I happened to get this problem over and over again, because my project's run configuration kept forgetting the -javaagent VM parameter. In Eclipse, in the menu bar, select Run -> Run Configurations ... -> Web Application (blue Google-g) -> select the run configuration that's making problems. Select Tab "Arguments". In the "VM arguments" textbox, add the following entry, configuring it to your unique path and unique Eclipse GAE SDK version:
-javaagent:C:\path-to-your-eclipse\plugins\com.google.appengine.eclipse.sdkbundle_1.6.4.v201203300216r37\appengine-java-sdk-1.6.4\lib\agent\appengine-agent.jar
Click "Apply" and then give "Run" a try.
This can also happen if there are two or more Google App Engine SDK libraries included in the build path. It happened to me where I had included the libs from my project while also including the ones installed via Eclipse.
The best way to check this is go to Project Properties > Java Build Path > Ensure that only one appengine-api-* (* is a wildcard for the filenames). The Eclipse installed SDK's are included under "App Engine SDK".
An image of what I'm talking about is below
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With