Closed GoogleCodeExporter closed 8 years ago
I hit this my first run out with Mockito, switching from EasyMock.
HttpServletRequest req = mock(HttpServletRequest.class);
error:
java.lang.ClassCastException:
$javax.servlet.http.HttpServletRequest$$EnhancerByMockitoWithCGLIB$$4720eeb0
cannot be cast to org.mockito.cglib.proxy.Factory
version:
mockito-core-1.8.5.jar
Original comment by p...@google.com
on 29 Jun 2012 at 10:28
I worked-around this by running tests from ant with no CLASSPATH previously set.
Original comment by p...@google.com
on 29 Jun 2012 at 10:42
@aces This is an issue with deep stubs. Besides the generic part of your list
will be erased at runtime, so mockito could not even infer the type of the type
that the list might hold.
@pmy I believe this might be an issue with your ant configuration. Ant might
probably use another classloader for this CLASSPATH.
Original comment by brice.du...@gmail.com
on 29 Jun 2012 at 11:29
Original comment by brice.du...@gmail.com
on 3 Sep 2012 at 10:00
Original comment by brice.du...@gmail.com
on 3 Sep 2012 at 10:11
Original issue reported on code.google.com by
aces....@gmail.com
on 25 Apr 2012 at 10:31