首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >由IllegalStateException引起:读写参数类型不一致

由IllegalStateException引起:读写参数类型不一致
EN

Stack Overflow用户
提问于 2011-08-17 11:28:16
回答 1查看 440关注 0票数 0

Groovy版本:1.8.1JVM: 1.6.0_26

Grails版本: 2.0.0M1

扩展抽象控制器的访问控制器出现错误。

代码语言:javascript
复制
class AbstractController {
    def grailsApplication
    def scaffold = true
    //def index = {redirect(action: "list", params: params)}
}

class VoterController extends AbstractController{
    //def scaffold = true
    def index = {
        println scaffold
        redirect(action: "list", params: params)
    }
}

错误日志:

代码语言:javascript
复制
2011-8-17 11:05:23 com.springsource.loaded.agent.SpringLoadedPreProcessor preProcess
严重: Unexpected problem transforming call sites
java.util.NoSuchElementException
    at java.util.StringTokenizer.nextToken(StringTokenizer.java:332)
    at com.springsource.loaded.MethodInvokerRewriter.ensureCacheIndexLoaded(MethodInvokerRewriter.java:180)
    at com.springsource.loaded.MethodInvokerRewriter.rewriteUsingCache(MethodInvokerRewriter.java:81)
    at com.springsource.loaded.TypeRegistry.methodCallRewriteUseCacheIfAvailable(TypeRegistry.java:728)
    at com.springsource.loaded.agent.SpringLoadedPreProcessor.preProcess(SpringLoadedPreProcessor.java:222)
    at com.springsource.loaded.agent.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:93)
    at sun.instrument.TransformerManager.transform(TransformerManager.java:169)
    at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:365)
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
    at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)

| Loading Grails 2.0.0.M1
| Configuring classpath
| Configuring classpath.
| Environment set to development
| Environment set to development.
| Environment set to development..
| Environment set to development...
| Environment set to development....
| Environment set to development.....
| Packaging Grails application
| Packaging Grails application.
| Packaging Grails application..
| Packaging Grails application...
| Packaging Grails application....
| Compiling 1 source files
| Compiling 1 source files.
| Compiling 1 source files..
| Compiling 1 source files...
| Compiling 1 source files....
| Compiling 1 source files.....
| Running Grails application
| Server running. Browse to http://localhost:8080/Vote
| Error 2011-08-17 11:06:19,609 ["http-bio-8080"-exec-1] ERROR errors.GrailsExceptionResolver  - Exception occurred when processing request: [GET] /Vote/voter
Stacktrace follows:
   Line | Method
->> 886 | runTask in java.util.concurrent.ThreadPoolExecutor$Worker
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|   908 | run     in     ''
^   662 | run . . in java.lang.Thread

Caused by IllegalStateException: Read and write parameter types are not the same
->> 886 | runTask in java.util.concurrent.ThreadPoolExecutor$Worker
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|   908 | run     in     ''
^   662 | run . . in java.lang.Thread
| Compiling 2 source files
| Compiling 2 source files.
| Compiling 2 source files..
| Compiling 2 source files...
| Compiling 2 source files....
| Compiling 2 source files.....
| Compiling 2 source files
| Compiling 2 source files.
| Error 2011-08-17 11:16:41,422 ["http-bio-8080"-exec-2] ERROR errors.GrailsExceptionResolver  - Exception occurred when processing request: [GET] /Vote/voter
Stacktrace follows:
   Line | Method
->> 886 | runTask in java.util.concurrent.ThreadPoolExecutor$Worker
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|   908 | run     in     ''
^   662 | run . . in java.lang.Thread

Caused by IllegalStateException: Read and write parameter types are not the same
->> 886 | runTask in java.util.concurrent.ThreadPoolExecutor$Worker
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|   908 | run     in     ''
^   662 | run . . in java.lang.Thread
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2011-11-17 05:21:27

这是在2.0 RC1中修复的2.0 M1中的错误

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/7087635

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档