cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

de.hybris.platform.util.logging.log4j2.HybrisLoggerContext cannot be cast to de.hybris.platform.util.logging.log4j2.HybrisLoggerContext

Former Member
0 Likes
484

Hi,

I am using PowerMockito to mock Registry.class, and wherever I am doing this, I am getting the below exception.

Caused by: java.lang.ClassCastException: de.hybris.platform.util.logging.log4j2.HybrisLoggerContext cannot be cast to de.hybris.platform.util.logging.log4j2.HybrisLoggerContext at de.hybris.platform.util.logging.HybrisLogger.setLevel(HybrisLogger.java:512) at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:753) at org.apache.log4j.PropertyConfigurator.parseCatsAndRenderers(PropertyConfigurator.java:672) at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:516) at de.hybris.platform.core.Log4JUtils.readConfig(Log4JUtils.java:103) at de.hybris.platform.core.Log4JUtils.startup(Log4JUtils.java:56) at de.hybris.platform.core.Registry.(Registry.java:80)

Can someone help me with resolution for this?

Please note that the JUNIT is running successfully in ee, but fails only when running through the ant command "ant unittests".

I am using powerMock version "1.6.1" and I am on Hybris 6.6

Thanks,

Accepted Solutions (0)

Answers (0)

Ask a Question