[Esapi-user] ESAPI Logger Integration

Smita Sinha ssinha.airbiquity at gmail.com
Wed Nov 5 22:27:47 UTC 2014


Hello,

I have a rest easy application which has a logging component based on
Log4J. I am trying to change that to ESAPI logger. I integrated it but when
i try to build it with maven all my junit test fails with following error :

Attempting to load ESAPI.properties via the classpath.
SUCCESSFULLY LOADED ESAPI.properties via the CLASSPATH from '/ (root)'
using current thread context class loader!
Attempting to load validation.properties via the classpath.
SUCCESSFULLY LOADED validation.properties via the CLASSPATH from '/ (root)'
using current thread context class loader!

java.lang.ClassFormatError: Absent Code attribute in method that is not
native or abstract in class file javax/servlet/ServletException
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:791)
    at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
    at java.lang.Class.getDeclaredMethods0(Native Method)
    at java.lang.Class.privateGetDeclaredMethods(Class.java:2442)
    at java.lang.Class.getMethod0(Class.java:2685)
    at java.lang.Class.getMethod(Class.java:1620)
    at org.owasp.esapi.util.ObjFactory.make(ObjFactory.java:77)
    at org.owasp.esapi.ESAPI.httpUtilities(ESAPI.java:121)
    at org.owasp.esapi.ESAPI.currentRequest(ESAPI.java:70)
    at org.owasp.esapi.reference.Log4JLogger.log(Log4JLogger.java:434)
    at org.owasp.esapi.reference.Log4JLogger.debug(Log4JLogger.java:184)
    at com.test.common.logging.impl.UserLogImpl.debug(UserLogImpl.java:120)

Can you please help me fix this problem.

Thanks,
Smita
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.owasp.org/pipermail/esapi-user/attachments/20141105/c7e2c1a0/attachment.html>


More information about the Esapi-user mailing list