[Esapi-user] fail to load ESAPI.properties

Jim Manico jim.manico at owasp.org
Mon May 23 03:45:02 EDT 2011


It looks like all of your property files are loading correctly from the classpath, but the Encoder setup is throwing an exception.

Can we see a full stack trace of this? The end seems cut off.

Jim Manico

On May 23, 2011, at 9:12 AM, ashish kumar gautam <gautamashishkumar at gmail.com> wrote:

> Dear sir/madam
> 
> i am ashish kumar gautam.
> i am tring to run a project that use a esapi api but i get a exception
> message relatied to loding a ESAPI.properties file.
> 
> what will be solution of this problem.
> 
> plz get me response as soon as posible
> thanks
> .
> .
> .
> 
> 
> Error message like this -----
> 
> Properties Loaded done
> Attempting to load ESAPI.properties via file I/O.
> Attempting to load ESAPI.properties as resource file via file I/O.
> Not found in 'org.owasp.esapi.resources' directory or file not
> readable: E:\Users\hcl\workspace\ESAPI_2.0\ESAPI.properties
> Not found in SystemResource Directory/resourceDirectory: .esapi\ESAPI.properties
> Not found in 'user.home' (C:\Users\hcl) directory:
> C:\Users\hcl\esapi\ESAPI.properties
> Loading ESAPI.properties via file I/O failed. Exception was:
> java.io.FileNotFoundException
> java.io.FileNotFoundException
>    at org.owasp.esapi.reference.DefaultSecurityConfiguration.getResourceStream(DefaultSecurityConfiguration.java:518)
>    at org.owasp.esapi.reference.DefaultSecurityConfiguration.loadConfiguration(DefaultSecurityConfiguration.java:429)
>    at org.owasp.esapi.reference.DefaultSecurityConfiguration.<init>(DefaultSecurityConfiguration.java:227)
>    at org.owasp.esapi.reference.DefaultSecurityConfiguration.getInstance(DefaultSecurityConfiguration.java:75)
>    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>    at java.lang.reflect.Method.invoke(Method.java:597)
>    at org.owasp.esapi.util.ObjFactory.make(ObjFactory.java:86)
>    at org.owasp.esapi.ESAPI.securityConfiguration(ESAPI.java:183)
>    at org.owasp.esapi.ESAPI.encoder(ESAPI.java:98)
>    at Example.main(Example.java:25)
> 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 file I/O.
> Attempting to load validation.properties as resource file via file I/O.
> Not found in 'org.owasp.esapi.resources' directory or file not
> readable: E:\Users\hcl\workspace\ESAPI_2.0\validation.properties
> Not found in SystemResource Directory/resourceDirectory:
> .esapi\validation.properties
> Not found in 'user.home' (C:\Users\hcl) directory:
> C:\Users\hcl\esapi\validation.properties
> Loading validation.properties via file I/O failed.
> Attempting to load validation.properties via the classpath.
> SUCCESSFULLY LOADED validation.properties via the CLASSPATH from '/
> (root)' using current thread context class loader!
> Handeled Exception by
> me----org.owasp.esapi.errors.ConfigurationException:
> java.lang.reflect.InvocationTargetException Encoder class
> (org.owasp.esapi.reference.DefaultEncoder) CTOR threw exception.-- and
> exception
> _______________________________________________
> Esapi-user mailing list
> Esapi-user at lists.owasp.org
> https://lists.owasp.org/mailman/listinfo/esapi-user


More information about the Esapi-user mailing list