【问题标题】:Grails Warnings/Errors during run-app运行应用程序期间的 Grails 警告/错误
【发布时间】:2010-01-24 19:58:59
【问题描述】:

当我尝试在 Eclipse 中运行我的 Google App Engine/Grails 测试应用程序时,我目前看到以下警告。

  1. 警告,目标导致名称覆盖 startLogging
  2. 警告:找不到 C:\Users\Some Person.grails\1.2.0\projects\test-grails\plugins\app-engine-0.8.8\grails-app\conf\spring。
  3. 警告:找不到 C:\Users\Some Person.grails\1.2.0\projects\test-grails\plugins\app-engine-0.8.8\grails-app\conf。
  4. 警告:找不到 C:\Users\Some Person.grails\1.2.0\projects\test-grails\plugins\app-engine-0.8.8\grails-app\conf\hibernate。

这是控制台的输出:

Base Directory: C:\Users\Some Person\workspace\test-grails
Resolving dependencies...
Dependencies resolved in 1160ms.
Running script C:\grails-1.2.0\scripts\RunApp.groovy
Environment set to development
Warning, target causing name overwriting of name startLogging
  [groovyc] Compiling 1 source file to C:\Users\Some Person\workspace\test-grails\web-app\WEB-INF\classes
     [copy] Copying 1 file to C:\Users\Some Person\.grails\1.2.0\projects\test-grails
     [copy] Copying 1 file to C:\Users\Some Person\workspace\test-grails\web-app\WEB-INF
Configuring persistence for AppEngine
     [copy] Warning: C:\Users\Some Person\.grails\1.2.0\projects\test-grails\plugins\app-engine-0.8.8\grails-app\conf\spring not found.
     [copy] Warning: C:\Users\Some Person\.grails\1.2.0\projects\test-grails\plugins\app-engine-0.8.8\grails-app\conf not found.
     [copy] Warning: C:\Users\Some Person\.grails\1.2.0\projects\test-grails\plugins\app-engine-0.8.8\grails-app\conf\hibernate not found.

在使用 Spring Tools Suite (STS) 创建 Grails 项目并安装应用程序引擎插件“grails install-plugin app-engine”后出现此错误。之前,我安装了 Grails 项目运行正常的 app-engine 插件。

任何想法如何解决这些警告?

【问题讨论】:

  • 你试过把它放到另一个目录吗?也许它在“Taylor Leese”中的空间有问题......
  • 不,我没有尝试过,但我在 ..\grails-app 中也没有“conf”目录。我很确定这是问题所在,但我不确定如何创建它们。

标签: java eclipse google-app-engine grails sts-springsourcetoolsuite


【解决方案1】:

警告 1 是由 Grails 脚本中的问题引起的。我查看了 JIRA,但看不到与之相关的错误报告。我认为它不会引起任何副作用。

警告 2,3 和 4 是指应用引擎插件中的文件夹。 即使它们很烦人,它们也不会造成任何伤害。 您可以做的最好的事情是针对应用引擎插件提出 JIRA,要求作者添加这些文件夹以停止警告。

【讨论】:

  • 谢谢。我会考虑为它记录一个 JIRA 项目。
【解决方案2】:

您确实使用grails create-app 创建了应用程序,对吧?那应该已经在 grails 项目根目录下创建了conf(以及它下面的hibernatespring)文件夹。

如果您通过 IDE 运行,那么 IDE 可能不会“看到”文件夹,因为它们是空的,这本身也是一个错误。

【讨论】:

  • 我使用 Spring Tools Suite 创建了 grails 项目。该项目运行良好,直到我安装了 appengine 插件“grails install-plugin app-engine”。这是我开始看到上面的警告的时候。
【解决方案3】:

在撰写本文时,不要使用 Spring Tools Suite 来创建 grails 应用程序,因为 1)它还很新,还不够成熟,2)它会更改一些默认设置并导致很多问题,尤其是在混合命令行执行时。

使用 Netbeans 或 IntelliJ。为了创建 grails 应用程序,我从 Eclipse 切换到了 Netbeans,尽管我是 Eclipse 的大力支持者。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-02-12
    • 2014-07-14
    • 1970-01-01
    相关资源
    最近更新 更多