简体   繁体   中英

Why Tomcat library folder WEB-INF/lib is empty?

I deploy my Maven webapp using Spring MVC in Eclipse Tomcat. Everything works OK for quite a week. Suddenly, today I modify a properties file, rebuild and redeploy the webapp. There's a class not found error:

SEVERE: Error configuring application listener of class org.jasig.cas.client.session.SingleSignOutHttpSessionListener
java.lang.ClassNotFoundException: org.jasig.cas.client.session.SingleSignOutHttpSessionListener

Look at publish folder (tmp0) of Tomcat server plugin located in workspace folder, there are no jars in WEB-INF/lib any more. I don't know why? I have rebuilt/deployed it many times today, and have found no problem.

Could someone give an advice? Thanks very much.

EDIT:

I can't find a right solution for this problem, though I temporarily bypass it by removing the web app from Tomcat Server, do a clean up, then add it back again.

Do you have m2eclipse WTP integration installed? There are few things you could try:

  • Maven->Update project configuration
  • Close and open project
  • Remove project from Tomcat instance in WTP, Clean up and add it back.

Depending on your version of Eclipse and m2eclipse/m2e and WTP the integration could be finicky sometimes.

  • Is this option enabled? ProjectName (right-click) > Maven > Enable Dependency Management You should have in ProjectName > properties > Java Build Path > Libraries an item called Maven2 Dependencies
  • Is your M2_REPO variable set? Window > Preferences > Java > Build Path > Classpath Variables

If it's all ok, check the war that Maven is creating to see if the libs are there and in the correct folder (web-inf\\libs). Check the maven output when generating the war.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM