Java Mailing List Archive

http://www.gg3721.com/

Home » user.jmock »

[jmock-user] Error attempting to mock concrete class

Sam

2009-10-02


Author LoginPost Reply
Hi,

I'm receiving the error below while attempting to mock java.util.Logger. I've
run across this error before and wasn't able to find an answer to the problem
but somehow, during the course of adding/removing jar's to my IDE's classpath,
the problem went away. However the problem has appeared again and this time I'm
unable to replicate the solution using the previous 'method'.

Any thoughts would be greatly appreciated.

Cheers,
Sam

java.lang.NullPointerException
at net.sf.cglib.proxy.EnhancerEmitter$4.getMethods
(EnhancerEmitter.java:407)
at net.sf.cglib.proxy.NoOpGenerator.generate
(NoOpGenerator.java:69)
at net.sf.cglib.proxy.EnhancerEmitter.emitMethods
(EnhancerEmitter.java:431)
at net.sf.cglib.proxy.EnhancerEmitter.<init>
(EnhancerEmitter.java:172)
atnet.sf.cglib.proxy.Enhancer.generateClass
(Enhancer.java:344)
atnet.sf.cglib.core.DefaultGeneratorStrategy.generate
(DefaultGeneratorStrategy.java:63)
atnet.sf.cglib.core.AbstractClassGenerator.create
(AbstractClassGenerator.java:190)
at net.sf.cglib.proxy.Enhancer.createHelper (Enhancer.java:330)
at net.sf.cglib.proxy.Enhancer.createClass (Enhancer.java:278)
at
org.jmock.lib.legacy.ClassImposteriser.createProxyClass
(ClassImposteriser.java:122)
at org.jmock.lib.legacy.ClassImposteriser.imposterise
(ClassImposteriser.java:65)
at org.jmock.Mockery.mock(Mockery.java:139)
at org.jmock.Mockery.mock(Mockery.java:120)
          at
org.jmock.integration.junit3.MockObjectTestCase.mock
(MockObjectTestCase.java:107)



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

  http://xircles.codehaus.org/manage_email


©2008 gg3721.com - Jax Systems, LLC, U.S.A.