1

I am using esapi 2.1.0 jar in our application for certain input validation.

It is working perfectly in development environment where we are using Apache Tomcat.

In SIT we have WebSphere 7 and jdk 1.6. Initially it was throwing an exception stating ESAPI.properties cannot be loaded, then I added it to the class path and now an error is being thrown:

Caused by:java.lang.NoClassDefFoundError : org.owasp.esapi.reference.DefaultValidator(initialization failure) 

The esapi 2.1.0 jar is available in classpath.

Gas
  • 17,601
  • 4
  • 46
  • 93
  • 1
    Try to change class load policy, parent last. – sozkul Jul 20 '16 at 10:15
  • 1
    Hi Salih ...thanks for your comments ... My doubt is that is there any version comparability issue...bcoz its working perfectly in dev env – Pavithran R Jul 20 '16 at 10:36
  • You need to provide full stack trace, as there should be some nested info why intialization is failing. – Gas Jul 20 '16 at 12:13
  • Hi Gas ... Thanks for your comments... Pls find the Stack trace : Caused by : java.lang.NoClassDefFoundError :org.owasp.reference.DefaultValidator(initialization failure) at java.lang.J9VMInternals.initialize(J9VMInternals.java:140) at java.lang.Class.forNameImpl(Native Method) at java.lang.forName(Class.java:136) at org.owasp.esapi.util.ObjFactory.make(ObjFactory.java:74) at org.owasp.esapi.ESAPI.validator(ESAPI.java:191) – Pavithran R Jul 20 '16 at 13:01
  • Where did you put that esapi jar? – Gas Jul 20 '16 at 13:29
  • In the WEB-INF/lib folder – Pavithran R Jul 20 '16 at 13:31
  • List all the jars you have in WEB-INF/lib, try to edit your post if possible instead adding comments. What JDK did you use with Tomcat? – Gas Jul 20 '16 at 15:43
  • don't forget about validation.properties. – avgvstvs Jul 22 '16 at 11:02

0 Answers0