tomcat运行转resin运行---项目启动不起来(tomcat可以正常运行)

sniffstherose 发布于 2015/12/22 14:07
阅读 1K+
收藏 0

【华为云1024程序员节·向云而生】预约直播 抽14件华为电子产品礼包!>>>

Resin-3.0.19 (built Mon, 15 May 2006 04:50:47 PDT)
Copyright(c) 1998-2006 Caucho Technology.  All rights reserved.

  Using Resin(R) Open Source under the GNU Public License (GPL).

  See http://www.caucho.com for information on Resin Professional,
  including caching, clustering, JNI acceleration, and OpenSSL integration.

Starting Resin on Tue, 22 Dec 2015 14:01:27 +0800 (CST)

[14:01:28.099] Server[] starting
[14:01:28.099]
[14:01:28.099] Windows 7 6.1 x86
[14:01:28.099] Java 14.0-b16, 32, mixed mode, GBK, zh, Sun Microsystems Inc.
[14:01:28.100] resin.home = E:\resin\resin
[14:01:28.100] server.root = null
[14:01:28.100]
[14:01:28.107] http listening to *:8081
[14:01:28.111] hmux listening to id.jiathis.com:6803
[14:01:28.147] Host[] starting
[14:01:28.195] WebApp[http://localhost:8081] starting
[14:01:28.278] com.caucho.config.LineConfigException: WEB-INF/web.xml:2: <web-app xmlns="http://java.sun.com/xml/ns/javaee"> is an unexpected top-level tag.
[14:01:28.278]
[14:01:28.278] <web-app xmlns="http://caucho.com/ns/resin">,
[14:01:28.278] <web-app xmlns="http://java.sun.com/xml/ns/j2ee"> or
[14:01:28.278] <web-app xmlns=""> are expected.
[14:01:28.278]
[14:01:28.278] Syntax: (<web-app> | <web-app> | <web-app>)
[14:01:28.392] WebApp[http://localhost:8081/resin-doc] starting
[14:01:28.422] com.caucho.config.LineConfigException: WEB-INF/web.xml:5: <web-app xmlns="http://java.sun.com/xml/ns/javaee"> is an unexpected top-level tag.
[14:01:28.422]
[14:01:28.422] <web-app xmlns="http://caucho.com/ns/resin">,
[14:01:28.422] <web-app xmlns="http://java.sun.com/xml/ns/j2ee"> or
[14:01:28.422] <web-app xmlns=""> are expected.
[14:01:28.422]
[14:01:28.422] Syntax: (<web-app> | <web-app> | <web-app>)
[14:01:28.428] Resin started in 502ms






  1. 根据网上解决方案修改<web-app>标签

<?xml version="1.0" encoding="UTF-8"?> 
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">

修改后报错如下
  Resin-3.0.19 (built Mon, 15 May 2006 04:50:47 PDT)
Copyright(c) 1998-2006 Caucho Technology.  All rights reserved.

  Using Resin(R) Open Source under the GNU Public License (GPL).

  See http://www.caucho.com for information on Resin Professional,
  including caching, clustering, JNI acceleration, and OpenSSL integration.

Starting Resin on Tue, 22 Dec 2015 14:04:58 +0800 (CST)

[14:04:58.462] Server[] starting
[14:04:58.463]
[14:04:58.463] Windows 7 6.1 x86
[14:04:58.463] Java 14.0-b16, 32, mixed mode, GBK, zh, Sun Microsystems Inc.
[14:04:58.463] resin.home = E:\resin\resin
[14:04:58.463] server.root = null
[14:04:58.463]
[14:04:58.470] http listening to *:8081
[14:04:58.475] hmux listening to id.jiathis.com:6803
[14:04:58.510] Host[] starting
[14:04:58.559] WebApp[http://localhost:8081] starting
[14:04:58.772] WebApp[http://localhost:8081/VNavigate] starting
[14:04:58.895] Initializing Spring root WebApplicationContext
[org.springframework.web.context.ContextLoader]  INFO - Root WebApplicationContext: initialization started
[org.springframework.web.context.ContextLoader] ERROR - Context initialization failed
java.lang.NoSuchMethodError: javax.servlet.ServletContext.getContextPath()Ljava/lang/String;
    at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:384)
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)
    at com.caucho.server.webapp.Application.start(Application.java:1597)
    at com.caucho.server.deploy.DeployController.startImpl(DeployController.java:621)
    at com.caucho.server.deploy.StartAutoRedeployAutoStrategy.startOnInit(StartAutoRedeployAutoStrategy.java:72)
    at com.caucho.server.deploy.DeployController.startOnInit(DeployController.java:509)
    at com.caucho.server.deploy.DeployContainer.start(DeployContainer.java:158)
    at com.caucho.server.webapp.ApplicationContainer.start(ApplicationContainer.java:652)
    at com.caucho.server.host.Host.start(Host.java:385)
    at com.caucho.server.deploy.DeployController.startImpl(DeployController.java:621)
    at com.caucho.server.deploy.StartAutoRedeployAutoStrategy.startOnInit(StartAutoRedeployAutoStrategy.java:72)
    at com.caucho.server.deploy.DeployController.startOnInit(DeployController.java:509)
    at com.caucho.server.deploy.DeployContainer.start(DeployContainer.java:158)
    at com.caucho.server.host.HostContainer.start(HostContainer.java:501)
    at com.caucho.server.resin.ServletServer.start(ServletServer.java:977)
    at com.caucho.server.deploy.DeployController.startImpl(DeployController.java:621)
    at com.caucho.server.deploy.AbstractDeployControllerStrategy.start(AbstractDeployControllerStrategy.java:56)
    at com.caucho.server.deploy.DeployController.start(DeployController.java:517)
    at com.caucho.server.resin.ResinServer.start(ResinServer.java:485)
    at com.caucho.server.resin.Resin.init(Resin.java)
    at com.caucho.server.resin.Resin.main(Resin.java:624)
[14:04:59.010] java.lang.NoSuchMethodError: javax.servlet.ServletContext.getContextPath()Ljava/lang/String;
[14:04:59.010]     at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:384)
[14:04:59.010]     at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
[14:04:59.010]     at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)
[14:04:59.010]     at com.caucho.server.webapp.Application.start(Application.java:1597)
[14:04:59.010]     at com.caucho.server.deploy.DeployController.startImpl(DeployController.java:621)
[14:04:59.010]     at com.caucho.server.deploy.StartAutoRedeployAutoStrategy.startOnInit(StartAutoRedeployAutoStrategy.java:72)
[14:04:59.010]     at com.caucho.server.deploy.DeployController.startOnInit(DeployController.java:509)
[14:04:59.010]     at com.caucho.server.deploy.DeployContainer.start(DeployContainer.java:158)
[14:04:59.010]     at com.caucho.server.webapp.ApplicationContainer.start(ApplicationContainer.java:652)
[14:04:59.010]     at com.caucho.server.host.Host.start(Host.java:385)
[14:04:59.010]     at com.caucho.server.deploy.DeployController.startImpl(DeployController.java:621)
[14:04:59.010]     at com.caucho.server.deploy.StartAutoRedeployAutoStrategy.startOnInit(StartAutoRedeployAutoStrategy.java:72)
[14:04:59.010]     at com.caucho.server.deploy.DeployController.startOnInit(DeployController.java:509)
[14:04:59.010]     at com.caucho.server.deploy.DeployContainer.start(DeployContainer.java:158)
[14:04:59.010]     at com.caucho.server.host.HostContainer.start(HostContainer.java:501)
[14:04:59.010]     at com.caucho.server.resin.ServletServer.start(ServletServer.java:977)
[14:04:59.010]     at com.caucho.server.deploy.DeployController.startImpl(DeployController.java:621)
[14:04:59.010]     at com.caucho.server.deploy.AbstractDeployControllerStrategy.start(AbstractDeployControllerStrategy.java:56)
[14:04:59.010]     at com.caucho.server.deploy.DeployController.start(DeployController.java:517)
[14:04:59.010]     at com.caucho.server.resin.ResinServer.start(ResinServer.java:485)
[14:04:59.010]     at com.caucho.server.resin.Resin.init(Resin.java)
[14:04:59.010]     at com.caucho.server.resin.Resin.main(Resin.java:624)
[org.springframework.web.context.support.StandardServletEnvironment] DEBUG - Adding [servletConfigInitParams] PropertySource with lowest search precedence
[org.springframework.web.context.support.StandardServletEnvironment] DEBUG - Adding [servletContextInitParams] PropertySource with lowest search precedence
[org.springframework.web.context.support.StandardServletEnvironment] DEBUG - Adding [jndiProperties] PropertySource with lowest search precedence
[org.springframework.web.context.support.StandardServletEnvironment] DEBUG - Adding [systemProperties] PropertySource with lowest search precedence
[org.springframework.web.context.support.StandardServletEnvironment] DEBUG - Adding [systemEnvironment] PropertySource with lowest search precedence
[org.springframework.web.context.support.StandardServletEnvironment] DEBUG - Initialized StandardServletEnvironment with PropertySources [servletConfigInitParams,servletContextInitParams,jndiProperties,systemProperties,systemEnvironment]
[org.springframework.web.filter.CharacterEncodingFilter] DEBUG - Initializing filter 'EncodingFilter'
[org.springframework.web.filter.CharacterEncodingFilter] DEBUG - Filter 'EncodingFilter' configured successfully
[14:04:59.403] WebApp[http://localhost:8081/resin-doc] starting
[14:04:59.432] com.caucho.config.LineConfigException: WEB-INF/web.xml:5: <web-app xmlns="http://java.sun.com/xml/ns/javaee"> is an unexpected top-level tag.
[14:04:59.432]
[14:04:59.432] <web-app xmlns="http://caucho.com/ns/resin">,
[14:04:59.432] <web-app xmlns="http://java.sun.com/xml/ns/j2ee"> or
[14:04:59.432] <web-app xmlns=""> are expected.
[14:04:59.432]
[14:04:59.432] Syntax: (<web-app> | <web-app> | <web-app>)
[14:04:59.438] Resin started in 1002ms




2.根据网上提示缺少Servlet-api.jar.导入后错误提示【如上面步骤一一样】








加载中
返回顶部
顶部