[Esapi-user] (no subject)

J Noel j1noel at yahoo.com
Thu Jun 19 18:40:36 UTC 2014


I am getting the exception below on my application. I am using both log4J and ESAPI.Logger. Here's line # 69 in the class:
private final org.owasp.esapi.Logger logger = ESAPI.getLogger(this.getClass().getName());. It's failing here.

action.ScheduledEventAction]: Constructor threw exception; nested exception is java.lang.ClassCastException: org.apache.log4j.Logger
    at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:141)
    at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:72)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:939)
    ... 153 more
Caused by: java.lang.ClassCastException: org.apache.log4j.Logger
    at org.owasp.esapi.reference.Log4JLogFactory.getLogger(Log4JLogFactory.java:88)
    at org.owasp.esapi.ESAPI.getLogger(ESAPI.java:154)
    at xxx.xxx.xxx.xxx.xxx.action.ScheduledEventAction.<init>(ScheduledEventAction.java:69)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
    at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:126)
    ... 155 more

Thank you for any help.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.owasp.org/pipermail/esapi-user/attachments/20140619/8331599d/attachment.html>


More information about the Esapi-user mailing list