Grails/Groovy字符串错误

Grails/Groovy字符串错误,grails,groovy,Grails,Groovy,我发现以下错误,我似乎无法理解: | Error 2014-07-19 02:31:31,563 [http-bio-8080-exec-5] ERROR errors.GrailsExceptionResolver - MissingMethodException occurred when processing request: [POST] /FatcaOne_0/customer/upload - parameters: dataTypegrp: 3 fileTypegrp: 1 No

我发现以下错误,我似乎无法理解:

| Error 2014-07-19 02:31:31,563 [http-bio-8080-exec-5] ERROR errors.GrailsExceptionResolver  - MissingMethodException occurred when processing request: [POST] /FatcaOne_0/customer/upload - parameters:
dataTypegrp: 3
fileTypegrp: 1
No signature of method: java.lang.String.negative() is applicable for argument types: () values: []
Possible solutions: notify(), next(), normalize(), next(), normalize(). Stacktrace follows:
Message: No signature of method: java.lang.String.negative() is applicable for argument types: () values: []
Possible solutions: notify(), next(), normalize(), next(), normalize()
    Line | Method
->>  238 | doCall                         in com.twc.fatcaone.FileImportService$_$tt__excelIndividualFileUpload_closure16$$EOkQLTQ0
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|    162 | $tt__excelIndividualFileUpload in com.twc.fatcaone.FileImportService$$EOkQLTQ0
|    147 | upload . . . . . . . . . . . . in com.twc.fatcaone.CustomerController
|    198 | doFilter                       in grails.plugin.cache.web.filter.PageFragmentCachingFilter
|     63 | doFilter . . . . . . . . . . . in grails.plugin.cache.web.filter.AbstractFilter
|   1145 | runWorker                      in java.util.concurrent.ThreadPoolExecutor
|    615 | run . . . . . . . . . . . . .  in java.util.concurrent.ThreadPoolExecutor$Worker
^    744 | run                            in java.lang.Thread
此错误指向的代码行如下所示:

def (redFlags, yellowFlags) = processExistingIndividualRecordFlags(incomingRecord, recordThatAlreadyExists, params)

我在一个循环中反复调用这条线路,之前的一些调用并没有引起任何问题。所以我很困惑,我对一个
字符串做了什么/在哪里做了什么,这似乎是导致这个
字符串相关错误的原因。

当我试图从列表中删除一个字符串时,我有一次遇到了这个错误,我的“-”和“=”像这样倒过来:

listOfStrings =- stringTobeRemoved

processExistingIndividualRecordFlags的内容是什么?FileImportService正在尝试对不存在的字符串调用负值()。第238行附近发生了什么?正如@MartinHauner所说,我认为您在参数上使用了-,假设传入值的类型为number。有趣的是,运行时没有深入研究包含错误行的函数,而是选择调用包含错误行的函数的行。这就是为什么很难找到错误。