次の手順で、Grails1.3.7アプリをGrails2.2にアップグレードしました。
GRAILS_HOME
変数をGrails2.2の場所に設定します- この場所を参照するようにパスを編集しました
- 走った
grails upgrade
application.properties
すべてのプラグイン参照を削除するように編集- プラグインを参照するためのクロージャー
Build.config
を作成するように編集しましたplugins
- 走った
grails clean
- 走った
grails compile
手順7は、次のエラーで失敗します。
C:\code\querium\AppServer-grails-2>grails compile --stacktrace
| Compiling 98 source files
| Warning The [executeSafely] action accepts a parameter of type [groovy.lang.Closure] which has not been marked with @V
alidateable. Data binding will still be applied to this command object but the instance will not be validateable.
def executeSafely(Closure c) {
^
| Warning The [executeSafely] action accepts a parameter of type [groovy.lang.Closure] which has not been marked with @V
alidateable. Data binding will still be applied to this command object but the instance will not be validateable.
def executeSafely(Closure c) {
^
| Warning The [increment] action accepts a parameter of type [java.util.Map] which has not been marked with @Validateabl
e. Data binding will still be applied to this command object but the instance will not be validateable.
def increment(Map map, String t, int index) {
^
| Compiling 98 source files.
| Error Fatal error during compilation org.apache.tools.ant.BuildException: Compilation Failed (NOTE: Stack trace has be
en filtered. Use --verbose to see entire trace.)
java.lang.NullPointerException
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.codehaus.gant.GantBuilder.invokeMethod(GantBuilder.java:99)
at _GrailsCompile_groovy$_run_closure2_closure6_closure7.doCall(_GrailsCompile_groovy:48)
at _GrailsCompile_groovy$_run_closure2_closure6_closure7.doCall(_GrailsCompile_groovy)
at _GrailsCompile_groovy.withCompilationErrorHandling(_GrailsCompile_groovy:69)
at _GrailsCompile_groovy.this$4$withCompilationErrorHandling(_GrailsCompile_groovy)
at org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:133)
at org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:168)
at _GrailsCompile_groovy$_run_closure2_closure6.doCall(_GrailsCompile_groovy:47)
at _GrailsCompile_groovy$_run_closure2_closure6.doCall(_GrailsCompile_groovy)
at org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:133)
at _GrailsCompile_groovy$_run_closure2.doCall(_GrailsCompile_groovy:46)
at org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:133)
at org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:133)
at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16_closure18.doCall(GantBinding.groovy:1
85)
at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16_closure18.doCall(GantBinding.groovy)
at org.codehaus.gant.GantBinding.withTargetEvent(GantBinding.groovy:90)
at org.codehaus.gant.GantBinding.this$4$withTargetEvent(GantBinding.groovy)
at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16.doCall(GantBinding.groovy:185)
at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16.doCall(GantBinding.groovy)
at gant.Gant$_dispatch_closure5.doCall(Gant.groovy:381)
at gant.Gant$_dispatch_closure7.doCall(Gant.groovy:415)
at gant.Gant$_dispatch_closure7.doCall(Gant.groovy)
at gant.Gant.withBuildListeners(Gant.groovy:427)
at gant.Gant.this$2$withBuildListeners(Gant.groovy)
at gant.Gant$this$2$withBuildListeners.callCurrent(Unknown Source)
at gant.Gant.dispatch(Gant.groovy:415)
at gant.Gant.this$2$dispatch(Gant.groovy)
at gant.Gant.invokeMethod(Gant.groovy)
at gant.Gant.executeTargets(Gant.groovy:591)
at gant.Gant.executeTargets(Gant.groovy:590)
| Error Fatal error during compilation org.apache.tools.ant.BuildException: Compilation Failed
実際のエラーがどこにあるのか、そしてそれを修正する方法がわかりません。警告を修正する正当な理由がない限り、警告を無視してかまいません。(もしそうなら、どのように?)