mway08 / owasp-esapi-java

Automatically exported from code.google.com/p/owasp-esapi-java
Other
0 stars 0 forks source link

Cannot get esapi to run on eclipse #12

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I use Eclipse with Tomcat 5.5 and JRE 1.4.2 for a simple demo project.

owasp-esapi-full-java-1.4.jar is in my lib-folder AND added to the J2EE
Module Dependencies.

Used several methods to add the properties file to my VM arguments.

I continually get the following Exception report on a simple jsp file:

org.apache.jasper.JasperException: org/owasp/validator/html/PolicyException

I suspect there should be a "esapi" in the object path, but owasp is
immediately followed by validator. Since there is no documentation of
installation or troubleshooting the installation is seek for help here.

Original issue reported on code.google.com by joachim....@mediaman.de on 24 Feb 2009 at 11:33

GoogleCodeExporter commented 9 years ago
PS: Root Cause is:

java.lang.NoClassDefFoundError: org/owasp/validator/html/PolicyException

Looks like a Class cannot be found...

Original comment by joachim....@mediaman.de on 24 Feb 2009 at 11:34

GoogleCodeExporter commented 9 years ago
Have you checked the "Problems" tab?  Is there a warning similar to this?

Classpath entry C:/Users/XXXX/Downloads/owasp-esapi-full-java-1.4.jar will not 
be
exported or published. Runtime ClassNotFoundExceptions may result.      

If so, check if there is a "Quick Fix" when you right click on the problem.  
For me,
it says, "Mark the associated raw classpath entry as a publish/export 
dependency". 
This solves the problem for me.

Original comment by kfe...@gmail.com on 16 Apr 2009 at 8:10

GoogleCodeExporter commented 9 years ago
To manually fix this issue, right-click the project and choose "Properties".
Select "Java EE Module Dependencies" from the list on the left.
If the ESAPI JAR is already listed, be sure it is checked off on the list.
If the ESAPI JAR is not listed, add it with "Add JAR" or "Add External JAR".
Apply.  This should export ESAPI to the server to resolve your problem.

Original comment by kfe...@gmail.com on 16 Apr 2009 at 8:34

GoogleCodeExporter commented 9 years ago
There are dependancies not mentioned in the set-up. You need to include the 
antisamy 
jar in your classpath also - it contains the missing class.

Original comment by bhwhe...@gmail.com on 9 Jul 2009 at 12:15

GoogleCodeExporter commented 9 years ago

Add these lines to pom.xml

            <dependencies>
                  <dependency>
                  <groupId>owasp-esapi</groupId>
                  <artifactId>owasp-esapi</artifactId>
            </dependency>
            <dependency>
                  <groupId>antisamy</groupId>
                  <artifactId>antisamy</artifactId>
            </dependency>
            <dependency>
                  <groupId>commons-fileupload</groupId>
                  <artifactId>commons-fileupload</artifactId>
            </dependency>
      </dependencies>

Then try with a clean/package. In case, if its still not working try with a 
clean/install/package

Original comment by abhijitp...@gmail.com on 2 May 2011 at 6:07

GoogleCodeExporter commented 9 years ago
make sure you include antisamy-1.4.4.jar in your project

Original comment by harrison...@gmail.com on 14 Dec 2011 at 8:44