StringEscapeUtils can not be resolved

24,539

Solution 1

Thanks for all replies, i solved it by downloading manually the .jar file from the following link and overwrite the existing jar downloaded by maven. (i don't know why it started working after manual download, but after all, its working)

http://commons.apache.org/proper/commons-lang/download_lang.cgi

Solution 2

If you sure that jar file includes StringEscapeUtils in the classpath you should clean the project.

Share:
24,539
Shahzeb Khan
Author by

Shahzeb Khan

code nerd

Updated on July 09, 2022

Comments

  • Shahzeb Khan
    Shahzeb Khan almost 2 years

    I have added the dependency in pom.xml

    <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-lang3</artifactId>
                <version>3.1</version>
            </dependency>
    

    but when i update maven dependencies and import the EscapeStringUtils using

    import org.apache.commons.lang3.StringEscapeUtils;
    

    i get it red underlined and error which states :

    The import org.apache.commons.lang3.StringEscapeUtils cannot be resolved
    

    Jar file is there (downloaded) now how can i fix it, i have no idea. Kindly help me.

    Thanks