我正在运行grails 2.3.5 app。我尝试运行时出错
grails generate-all tao.marketing.blog.TrainerInfo --stacktrace
有没有人知道我在哪里看。看起来ST库导致了这个问题。我把它放在lib目录中。我是否需要在其他地方定义它?
Thomass-MacBook-Pro:tao thomas$ grails generate-all tao.marketing.blog.TrainerInfo --stacktrace
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=32m; support was removed in 8.0
| Packaging Grails application.....
2017-03-05 14:55:08,066 [main] INFO conf.Config - catalinaBase: null
2017-03-05 14:55:08,066 [main] INFO conf.Config - catalinaBase: null
2017-03-05 14:55:11,445 [main] INFO conf.Config - catalinaBase: null
2017-03-05 14:55:11,445 [main] INFO conf.Config - catalinaBase: null
| Error Error loading plugin manager: Unable to locate constructor with Class parameter for class org.codehaus.groovy.grails.commons.DefaultGrailsServiceClass (NOTE: Stack trace has been filtered. Use --verbose to see entire trace.)
java.lang.RuntimeException: Unable to locate constructor with Class parameter for class org.codehaus.groovy.grails.commons.DefaultGrailsServiceClass
at _GrailsBootstrap_groovy$_run_closure1.doCall(_GrailsBootstrap_groovy:31)
at org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:133)
at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16_closure18.doCall(GantBinding.groovy:185)
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 org.codehaus.gant.GantMetaClass.processClosure(GantMetaClass.java:81)
at org.codehaus.gant.GantMetaClass.processArgument(GantMetaClass.java:95)
at org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:128)
at _GrailsGenerate_groovy$_run_closure1.doCall(_GrailsGenerate_groovy:36)
at org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:133)
at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16_closure18.doCall(GantBinding.groovy:185)
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 org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:133)
at GenerateAll$_run_closure1.doCall(GenerateAll:42)
at org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:133)
at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16_closure18.doCall(GantBinding.groovy:185)
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$0.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)
Caused by: java.lang.reflect.InvocationTargetException
... 39 more
Caused by: java.lang.NoClassDefFoundError: org/stringtemplate/v4/ST
... 39 more
Caused by: java.lang.ClassNotFoundException: org.stringtemplate.v4.ST
... 39 more
| Error Error loading plugin manager: Unable to locate constructor with Class parameter for class org.codehaus.groovy.grails.commons.DefaultGrailsServiceClass
Thomass-MacBook-Pro:tao thomas$
答案 0 :(得分:0)
我必须在BuildConfig.groovy中定义它。然后它运作得很好!
"<-.*"