StringEscapeUtils cannot be resolved

2.6k views Asked by At

I am currently attempting to access a code designed by another programmer in my company. My job is to take his code from the jar he designed and make it easier to use for those who are less technologically savvy.

The first time I tried to run the code, it seemed to run fine, but for some reason the second time, it gave me the following error:

"StringEscapeUtils cannot be resolved"

He has imported the above file and I have added commons.apache-3 3.3.4 into my External Libraries on Eclipse, but still I can't get the program to even run. It doesn't tell me I have an error, but a red exclamation point appears by the package in the package browser.

I've never seen this error before. I know for a certainty that the other coder's program works exactly as he intended it. I have all of his code extracted into my eclipse. Is there any way at all to fix this error so that I can modify the code?

4

There are 4 answers

0
SingaporeLinguist On BEST ANSWER

I did all of those things. None of them made a difference. Then, I made a bat file out of the jar and, lo and behold, it edited cleanly from there.

0
Diego Furtado On

If you're using maven, try to clean the dependency in .m2 folder. If not, go to project properties/Deployment assembly and add the lib folder there.

It should solve your problem.

0
f_puras On

The class in question belongs to the Apache Commons Lang package. Try adding it to your project. If it uses Maven, add the following dependency in your pom.xml:

<dependency>
    <groupId>org.apache.commons</groupId>
    <artifactId>commons-lang3</artifactId>
    <version>3.4</version>
</dependency>
0
coletrain On

I was having the same issue and simply restarting the apache server seemed to fixed it.