EdwinLi / powermock

Automatically exported from code.google.com/p/powermock
0 stars 0 forks source link

too much data exception from javassist #291

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.call mockstatic in test class
2. in the test class unmarshall xml using JAXB. JAXBContext.newInstance call 
fails with the exception. But initialization works fine with easymock and 
issues appear with powermock-easymock-junit extension.

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)
3. I tried with javassist 3.13 and 3.3 , all ended in same exception.

What is the expected output? What do you see instead?
expected output is business class which is mocked

What version of the product are you using? On what operating system?
powermock-easymock-junit-1.4.6.zip 

Please provide any additional information below.

Original issue reported on code.google.com by ssuyam...@gmail.com on 9 Nov 2010 at 5:34

GoogleCodeExporter commented 9 years ago

Original comment by johan.ha...@gmail.com on 15 Nov 2010 at 7:34