生成错误的Spring MVC的应用 [英] Build Error for Spring MVC Application

查看:117
本文介绍了生成错误的Spring MVC的应用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是相当新的Spring框架。我最近安装了SpringSource工具套件(版本2.8.1.RELEASE)。使用Subclipse,我已经检查了我的队友创造了Spring MVC的项目。它的工作原理他的机器上很好,但我们无法弄清楚,为什么生成错误是我的机器上发生的事情。

I'm fairly new to the Spring framework. I have recently installed SpringSource Tool Suite (version 2.8.1.RELEASE). Using Subclipse, I have checked out a Spring MVC project that my team mate has created. It works fine on his machine, but we can't figure out why a build error is happening on my machine.

我使用Tomcat V6.0服务器运行项目。这是错误的部分:

I use Tomcat v6.0 Server to run the project. This is part of the error:

INFO: Starting Servlet Engine: Apache Tomcat/6.0.35
2012-jan-30 13:43:46 org.apache.catalina.core.StandardContext listenerStart
SEVERE: Error configuring application listener of class org.springframework.web.context.ContextLoaderListener
java.lang.NoClassDefFoundError: javax/servlet/ServletContextListener
    at java.lang.ClassLoader.findBootstrapClass(Native Method)
    at java.lang.ClassLoader.findBootstrapClassOrNull(ClassLoader.java:926)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:295)

Tomcat服务器具有以下类路径:引导条目:JRSE系统库[jdk1.6.0_27],弹簧2.5.2-20080220-410.jar。用户条目:bootstrap.jar,tools.jar中

The Tomcat server has the following classpath: Bootstrap entries: JRSE System Library [jdk1.6.0_27], spring-2.5.2-20080220-410.jar. User entries: bootstrap.jar, tools.jar

这是如何解决这一问题的任何想法?

Any ideas on how to fix this?

推荐答案

您需要去构建路径设置,确保您有包含的Apache Tomcat库。

You need to go to your build path settings and make sure you have Apache Tomcat library included.

右键点击Project Explorer中的项目名称,然后单击属性。在属性对话框中,从左至右,然后打开库选项卡上单击列表中的Java构建路径。如果确认的Apache Tomcat库是存在的。

Right-click your project name from Project Explorer, click properties. In the properties dialog box, click Java Build Path from the list on left, then open libraries tab. Confirm if Apache Tomcat library is there.

如果它不存在,单击添加库 - >服务器运行时 - >的Apache Tomcat v X.0 - >完成

If it is not there, click Add Library -> Server Runtime -> Apache Tomcat v x.0 -> Finish.

这篇关于生成错误的Spring MVC的应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆