nazymko / powermock

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

Loading of apache.commons.logging.Log by MockClassLoader leads to 2 version of Log in classpath when tested code uses commons-logging #123

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create a class-to-be-tested which uses commons-logging
2. Run a JUnit test class, testing class-to-be-tested with PowerMock 
runner.

What is the expected output? What do you see instead?
Java.lang.ExceptionInitializerError error thrown.
... caused by LogConfigurationException

What version of the product are you using? On what operating system?
version:1.2.5
OS: Windows XP

Please provide any additional information below.

Original issue reported on code.google.com by mohammad...@gmail.com on 30 Jun 2009 at 9:26

GoogleCodeExporter commented 8 years ago
Try using @MockPolicy(JCLPolicy.class). Does that help?

Original comment by johan.ha...@gmail.com on 1 Jul 2009 at 12:25

GoogleCodeExporter commented 8 years ago

Original comment by johan.ha...@gmail.com on 22 Jul 2009 at 7:38