Grails Warnings/Errors during run-app

放肆的年华 提交于 2019-12-11 02:16:26

问题


I'm currently seeing the warnings below when trying to run my Google App Engine/Grails test app in Eclipse.

  1. Warning, target causing name overwriting of name startLogging
  2. Warning: C:\Users\Some Person.grails\1.2.0\projects\test-grails\plugins\app-engine-0.8.8\grails-app\conf\spring not found.
  3. Warning: C:\Users\Some Person.grails\1.2.0\projects\test-grails\plugins\app-engine-0.8.8\grails-app\conf not found.
  4. Warning: C:\Users\Some Person.grails\1.2.0\projects\test-grails\plugins\app-engine-0.8.8\grails-app\conf\hibernate not found.

Here is the output from the console:

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.

I get this error after creating a Grails project with Spring Tools Suite (STS) and then installing the app-engine plugin "grails install-plugin app-engine". Before, I install the app-engine plugin the Grails project runs correctly.

Any ideas how to resolve these warnings?


回答1:


Warning 1 is caused by an issue in Grails' scripts. I had a look in JIRA but couldn't see a bug report relating to it. I do not think it causes any side effects.

Warnings 2,3 and 4 are referring to folders inside the app-engine plugin. Even though they are annoying they will not be doing any harm. The best thing you could do is raise a JIRA against the app-engine plugin requesting the author to add those folders to stop the warnings.




回答2:


You did create the app with grails create-app, right? That should've created conf (and hibernate and spring under it) folder under the grails project root.

If you're running through IDE, then it's possible that the IDE doesn't "see" the folders because they're empty which also would be an error in itself.




回答3:


As of writing, do not use Spring Tools Suite to create grails applications, because 1) it's still new and not mature enough, 2)it changes some of the default settings and causes many problems especially if you mix command line execution.

Use Netbeans or IntelliJ. For creating grails applications, I switched from Eclipse to Netbeans even though I'm a big supporter of Eclipse.



来源:https://stackoverflow.com/questions/2128544/grails-warnings-errors-during-run-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!