zoukankan      html  css  js  c++  java
  • 关于tomcat启动的几个异常的解决

    老系统使用的是tomcat/4.1.24,在经过了若干年系统维护与需求新增以后,环境已面目全非,启动时总是报一些异常,今天梳理了一下。

    1、ServerLifecycleListener: createMBeans: Throwable

    javax.management.InstanceAlreadyExistsException: Catalina:type=Connector,service
    =Tomcat-Standalone,port=9001,address=null
    原因:web.xml 中配置的两个connector的port重复了。
    2、javax.servlet.ServletException:
    org/apache/commons/el/ExpressionEvaluatorImpl
    原因:缺少commons-el.jar包,Tomcat/4.1.24中未自动提供该包
    3、java.lang.NoClassDefFoundError: javax/servlet/jsp/el/ExpressionEvaluator
    原因:缺少jsp-api.jar,Tomcat/4.1.24中未自动提供该包
    4、java.lang.NoClassDefFoundError: com/sun/xml/util/XmlNames
    原因:润乾报表问题,在网上搜索到答案,

    有两种办法解决这个问题:

    第一种方法:把应用的web.xml中的com.runqian.util.webutil.SetContextServlet修改成
    com.runqian.report4.view.ReportServlet。这样的话,什么包都不用动,
    第二种方法是把designer\lib目录下的parser.jar复制到应用的lib目录下。
    即将发布的v4.02及以版本将会自动解决这个问题
    5、严重: Parse Error at line 6 column 52: Document root element "web-app", must mat
    ch DOCTYPE root "null".
    原因:Tomcat4.1.24中是Servlet2.3规范,不支持2.4规范,因此如果在项目中添加了jstl.jar或者项目的web.xml中出现2.4规范,就会报如上的错误。
    Tomcat 4.xx should use the 2.3 DTD spec ,If you're using the 2.4 spec, you'll need Tomcat 5. 
    6、严重: Parse Error at line 6 column 52: Document is invalid: no grammar
    org.xml.sax.SAXParseException: Document is invalid: no grammar found.
    原因:Tomcat4.1.24中是Servlet2.3规范,不支持2.4规范,因此如果在项目中添加了jstl.jar或者项目的web.xml中出现2.4规范,就会报如上的错误。
    Tomcat 4.xx should use the 2.3 DTD spec ,If you're using the 2.4 spec, you'll need Tomcat 5. 
  • 相关阅读:
    多读者多写者的无锁队列
    PCI设备的地址空间
    交换机能不能连接不同的网段?
    VMware Workstation的三种网络连接模式
    Linux内存寻址和内存管理
    Fragment基础信息传递
    Android Studio获取SHA1和MD5方法
    AppCan学习笔记数据存储及listview简单应用
    Fragment基础生命周期
    Fragment基础创建
  • 原文地址:https://www.cnblogs.com/mabaishui/p/2091521.html
Copyright © 2011-2022 走看看