[jboss-jira] [JBoss JIRA] Updated: (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:45:01 EDT 2011


     [ https://issues.jboss.org/browse/JASSIST-142?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Elliot updated JASSIST-142:
----------------------------------

    Description: 
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}

  was:
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).




> 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