7

I have the guestbook appengine application working in the command line. For faster development I need to work in the IntelliJ IDEA IDE. But, I can't run the application. I guess the problem is configuration. How should I configure the IDE?

When I open the pom project and try to run it, IntelliJ shows Warning: App Engine facet not found in 'guestbook-war:war exploded' artifact. After I configure all the other options I can run the application. But, IDEA then shows:

com.google.apphosting.utils.config.AppEngineConfigException: Could not locate Z:\demos\google-app-engine\guestbook\classes\artifacts\guestbook\WEB-INF\appengine-web.xml
    at com.google.apphosting.utils.config.AppEngineWebXmlReader.getInputStream(AppEngineWebXmlReader.java:141)
    at com.google.apphosting.utils.config.AppEngineWebXmlReader.readAppEngineWebXml(AppEngineWebXmlReader.java:75)
    at com.google.apphosting.utils.config.EarHelper.readWebModule(EarHelper.java:171)
    at com.google.appengine.tools.development.ApplicationConfigurationManager$WarModuleConfigurationHandle.readConfiguration(ApplicationConfigurationManager.java:414)
    at com.google.appengine.tools.development.ApplicationConfigurationManager.<init>(ApplicationConfigurationManager.java:159)
    at com.google.appengine.tools.development.ApplicationConfigurationManager.newWarConfigurationManager(ApplicationConfigurationManager.java:101)
    at com.google.appengine.tools.development.ApplicationConfigurationManager.newWarConfigurationManager(ApplicationConfigurationManager.java:87)
    at com.google.appengine.tools.development.DevAppServerImpl.<init>(DevAppServerImpl.java:139)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
    at com.google.appengine.tools.development.DevAppServerFactory.doCreateDevAppServer(DevAppServerFactory.java:258)
    at com.google.appengine.tools.development.DevAppServerFactory.access$000(DevAppServerFactory.java:36)
    at com.google.appengine.tools.development.DevAppServerFactory$1.run(DevAppServerFactory.java:226)
    at com.google.appengine.tools.development.DevAppServerFactory$1.run(DevAppServerFactory.java:224)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.google.appengine.tools.development.DevAppServerFactory.createDevAppServer(DevAppServerFactory.java:224)
    at com.google.appengine.tools.development.DevAppServerFactory.createDevAppServer(DevAppServerFactory.java:94)
    at com.google.appengine.tools.development.DevAppServerMain$StartAction.apply(DevAppServerMain.java:265)
    at com.google.appengine.tools.util.Parser$ParseResult.applyArgs(Parser.java:48)
    at com.google.appengine.tools.development.DevAppServerMain.run(DevAppServerMain.java:219)
    at com.google.appengine.tools.development.DevAppServerMain.main(DevAppServerMain.java:210)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
Caused by: java.io.FileNotFoundException: Z:\demos\google-app-engine\guestbook\classes\artifacts\guestbook\WEB-INF\appengine-web.xml (El sistema no puede encontrar el archivo especificado)
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.<init>(FileInputStream.java:146)
    at java.io.FileInputStream.<init>(FileInputStream.java:101)
    at com.google.apphosting.utils.config.AppEngineWebXmlReader.getInputStream(AppEngineWebXmlReader.java:137)
    ... 27 more

com.google.apphosting.utils.config.AppEngineConfigException: Invalid configuration
    at com.google.appengine.tools.development.DevAppServerImpl.reportDeferredConfigurationException(DevAppServerImpl.java:466)
    at com.google.appengine.tools.development.DevAppServerImpl.doStart(DevAppServerImpl.java:226)
    at com.google.appengine.tools.development.DevAppServerImpl.access$000(DevAppServerImpl.java:47)
    at com.google.appengine.tools.development.DevAppServerImpl$1.run(DevAppServerImpl.java:213)
    at com.google.appengine.tools.development.DevAppServerImpl$1.run(DevAppServerImpl.java:211)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:211)
    at com.google.appengine.tools.development.DevAppServerMain$StartAction.apply(DevAppServerMain.java:277)
    at com.google.appengine.tools.util.Parser$ParseResult.applyArgs(Parser.java:48)
    at com.google.appengine.tools.development.DevAppServerMain.run(DevAppServerMain.java:219)
    at com.google.appengine.tools.development.DevAppServerMain.main(DevAppServerMain.java:210)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
Caused by: com.google.apphosting.utils.config.AppEngineConfigException: Invalid appengine-web.xml(Z:\demos\google-app-engine\guestbook\classes\artifacts\guestbook\WEB-INF/appengine-web.xml) - Could not locate D:\demos\google-app-engine\guestbook\classes\artifacts\guestbook\WEB-INF\appengine-web.xml
    at com.google.apphosting.utils.config.EarHelper.readWebModule(EarHelper.java:173)
    at com.google.appengine.tools.development.ApplicationConfigurationManager$WarModuleConfigurationHandle.readConfiguration(ApplicationConfigurationManager.java:414)
    at com.google.appengine.tools.development.ApplicationConfigurationManager.<init>(ApplicationConfigurationManager.java:159)
    at com.google.appengine.tools.development.ApplicationConfigurationManager.newWarConfigurationManager(ApplicationConfigurationManager.java:101)
    at com.google.appengine.tools.development.ApplicationConfigurationManager.newWarConfigurationManager(ApplicationConfigurationManager.java:87)
    at com.google.appengine.tools.development.DevAppServerImpl.<init>(DevAppServerImpl.java:139)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
    at com.google.appengine.tools.development.DevAppServerFactory.doCreateDevAppServer(DevAppServerFactory.java:258)
    at com.google.appengine.tools.development.DevAppServerFactory.access$000(DevAppServerFactory.java:36)
    at com.google.appengine.tools.development.DevAppServerFactory$1.run(DevAppServerFactory.java:226)
    at com.google.appengine.tools.development.DevAppServerFactory$1.run(DevAppServerFactory.java:224)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.google.appengine.tools.development.DevAppServerFactory.createDevAppServer(DevAppServerFactory.java:224)
    at com.google.appengine.tools.development.DevAppServerFactory.createDevAppServer(DevAppServerFactory.java:94)
    at com.google.appengine.tools.development.DevAppServerMain$StartAction.apply(DevAppServerMain.java:265)
    ... 8 more

IDEA tries to run the application from the classes directory, not from the target directory. Where can I configure this? I saw the classes directory and there isn't anything important in it. It only has folders and jars referred to by appengine, but nothing about the project. How can I configure this?

4

0 回答 0