It seems like the writer has forgotten to add the jars that he puts in WebContent\WEB-INF\lib folder to the project's Java build path. However I have added. Actually, just to avoid problems, I have added to the Java build path all the files that are in my \spring\spring-framework-3.0.4.RELEASE\dist folder.
The problem is that when running, I am getting exceptions, and the application is not being deployed in tomcat\webapps.
I am not sure what all the exceptions are, since there too many for the Eclipse console window.
But those that I can see are: java.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServlet
Also, at the bottom of the console it says INFO: Servlet spring is currently unavailable
I am just using the recent Eclipse for JEE applications.
I did not install the Spring IDE Eclipse plugin. When you use that plugin, the process is somewhat different than the one described in the above mentioned tutorial.
They also do not mention that plugin in the tutorial.
Since I have included the jars in the project's Java build path, I do not understand what the problem might be.
There is already an instance of Tomcat v6.0 at localhost in the Servers window. I think it got there automatically when I selected the target runtime environment (look above at the tutorial, where it says "Once this is done, select the target runtime environment (e.g. Apache Tomcat v6.0)").
(see attached image)
I have just noticed there was another project as well located under that server, so I removed it so only the project named "Spring3MVC" was left.
Now when I run this project, I get this error:
In the browser window I get:
We must know, we will know. -- David Hilbert
posted 10 years ago
It seems to me like the problem lies in the
SEVERE: Error starting static Resources
java.lang.IllegalArgumentException: Document base J:\my_java\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\Spring3MVC does not exist or is not a readable directory
Does it mean something is wrong with my Eclipse settings? How could I fix this?
1> Does that directory exist?
2> With Eclipse WTP, it's often easiest to just delete the configured server and create a new one if you run into problems. Then redeploy your web application(s). Depending on the Eclipse WTP version you are using, some of the other available options for cleaning up may or may not work.
Author, Spring Security 3 (the Book), Packt Publishing, 2010
posted 9 years ago
I have been out of town. I just got back to this. It still does not work.
So, why do I get that "ClassNotFoundException: org.springframework.web.servlet.DispatcherServlet" ???
I have added all the jars in the spring/dist folder to the project path.