Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/cassandra/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Grails datasource.groovy池属性值(maxActive、intialSize…)需要硬编码_Grails_Groovy_Datasource - Fatal编程技术网

Grails datasource.groovy池属性值(maxActive、intialSize…)需要硬编码

Grails datasource.groovy池属性值(maxActive、intialSize…)需要硬编码,grails,groovy,datasource,Grails,Groovy,Datasource,由于我已经从Amazon Elastic Beanstalk环境变量中获取了我的数据库主机名、名称、用户名和密码,我自信地尝试对DBCP池属性(maxActive、initialSize,…)执行同样的操作: (我当前的用例是AWS,但是这个问题与AWS无关) 注意在数据源的属性闭包中使用了rdsPoolProps 当我构建战争时,我会遇到以下错误: | Error Error packaging application: Error loading DataSource.groovy: No

由于我已经从Amazon Elastic Beanstalk环境变量中获取了我的数据库主机名、名称、用户名和密码,我自信地尝试对DBCP池属性(maxActive、initialSize,…)执行同样的操作:

(我当前的用例是AWS,但是这个问题与AWS无关)

注意在数据源的
属性
闭包中使用了
rdsPoolProps

当我构建战争时,我会遇到以下错误:

| Error Error packaging application: Error loading DataSource.groovy: No signature of method: groovy.util.ConfigObject.parse() is applicable for argument types: (null) values: [null]
Possible solutions: values(), merge(groovy.util.ConfigObject), take(int), plus(java.util.Collection), use([Ljava.lang.Object;), plus(java.util.Map) (NOTE: Stack trace has been filtered. Use --verbose to see entire trace.)
org.codehaus.groovy.grails.compiler.PackagingException: Error loading DataSource.groovy: No signature of method: groovy.util.ConfigObject.parse() is applicable for argument types: (null) values: [null]
Possible solutions: values(), merge(groovy.util.ConfigObject), take(int), plus(java.util.Collection), use([Ljava.lang.Object;), plus(java.util.Map)
    at _GrailsPackage$_run_closure2.doCall(_GrailsPackage.groovy:48)
    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 _GrailsWar$_run_closure2.doCall(_GrailsWar.groovy:41)
    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 War$_run_closure1.doCall(War.groovy:38)
    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: groovy.lang.MissingMethodException: No signature of method: groovy.util.ConfigObject.parse() is applicable for argument types: (null) values: [null]
Possible solutions: values(), merge(groovy.util.ConfigObject), take(int), plus(java.util.Collection), use([Ljava.lang.Object;), plus(java.util.Map)
    at DataSource.run(DataSource.groovy:13)
    ... 41 more

有没有简单的解决方法?我想做一些负载测试,而不必在每次调整时打包和重新部署。

你是在问如何在运行时更改数据源属性,以便可以尝试不同的设置吗?只有在应用程序启动时。问题实际上是“数据源”闭包中的“属性”闭包。@florent blanvillain你能发布完整的设置吗使用--stracktrace时出错,如错误消息Done中所示。谢谢你的关注。当未设置环境变量时,它不会编译,这是正常的,因为我希望在应用程序启动时获取值。
| Error Error packaging application: Error loading DataSource.groovy: No signature of method: groovy.util.ConfigObject.parse() is applicable for argument types: (null) values: [null]
Possible solutions: values(), merge(groovy.util.ConfigObject), take(int), plus(java.util.Collection), use([Ljava.lang.Object;), plus(java.util.Map) (NOTE: Stack trace has been filtered. Use --verbose to see entire trace.)
org.codehaus.groovy.grails.compiler.PackagingException: Error loading DataSource.groovy: No signature of method: groovy.util.ConfigObject.parse() is applicable for argument types: (null) values: [null]
Possible solutions: values(), merge(groovy.util.ConfigObject), take(int), plus(java.util.Collection), use([Ljava.lang.Object;), plus(java.util.Map)
    at _GrailsPackage$_run_closure2.doCall(_GrailsPackage.groovy:48)
    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 _GrailsWar$_run_closure2.doCall(_GrailsWar.groovy:41)
    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 War$_run_closure1.doCall(War.groovy:38)
    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: groovy.lang.MissingMethodException: No signature of method: groovy.util.ConfigObject.parse() is applicable for argument types: (null) values: [null]
Possible solutions: values(), merge(groovy.util.ConfigObject), take(int), plus(java.util.Collection), use([Ljava.lang.Object;), plus(java.util.Map)
    at DataSource.run(DataSource.groovy:13)
    ... 41 more