Background:
Web project: Spring4+springmvc4+hibernate4+maven3
Problem:
Error after starting Tomcat: Java.lang.ClassNotFoundException:ContextLoaderListener
Right click on the project-select Properties, find the Deployment assembly option, click the Add button and find no Java Build Path entries option, there is no maven dependency package. Very strange!
Normal should be as follows:
Solve:
Right-click on the project-select Properties and find the project facets option to see if the current Web configuration is correct: (no red fork is correct)
Change the version of the dynamic Web module to 2.5. (3.0 for Java7). Combine your own JDK version and choose the right option.
Should be able to see deployment assembly appear, but if it does appear, it is likely in Eclipse deployment assembly was disable, then we need to do is to deployment The assembly option enable.
In the workspace where the project is located, there is a. project file that opens the file to add the following line for the Enable Deployment Assembly property.
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
As in the following. project file.
Then restart Eclipse to see the deployment in Project's properties
If the above project facets an error, it means that your Web project is not built, and you need to locate the. Settings folder in the Org.eclipse.wst.common.project.facet.core.xml file and modify it
Modify the Java and Jst.web options, depending on your actual version selection. Then save the refresh, under build.
Resources:
No workaround for Project Facets
Project facet issues in eclipse
The properties of project in Eclipse deployment Assembly (dominating assembly) disappeared, there's no place.
Deployment assembly and project facets and org.eclipse.wst.common.project.facet.core.xml relationships for Eclipse