在Tomcat 5.5中部署Web应用程序时如何解决错误listenerStart? [英] How to resolve Error listenerStart when deploying web-app in Tomcat 5.5?

查看:245
本文介绍了在Tomcat 5.5中部署Web应用程序时如何解决错误listenerStart?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经部署了一个使用Spring和Hibernate的Apache Wicket Web应用程序到我的Tomcat 5.5实例。当我导航到Tomcat Manager界面时,我看到我部署的Web应用程序没有运行。当我按开始时,我会收到以下错误消息; FAIL - 在上下文路径/意大利面上的应用程序无法启动。

I've deployed an Apache Wicket web-application that uses Spring and Hibernate to my Tomcat 5.5 instance. When I navigate to the Tomcat Manager interface I see that the web-application I deployed is not running. When I press 'Start' I get the following error message; "FAIL - Application at context path /spaghetti could not be started".

我的catalina.log包含以下内容:

My catalina.log contains the following:

Apr 15, 2010 1:51:22 AM org.apache.catalina.loader.WebappClassLoader validateJarFile  
INFO: validateJarFile(/var/lib/tomcat5.5/webapps/spaghetti/WEB-INF/lib/jsp-api-6.0.16.jar)   - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/jsp/JspPage.class  
Apr 15, 2010 1:51:22 AM org.apache.catalina.loader.WebappClassLoader validateJarFile  
INFO: validateJarFile(/var/lib/tomcat5.5/webapps/spaghetti/WEB-INF/lib/servlet-api-6.0.16.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class  
Apr 15, 2010 1:51:24 AM org.apache.catalina.core.StandardContext start  
SEVERE: Error listenerStart  
Apr 15, 2010 1:51:24 AM org.apache.catalina.core.StandardContext start  
SEVERE: Context [/spaghetti] startup failed due to previous errors

摘自web.xml:


    <listener>
        <listener-class>
            org.springframework.web.context.ContextLoaderListener
        </listener-class>
    </listener>

非常感谢任何帮助。

推荐答案

/var/lib/tomcat5.5/webapps/spaghetti/WEB-INF/lib/jsp-api-6.0.16.jar
/var/lib/tomcat5.5/webapps/spaghetti/WEB-INF/lib/servlet-api-6.0.16.jar

您应该有任何 / WEB-INF / lib 中的服务器特定库。将它们放在appserver自己的库中。它只会导致类路径中的冲突。摆脱 / WEB-INF / lib (以及 JRE / lib 中的所有appserver特定的库, code> JRE / lib / ext 如果您已经将其中的任何一个放在那里)

You should not have any server-specific libraries in the /WEB-INF/lib. Leave them in the appserver's own library. It would only lead to collisions in the classpath. Get rid of all appserver-specific libraries in /WEB-INF/lib (and also in JRE/lib and JRE/lib/ext if you have placed any of them there).

图书馆包含在webapp的库中,起始者认为它是解决编译错误的正确方法,其中包括 javax.servlet 类不能解析的编译错误。将它们放在webapp的库中是错误的解决方案。您应该在编译期间在类路径中引用它们,即 javac -cp /path/to/server/lib/servlet.jar 等等,或者如果您使用IDE,您应该将服务器集成到IDE中,并将Web项目与服务器相关联。然后,IDE将自动在webapp项目的类路径( buildpath )中采用服务器特定的库。

A common cause that the appserver-specific libraries are included in the webapp's library is that starters think that it is the right way to fix compilation errors of among others the javax.servlet classes not being resolveable. Putting them in webapp's library is the wrong solution. You should reference them in the classpath during compilation, i.e. javac -cp /path/to/server/lib/servlet.jar and so on, or if you're using an IDE, you should integrate the server in the IDE and associate the web project with the server. The IDE will then automatically take server-specific libraries in the classpath (buildpath) of the webapp project.

这篇关于在Tomcat 5.5中部署Web应用程序时如何解决错误listenerStart?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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