Pregunta

I was trying to run the verbatim example given here https://developers.google.com/web-toolkit/doc/latest/tutorial/appengine

This part deals with converting a gwt project into app engine project and deploying it. After doing all the steps in the Setup a project heading when I tested locally using ant devmode I get the following error ERROR shell failed in doStartUpServer method.

And in the terminal I get these errors.

devmode:

   [java] Unable to start embedded HTTP server
     [java] 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"
     [java]     at com.google.appengine.tools.development.DevAppServerFactory.testAgentIsInstalled(DevAppServerFactory.java:171)
     [java]     at com.google.appengine.tools.development.DevAppServerFactory.createDevAppServer(DevAppServerFactory.java:142)
     [java]     at com.google.appengine.tools.development.DevAppServerFactory.createDevAppServer(DevAppServerFactory.java:78)
     [java]     at com.google.appengine.tools.development.DevAppServerFactory.createDevAppServer(DevAppServerFactory.java:52)
     [java]     at com.google.appengine.tools.development.gwt.AppEngineLauncher.start(AppEngineLauncher.java:84)
     [java]     at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:509)
     [java]     at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1068)
     [java]     at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:811)
     [java]     at com.google.gwt.dev.DevMode.main(DevMode.java:311)
     [java] Caused by: java.lang.NoClassDefFoundError: com/google/appengine/tools/development/agent/AppEngineDevAgent
     [java]     at com.google.appengine.tools.development.DevAppServerFactory.testAgentIsInstalled(DevAppServerFactory.java:167)
     [java]     ... 8 more
     [java] Caused by: java.lang.ClassNotFoundException: com.google.appengine.tools.development.agent.AppEngineDevAgent
     [java]     at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
     [java]     at java.security.AccessController.doPrivileged(Native Method)
     [java]     at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
     [java]     at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
     [java]     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
     [java]     at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
     [java]     ... 9 more
¿Fue útil?

Solución

Fortunately, I was able to solve this problem. I copied appengine-agent.jar and appengine-agentimpl.jar manually into the WEB-INF/lib directory. Somehow ant devmode was not able to copy these jars into the lib folder. Don't know why this behaviour.

:)

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top