Spring Framework 3.0.5 MVC Issue
I know that this may be absolutely dumb but for the life of me I cannot figure out why I'm getting these errors in my Spring Project, it is basically from the MVC tutorial with a few modifications. This is the error I get when running my tomcat server.
Caused by: java.lang.NoClassDefFoundError: org/springframework/web/servlet/mvc/SimpleFormController
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
at java.net.URLClassLoader.access$000(URLClassLoader.java:73)
开发者_如何学Cat java.net.URLClassLoader$1.run(URLClassLoader.java:212)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1581)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1511)
at org.springframework.util.ClassUtils.forName(ClassUtils.java:257)
at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:408)
at org.springframework.beans.factory.support.AbstractBeanFactory.doResolveBeanClass(AbstractBeanFactory.java:1271)
at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1242)
... 54 more
Caused by: java.lang.ClassNotFoundException: org.springframework.web.servlet.mvc.SimpleFormController at java.net.URLClassLoader$1.run(URLClassLoader.java:217) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:205) at java.lang.ClassLoader.loadClass(ClassLoader.java:321) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294) at java.lang.ClassLoader.loadClass(ClassLoader.java:266) ... 71 more
I just cannot figure out the issue with my classpath...I would appreciate any help. Here are all the jars in my classpath. I know that the class is inside the web-servlet jar but it's not seeing it. Is there a conflict?
- aopalliance.jar
- aspectjweaver.jar
- commons-codec.jar
- commons-dbcp.jar
- commons-logging.jar
- commons-pool.jar
- jstl.jar
- org.springframework.aop-3.0.5.RELEASE.jar
- org.springframework.asm-3.0.5.RELEASE.jar
- org.springframework.aspects-3.0.5.RELEASE.jar
- org.springframework.beans-3.0.5.RELEASE.jar
- org.springframework.context.support-3.0.5.RELEASE.jar
- org.springframework.context-3.0.5.RELEASE.jar
- org.springframework.core-3.0.5.RELEASE.jar
- org.springframework.expression-3.0.5.RELEASE.jar
- org.springframework.instrument.tomcat-3.0.5.RELEASE.jar
- org.springframework.instrument-3.0.5.RELEASE.jar
- org.springframework.jdbc-3.0.5.RELEASE.jar
- org.springframework.jms-3.0.5.RELEASE.jar
- org.springframework.orm-3.0.5.RELEASE.jar
- org.springframework.oxm-3.0.5.RELEASE.jar
- org.springframework.test-3.0.5.RELEASE.jar
- org.springframework.transaction-3.0.5.RELEASE.jar
- org.springframework.web.portlet-3.0.5.RELEASE.jar
- org.springframework.web.servlet-3.0.5.RELEASE.jar
- org.springframework.web.struts-3.0.5.RELEASE.jar
- org.springframework.web-3.0.5.RELEASE.jar
- postgresql-9.0-801.jdbc3.jar
- servlet-api.jar
- spring-security-config-3.0.5.RELEASE.jar
- spring-security-core-3.0.5.RELEASE.jar
- spring-security-web-3.0.5.RELEASE.jar
- standard.jar
You need to add org.springframework.webmvc-3.0.5.RELEASE.jar as well, as it contains the SimpleFormController
class.
精彩评论