【问题标题】:Error when deploying war file on tomcat在tomcat上部署war文件时出错
【发布时间】:2015-05-08 18:20:48
【问题描述】:

尝试在 Ubuntu 的 Tomcat 上运行我的 JSF 项目,但出现以下错误 当我尝试使用内置管理器部署 WAR 文件时:

FAIL - 上下文路径/服务器通信中的应用程序无法启动 FAIL - 遇到异常 org.apache.catalina.LifecycleException: 无法启动组件 [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/Server Communication]]

Log: 

Mar 06, 2015 9:22:27 PM org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(/var/lib/tomcat7/webapps/Server Communication/WEB-INF/lib/tomcat-el-api-8.0.18.jar) - jar not loaded. See Servlet Spec 3.0, section 10.7.2. Offending class: javax/el/Expression.class
Mar 06, 2015 9:22:27 PM org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(/var/lib/tomcat7/webapps/Server Communication/WEB-INF/lib/tomcat-servlet-api-8.0.18.jar) - jar not loaded. See Servlet Spec 3.0, section 10.7.2. Offending class: javax/servlet/Servlet.class
Mar 06, 2015 9:22:27 PM org.apache.catalina.deploy.WebXml setVersion
WARNING: Unknown version string [3.1]. Default version will be used.
Mar 06, 2015 9:22:27 PM org.apache.catalina.deploy.WebXml setVersion
WARNING: Unknown version string [3.1]. Default version will be used.
Mar 06, 2015 9:22:30 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI:
        http://java.sun.com/jsf/html
     is already defined
Mar 06, 2015 9:22:30 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jsf/core is already defined
Mar 06, 2015 9:22:30 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://mojarra.dev.java.net/mojarra_ext is already defined
Mar 06, 2015 9:22:30 PM org.apache.tomcat.util.descriptor.DigesterFactory locationFor
WARNING: The XML schema [web-app_3_1.xsd] could not be found. This is very likely to break XML validation if XML validation is enabled.
Mar 06, 2015 9:22:30 PM org.apache.tomcat.util.descriptor.DigesterFactory locationFor
WARNING: The XML schema [web-fragment_3_1.xsd] could not be found. This is very likely to break XML validation if XML validation is enabled.
Mar 06, 2015 9:22:30 PM org.apache.tomcat.util.descriptor.DigesterFactory locationFor
WARNING: The XML schema [web-common_3_1.xsd] could not be found. This is very likely to break XML validation if XML validation is enabled.
Mar 06, 2015 9:22:30 PM org.apache.tomcat.util.descriptor.DigesterFactory locationFor
WARNING: The XML schema [javaee_7.xsd] could not be found. This is very likely to break XML validation if XML validation is enabled.
Mar 06, 2015 9:22:30 PM org.apache.tomcat.util.descriptor.DigesterFactory locationFor
WARNING: The XML schema [jsp_2_3.xsd] could not be found. This is very likely to break XML validation if XML validation is enabled.
Mar 06, 2015 9:22:30 PM org.apache.tomcat.util.descriptor.DigesterFactory locationFor
WARNING: The XML schema [javaee_web_services_1_4.xsd] could not be found. This is very likely to break XML validation if XML validation is enabled.
Mar 06, 2015 9:22:30 PM org.apache.tomcat.util.descriptor.DigesterFactory locationFor
WARNING: The XML schema [javaee_web_services_client_1_4.xsd] could not be found. This is very likely to break XML validation if XML validation is enabled.

【问题讨论】:

    标签: java xml tomcat xsd ubuntu-14.04


    【解决方案1】:

    尝试通过 Eclipse Luna 在 Tomcat 上部署我的项目时,我遇到了同样的错误。幸运的是,我正在使用 Maven,并且可以创建一个以 tomcat:run 为目标的新运行配置。然后在 Tomcat 上运行应用程序就可以了。或者,如果您使用的是 Maven,只需运行以下命令:

    > mvn clean install tomcat:run

    See this video for an example.

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-03-23
      • 2010-09-13
      • 2012-07-29
      • 1970-01-01
      • 2023-03-23
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多