在IntelliJ 13上运行Google AppEngine应用程序

时间:2014-06-21 16:24:06

标签: java google-app-engine maven intellij-idea intellij-13

我在命令行中使用了guestbook appengine application。为了加快开发速度,我需要在IntelliJ IDEA IDE中工作。但是,我无法运行该应用程序。我想问题是配置。我该如何配置IDE?

当我打开pom项目并尝试运行它时,IntelliJ显示Warning: App Engine facet not found in 'guestbook-war:war exploded' artifact。配置完所有其他选项后,我可以运行该应用程序。但是,IDEA然后显示:

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尝试从classes目录运行应用程序,而不是从target目录运行。我在哪里可以配置?我看到了classes目录,其中没有任何重要内容。它只有appengine引用的文件夹和jar,但项目没有任何内容。 我该如何配置?

0 个答案:

没有答案