Khoda
Khoda

Reputation: 953

Dependencies are not deploying into tomcat

Recently I just switched from Myeclipse 2014 (spring version) to Eclipse Java EE. having add tomcat 6 and afterwards deploying my web project(war packaging) into that, seeing that none of it's dependencies added into folder WEB-INF/classes and I get ClassNotFoundException all the time. deploying this project into Myeclipse tomcat works out fine. why is that happening?

Upvotes: 2

Views: 1034

Answers (1)

G 1
G 1

Reputation: 673

You should check the project facet for web project and add dependencies to deployment assembly.

  1. Right click on the project and select properties.
  2. In the search box on the window(left upper corner), type project facet.
  3. Make sure that "Dynamic Web Module" is checked along with other necessary facets(like Java, Java Script...)
  4. Again in the search box, type deployment assembly.
  5. Click the add button on the right hand side and add the dependencies you wanted to add to the deployment assembly for your project.
  6. Now clean and build your project in eclipse and deploy it on server.
  7. It should have all the dependent libraries in the classpath(WEB-INF/lib) now. So it should work ok.

Upvotes: 2

Related Questions