when i use external tomcat everything is ok. but I need to deploy my project on the internal eclipse tomcat server in order to be able to use the DCEVM class hot swap. When I try to start the tomcat server from eclipse, it says that it cannot find one of my service classes that I mentioned in my spring security configuration file as a bean. I also tried adding the project to the tomcat class path, but this did not solve my problem.
UPDATE
I found out that the problem is that when I deploy my web project for an eclipse tomcat server, no .class is copied to:
C:\Users\Meysam\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\villapweb\WEB-INF\classes
in fact, this folder contains my src / java / main structure, but .class is not copied in it.
the lib folder is good though (for example, all dependencies of maven and other copies of the material in the path that is supposed to be)
I think there might be something wrong with the m2e-wtp plugin. I do not know what!
I am using eclipse 4.3 BTW.
solvable
I solved this problem as follows:
- right click on project in eclipse> properties> project face
- in the right pane, select the runtime and select the target server. Apply and approx.
- in the list of server modules, right-click on the project module and click on the working directory to work with the module
- right click on the server itself and you can clear the working directory of the server and tomcat one by one.
- If this does not work, try running the project> clean and also switch the "build automatically" option in the project menu.
Here it is. tomcat now copies all .class files to the target server, and you do not see a ClassNotFound exception when tomcat starts.
eclipse classnotfoundexception tomcat startup
Meysam feghhi
source share