Open GoogleCodeExporter opened 8 years ago
Issue 291 has been merged into this issue.
Original comment by johan.ha...@gmail.com
on 15 Nov 2010 at 7:34
Hm, which class is it that causes the exception?
Original comment by johan.ha...@gmail.com
on 15 Nov 2010 at 7:34
Hi,
Please see the log and the test attached. Test will give an idea about what I
am trying. In my application I use the XML data as input. Thats why I
instantiate JAXB instance in the test class.
Thanks,
Sundar
log4j:ERROR Could not instantiate appender named "stat".
java.lang.RuntimeException: javassist.CannotCompileException: by
java.io.IOException: too much data
at org.powermock.core.classloader.MockClassLoader.loadUnmockedClass(MockClassLoader.java:188)
at org.powermock.core.classloader.MockClassLoader.loadModifiedClass(MockClassLoader.java:148)
at org.powermock.core.classloader.DeferSupportingClassLoader.loadClass(DeferSupportingClassLoader.java:65)
at java.lang.ClassLoader.loadClass(ClassLoader.java:618)
at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:99)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:600)
at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:144)
at javax.xml.bind.ContextFinder.find(ContextFinder.java:297)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:383)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:348)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:255)
at com.lincoln.abob.business.processors.TooMuchDataErrorProof.getTXWrapper(TooMuchDataErrorProof.java:93)
at com.lincoln.abob.business.processors.TooMuchDataErrorProof.testProcessHistoricAccountValues(TooMuchDataErrorProof.java:65)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:600)
at org.junit.internal.runners.TestMethod.invoke(TestMethod.java:59)
at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl$PowerMockJUnit44MethodRunner.runTestMethod(PowerMockJUnit44RunnerDelegateImpl.java:322)
at org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:79)
at org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters(MethodRoadie.java:87)
at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl$PowerMockJUnit44MethodRunner.executeTest(PowerMockJUnit44RunnerDelegateImpl.java:309)
at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl$PowerMockJUnit44MethodRunner.runBeforesThenTestThenAfters(PowerMockJUnit44RunnerDelegateImpl.java:297)
at org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:77)
at org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:42)
at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl.invokeTestMethod(PowerMockJUnit44RunnerDelegateImpl.java:222)
at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl.runMethods(PowerMockJUnit44RunnerDelegateImpl.java:161)
at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl$1.run(PowerMockJUnit44RunnerDelegateImpl.java:135)
at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27)
at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37)
at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl.run(PowerMockJUnit44RunnerDelegateImpl.java:133)
at org.powermock.modules.junit4.common.internal.impl.JUnit4TestSuiteChunkerImpl.run(JUnit4TestSuiteChunkerImpl.java:112)
at org.powermock.modules.junit4.common.internal.impl.AbstractCommonPowerMockRunner.run(AbstractCommonPowerMockRunner.java:57)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:45)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: javassist.CannotCompileException: by java.io.IOException: too much
data
at javassist.CtClassType.toBytecode(CtClassType.java:1441)
at javassist.CtClass.toBytecode(CtClass.java:1277)
at org.powermock.core.classloader.MockClassLoader.loadUnmockedClass(MockClassLoader.java:185)
... 41 more
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:634)
at javassist.CtClassType.toBytecode(CtClassType.java:1429)
... 43 more
Original comment by ssuyam...@gmail.com
on 15 Nov 2010 at 3:28
Attachments:
Hi Johan,
Do you have any update or suggestion on this issue?
Thanks,
Sundar
Original comment by ssuyam...@gmail.com
on 17 Nov 2010 at 3:08
Unfortunately not :/ Perhaps you can try with the latest version of Javassist?
Original comment by johan.ha...@gmail.com
on 27 Dec 2010 at 1:02
This is a bug with javassist: https://issues.jboss.org/browse/JASSIST-142
It is fixed as of 3.15.0-GA.
If you're using Maven, the dependency now uses the groupID "org.javassist"
instead of "javassist" as it did in older versions.
<dependency>
<groupId>org.javassist</groupId>
<artifactId>javassist</artifactId>
<version>3.15.0-GA</version>
<scope>test</scope>
</dependency>
Original comment by philvar...@gmail.com
on 31 Aug 2011 at 6:16
PowerMock 1.4.10 depends on Javassist 3.15
Original comment by johan.ha...@gmail.com
on 31 Aug 2011 at 6:51
Original issue reported on code.google.com by
ssuyam...@gmail.com
on 9 Nov 2010 at 4:58