0

I am using My-eclipse and doing a struts project there is no syntax error but on starting tomcat server the following error appear in console.

java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory

and

javax.servlet.UnavailableException: Parsing error processing resource path jndi:/localhost/strutspro/WEB-INF/struts-config.xml

any idea whats the problem.

2 Answers 2

6

Donwload commons-logging and place the jar(s) in WEB-INF/lib.

And for the future - google the class name that is not found to see which library it belongs to, download it and put it on the classpath (WEB-INF/lib in this case)

Sign up to request clarification or add additional context in comments.

Comments

1

It looks like you've already found your solution, but my solution to the same problem was a little different.

Running Tomcat 4.1.29 inside Eclipse 3.6, I started receiving a very similar error (Servlet /webcustom threw load() exception javax.servlet.UnavailableException: Parsing error processing resource path /WEB-INF/conf/struts-config-resource.xml,...).

Neither performing an "Eclipse > Project > Clean", nor an "Eclipse > Servers > (Tomcat Server Instance) > Clean Tomcat Work Directory" would resolve the problem for me.

However, after a lot of trial and error, I found the solution to be this...

Eclipse > Servers > (Tomcat Server Instance)...

  • Add and Remove > (Remove resource from the Tomcat Server Instance)
  • Clean
  • Add and Remove > (Add resource back to the Tomcat Server Instance)
  • Publish
  • Start

Hopefully this helps someone else.

-jpt

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.