[jboss-jira] [JBoss JIRA] Commented: (JASSIST-142) Javassist throws a CannotCompileException on the org.codehaus.groovy.runtime.ArrayUtil class

Robert Elliot (JIRA) jira-events at lists.jboss.org
Tue May 24 04:47:00 EDT 2011


    [ https://issues.jboss.org/browse/JASSIST-142?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12603858#comment-12603858 ] 

Robert Elliot commented on JASSIST-142:
---------------------------------------

Added the stack trace for completeness.

> Javassist throws a CannotCompileException on the org.codehaus.groovy.runtime.ArrayUtil class
> --------------------------------------------------------------------------------------------
>
>                 Key: JASSIST-142
>                 URL: https://issues.jboss.org/browse/JASSIST-142
>             Project: Javassist
>          Issue Type: Bug
>    Affects Versions: 3.14.0.GA
>         Environment: N/A
>            Reporter: Robert Elliot
>            Assignee: Shigeru Chiba
>
> With Groovy 1.7.5 on the classpath the following snippet throws a CannotCompileException:
> {noformat}ClassPool classPool = new ClassPool();
> classPool.appendSystemPath();
> CtClass ctClass = classPool.get("org.codehaus.groovy.runtime.ArrayUtil");
> ctClass.toBytecode();{noformat}
> This is currently preventing me using PowerMock in a test case written in Groovy, which seems a shame.  It appears to be due to an artificial limit imposed in ClassPoolTail.copyStream(InputStream, OutputStream).
> Here is the stack trace:
> {noformat}Exception in thread "main" javassist.CannotCompileException: by java.io.IOException: too much data
> 	at javassist.CtClassType.toBytecode(CtClassType.java:1438)
> 	at javassist.CtClass.toBytecode(CtClass.java:1279)
> 	at Test.main(Test.java:13)
> Caused by: java.io.IOException: too much data
> 	at javassist.ClassPoolTail.copyStream(ClassPoolTail.java:440)
> 	at javassist.ClassPoolTail.writeClassfile(ClassPoolTail.java:290)
> 	at javassist.ClassPool.writeClassfile(ClassPool.java:637)
> 	at javassist.CtClassType.toBytecode(CtClassType.java:1426)
> 	... 7 more
> {noformat}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list