我刚刚开始使用Grails 2.4.0,并且在通过脚手架创建对象时遇到了一个奇怪的错误。第一个创建工作正常,但每次我尝试在第一次创建后转到创建操作时,我都会遇到此异常:
Message: fromIndex = -1
Line | Method
->> 620 | <init> in java.util.SubList
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 775 | <init> in java.util.RandomAccessSubList
| 484 | subList . . . . . . . in java.util.AbstractList
| 251 | doAppend in org.apache.log4j.AppenderSkeleton
| 66 | appendLoopOnAppenders in org.apache.log4j.helpers.AppenderAttachableImpl
| 206 | callAppenders in org.apache.log4j.Category
| 391 | forcedLog . . . . . . in ''
| 856 | log in ''
| 192 | logMessage . . . . . in org.slf4j.impl.GrailsLog4jLoggerAdapter
| 167 | error in ''
| 213 | error . . . . . . . . in org.apache.commons.logging.impl.SLF4JLog
| 189 | doFilter in grails.plugin.cache.web.filter.PageFragmentCachingFilter
| 63 | doFilter . . . . . . in grails.plugin.cache.web.filter.AbstractFilter
| 53 | doFilter in grails.plugin.springsecurity.web.filter.GrailsAnonymousAuthenticationFilter
| 49 | doFilter . . . . . . in grails.plugin.springsecurity.web.authentication.RequestHolderAuthenticationFilter
| 82 | doFilter in grails.plugin.springsecurity.web.authentication.logout.MutableLogoutFilter
| 1145 | runWorker . . . . . . in java.util.concurrent.ThreadPoolExecutor
| 615 | run in java.util.concurrent.ThreadPoolExecutor$Worker
^ 744 | run . . . . . . . . . in java.lang.Thread
| Error 2014-05-26 13:24:28,800 [http-bio-8080-exec-2] ERROR [/PantryWizardAdmin].[default] - Servlet.service() for servlet [default] in context with path [/PantryWizardAdmin] threw exception [org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.IndexOutOfBoundsException: fromIndex = -1] with root cause
Message: fromIndex = -1
Line | Method
->> 620 | <init> in java.util.SubList
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 775 | <init> in java.util.RandomAccessSubList
| 484 | subList . . . . . . . in java.util.AbstractList
| 251 | doAppend in org.apache.log4j.AppenderSkeleton
| 66 | appendLoopOnAppenders in org.apache.log4j.helpers.AppenderAttachableImpl
| 206 | callAppenders in org.apache.log4j.Category
| 391 | forcedLog . . . . . . in ''
| 856 | log in ''
| 192 | logMessage . . . . . in org.slf4j.impl.GrailsLog4jLoggerAdapter
| 167 | error in ''
| 213 | error . . . . . . . . in org.apache.commons.logging.impl.SLF4JLog
| 189 | doFilter in grails.plugin.cache.web.filter.PageFragmentCachingFilter
| 63 | doFilter . . . . . . in grails.plugin.cache.web.filter.AbstractFilter
| 53 | doFilter in grails.plugin.springsecurity.web.filter.GrailsAnonymousAuthenticationFilter
| 49 | doFilter . . . . . . in grails.plugin.springsecurity.web.authentication.RequestHolderAuthenticationFilter
| 82 | doFilter in grails.plugin.springsecurity.web.authentication.logout.MutableLogoutFilter
| 1145 | runWorker . . . . . . in java.util.concurrent.ThreadPoolExecutor
| 615 | run in java.util.concurrent.
ThreadPoolExecutor$Worker
^ 744 | run . . . . . . . . . in java.lang.Thread
我尝试创建的任何对象都会发生这种情况。第一个工作,第二个工作,任何后续工作总是失败,我最终不得不重新启动服务器。