catalina.bat 开始不工作

发布于 2024-11-01 02:06:43 字数 17554 浏览 2 评论 0原文

由于某些奇怪的原因,我在启动 tomcat 时遇到问题,它曾经 之前启动没有问题。错误太长,无法复制 完全从命令提示符。有人知道可能出了什么问题吗?

    C:\apache-tomcat-7.0.8\bin>catalina.bat start

    Using CATALINA_BASE:   "C:\apache-tomcat-7.0.8"
    Using CATALINA_HOME:   "C:\apache-tomcat-7.0.8"
    Using CATALINA_TMPDIR: "C:\apache-tomcat-7.0.8\temp"

    Using JRE_HOME:        "C:\Program Files (x86)\Java\jdk1.6.0_23"
    Using CLASSPATH:       "C:\apache-tomcat-7.0.8\bin\bootstrap.jar;C:\apache-tomca
    t-7.0.8\bin\tomcat-juli.jar"



            at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
            at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.ja
    va:1035)

            at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.
    java:291)
            at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
            at org.apache.catalina.core.StandardService.startInternal(StandardServic

    e.java:443)
            at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
            at org.apache.catalina.core.StandardServer.startInternal(StandardServer.
    java:724)

            at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
            at org.apache.catalina.startup.Catalina.start(Catalina.java:620)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)

            at java.lang.reflect.Method.invoke(Method.java:597)
            at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:304)
            at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)

    12-Apr-2011 8:02:23 PM org.apache.catalina.startup.HostConfig deployDirectory
    INFO: Deploying web application directory examples
    12-Apr-2011 8:02:23 PM org.apache.catalina.startup.HostConfig deployDirectory

    SEVERE: Error deploying web application directory examples
    java.lang.NoSuchMethodError: javax.servlet.ServletContext.getSessionCookieConfig
    ()Ljavax/servlet/SessionCookieConfig;
            at org.apache.catalina.deploy.WebXml.configureContext(WebXml.java:1281)

            at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.jav
    a:1276)
            at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfi
    g.java:874)

            at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfi
    g.java:317)
            at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
    eSupport.java:119)

            at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBa
    se.java:89)
            at org.apache.catalina.core.StandardContext.startInternal(StandardContex
    t.java:4974)

            at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
            at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
    .java:812)
            at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:78

    7)
            at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:607)

            at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.jav
    a:1044)

            at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.j
    ava:967)
            at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:472
    )
            at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1302)

            at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java
    :311)
            at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
    eSupport.java:119)

            at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBa
    se.java:89)
            at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:34
    3)

            at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:32
    3)
            at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.ja
    va:1043)
            at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java

    :774)
            at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
            at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.ja
    va:1035)
            at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.

    java:291)
            at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
            at org.apache.catalina.core.StandardService.startInternal(StandardServic
    e.java:443)

            at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
            at org.apache.catalina.core.StandardServer.startInternal(StandardServer.
    java:724)
            at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)

            at org.apache.catalina.startup.Catalina.start(Catalina.java:620)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.

    java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:304)

            at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
    12-Apr-2011 8:02:23 PM org.apache.catalina.startup.HostConfig deployDirectory
    INFO: Deploying web application directory host-manager

    12-Apr-2011 8:02:23 PM org.apache.catalina.startup.HostConfig deployDirectory
    SEVERE: Error deploying web application directory host-manager
    java.lang.NoSuchMethodError: javax.servlet.ServletContext.getSessionCookieConfig

    ()Ljavax/servlet/SessionCookieConfig;
            at org.apache.catalina.deploy.WebXml.configureContext(WebXml.java:1281)
            at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.jav

    a:1276)
            at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfi
    g.java:874)
            at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfi

    g.java:317)
            at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
    eSupport.java:119)
            at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBa

    se.java:89)
            at org.apache.catalina.core.StandardContext.startInternal(StandardContex
    t.java:4974)
            at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)

            at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
    .java:812)
            at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:78
    7)
            at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:607)


            at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.jav
    a:1044)
            at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.j
    ava:967)

            at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:472
    )
            at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1302)
            at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java

    :311)
            at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
    eSupport.java:119)
            at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBa

    se.java:89)
            at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:34
    3)
            at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:32

    3)
            at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.ja
    va:1043)
            at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java
    :774)

            at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
            at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.ja
    va:1035)
            at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.

    java:291)
            at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
            at org.apache.catalina.core.StandardService.startInternal(StandardServic
    e.java:443)

            at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
            at org.apache.catalina.core.StandardServer.startInternal(StandardServer.
    java:724)
            at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)

            at org.apache.catalina.startup.Catalina.start(Catalina.java:620)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.

    java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:304)

            at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
    12-Apr-2011 8:02:23 PM org.apache.catalina.startup.HostConfig deployDirectory
    INFO: Deploying web application directory manager

    12-Apr-2011 8:02:23 PM org.apache.catalina.startup.HostConfig deployDirectory
    SEVERE: Error deploying web application directory manager
    java.lang.NoSuchMethodError: javax.servlet.ServletContext.getSessionCookieConfig

    ()Ljavax/servlet/SessionCookieConfig;
            at org.apache.catalina.deploy.WebXml.configureContext(WebXml.java:1281)
            at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.jav

    a:1276)
            at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfi
    g.java:874)
            at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfi

    g.java:317)
            at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
    eSupport.java:119)
            at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBa

    se.java:89)
            at org.apache.catalina.core.StandardContext.startInternal(StandardContex
    t.java:4974)
            at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)

            at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
    .java:812)
            at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:78
    7)
            at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:607)


            at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.jav
    a:1044)
            at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.j
    ava:967)

            at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:472
    )
            at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1302)
            at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java

    :311)
            at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
    eSupport.java:119)
            at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBa

    se.java:89)
            at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:34
    3)
            at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:32

    3)
            at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.ja
    va:1043)
            at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java
    :774)

            at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
            at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.ja
    va:1035)
            at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.

    java:291)
            at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
            at org.apache.catalina.core.StandardService.startInternal(StandardServic
    e.java:443)

            at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
            at org.apache.catalina.core.StandardServer.startInternal(StandardServer.
    java:724)
            at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)

            at org.apache.catalina.startup.Catalina.start(Catalina.java:620)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.

    java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:304)

            at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
    12-Apr-2011 8:02:23 PM org.apache.catalina.startup.HostConfig deployDirectory
    INFO: Deploying web application directory ROOT

    12-Apr-2011 8:02:23 PM org.apache.catalina.startup.HostConfig deployDirectory
    SEVERE: Error deploying web application directory ROOT
    java.lang.NoSuchMethodError: javax.servlet.ServletContext.getSessionCookieConfig

    ()Ljavax/servlet/SessionCookieConfig;
            at org.apache.catalina.deploy.WebXml.configureContext(WebXml.java:1281)
            at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.jav

    a:1276)
            at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfi
    g.java:874)
            at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfi

    g.java:317)
            at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
    eSupport.java:119)
            at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBa

    se.java:89)
            at org.apache.catalina.core.StandardContext.startInternal(StandardContex
    t.java:4974)
            at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)

            at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
    .java:812)
            at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:78
    7)
            at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:607)


            at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.jav
    a:1044)
            at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.j
    ava:967)

            at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:472
    )
            at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1302)
            at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java

    :311)
            at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
    eSupport.java:119)
            at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBa

    se.java:89)
            at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:34
    3)
            at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:32

    3)
            at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.ja
    va:1043)
            at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java
    :774)

            at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
            at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.ja
    va:1035)
            at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.

    java:291)
            at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
            at org.apache.catalina.core.StandardService.startInternal(StandardServic
    e.java:443)

            at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
            at org.apache.catalina.core.StandardServer.startInternal(StandardServer.
    java:724)
            at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)

            at org.apache.catalina.startup.Catalina.start(Catalina.java:620)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.

    java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:304)

            at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
    12-Apr-2011 8:02:23 PM org.apache.coyote.AbstractProtocolHandler start
    INFO: Starting ProtocolHandler ["http-apr-8080"]

    12-Apr-2011 8:02:23 PM org.apache.coyote.AbstractProtocolHandler start
    INFO: Starting ProtocolHandler ["ajp-apr-8009"]
    12-Apr-2011 8:02:23 PM org.apache.catalina.startup.Catalina start

    INFO: Server startup in 801 ms

I am having problems starting tomcat for some strange reason, it used to
start before without a problem. The error is so long that I can't copy it
completely from the command prompt. Anyone know what could be going wrong?

    C:\apache-tomcat-7.0.8\bin>catalina.bat start

    Using CATALINA_BASE:   "C:\apache-tomcat-7.0.8"
    Using CATALINA_HOME:   "C:\apache-tomcat-7.0.8"
    Using CATALINA_TMPDIR: "C:\apache-tomcat-7.0.8\temp"

    Using JRE_HOME:        "C:\Program Files (x86)\Java\jdk1.6.0_23"
    Using CLASSPATH:       "C:\apache-tomcat-7.0.8\bin\bootstrap.jar;C:\apache-tomca
    t-7.0.8\bin\tomcat-juli.jar"



            at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
            at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.ja
    va:1035)

            at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.
    java:291)
            at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
            at org.apache.catalina.core.StandardService.startInternal(StandardServic

    e.java:443)
            at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
            at org.apache.catalina.core.StandardServer.startInternal(StandardServer.
    java:724)

            at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
            at org.apache.catalina.startup.Catalina.start(Catalina.java:620)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)

            at java.lang.reflect.Method.invoke(Method.java:597)
            at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:304)
            at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)

    12-Apr-2011 8:02:23 PM org.apache.catalina.startup.HostConfig deployDirectory
    INFO: Deploying web application directory examples
    12-Apr-2011 8:02:23 PM org.apache.catalina.startup.HostConfig deployDirectory

    SEVERE: Error deploying web application directory examples
    java.lang.NoSuchMethodError: javax.servlet.ServletContext.getSessionCookieConfig
    ()Ljavax/servlet/SessionCookieConfig;
            at org.apache.catalina.deploy.WebXml.configureContext(WebXml.java:1281)

            at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.jav
    a:1276)
            at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfi
    g.java:874)

            at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfi
    g.java:317)
            at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
    eSupport.java:119)

            at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBa
    se.java:89)
            at org.apache.catalina.core.StandardContext.startInternal(StandardContex
    t.java:4974)

            at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
            at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
    .java:812)
            at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:78

    7)
            at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:607)

            at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.jav
    a:1044)

            at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.j
    ava:967)
            at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:472
    )
            at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1302)

            at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java
    :311)
            at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
    eSupport.java:119)

            at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBa
    se.java:89)
            at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:34
    3)

            at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:32
    3)
            at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.ja
    va:1043)
            at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java

    :774)
            at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
            at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.ja
    va:1035)
            at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.

    java:291)
            at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
            at org.apache.catalina.core.StandardService.startInternal(StandardServic
    e.java:443)

            at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
            at org.apache.catalina.core.StandardServer.startInternal(StandardServer.
    java:724)
            at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)

            at org.apache.catalina.startup.Catalina.start(Catalina.java:620)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.

    java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:304)

            at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
    12-Apr-2011 8:02:23 PM org.apache.catalina.startup.HostConfig deployDirectory
    INFO: Deploying web application directory host-manager

    12-Apr-2011 8:02:23 PM org.apache.catalina.startup.HostConfig deployDirectory
    SEVERE: Error deploying web application directory host-manager
    java.lang.NoSuchMethodError: javax.servlet.ServletContext.getSessionCookieConfig

    ()Ljavax/servlet/SessionCookieConfig;
            at org.apache.catalina.deploy.WebXml.configureContext(WebXml.java:1281)
            at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.jav

    a:1276)
            at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfi
    g.java:874)
            at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfi

    g.java:317)
            at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
    eSupport.java:119)
            at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBa

    se.java:89)
            at org.apache.catalina.core.StandardContext.startInternal(StandardContex
    t.java:4974)
            at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)

            at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
    .java:812)
            at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:78
    7)
            at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:607)


            at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.jav
    a:1044)
            at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.j
    ava:967)

            at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:472
    )
            at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1302)
            at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java

    :311)
            at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
    eSupport.java:119)
            at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBa

    se.java:89)
            at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:34
    3)
            at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:32

    3)
            at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.ja
    va:1043)
            at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java
    :774)

            at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
            at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.ja
    va:1035)
            at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.

    java:291)
            at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
            at org.apache.catalina.core.StandardService.startInternal(StandardServic
    e.java:443)

            at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
            at org.apache.catalina.core.StandardServer.startInternal(StandardServer.
    java:724)
            at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)

            at org.apache.catalina.startup.Catalina.start(Catalina.java:620)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.

    java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:304)

            at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
    12-Apr-2011 8:02:23 PM org.apache.catalina.startup.HostConfig deployDirectory
    INFO: Deploying web application directory manager

    12-Apr-2011 8:02:23 PM org.apache.catalina.startup.HostConfig deployDirectory
    SEVERE: Error deploying web application directory manager
    java.lang.NoSuchMethodError: javax.servlet.ServletContext.getSessionCookieConfig

    ()Ljavax/servlet/SessionCookieConfig;
            at org.apache.catalina.deploy.WebXml.configureContext(WebXml.java:1281)
            at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.jav

    a:1276)
            at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfi
    g.java:874)
            at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfi

    g.java:317)
            at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
    eSupport.java:119)
            at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBa

    se.java:89)
            at org.apache.catalina.core.StandardContext.startInternal(StandardContex
    t.java:4974)
            at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)

            at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
    .java:812)
            at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:78
    7)
            at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:607)


            at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.jav
    a:1044)
            at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.j
    ava:967)

            at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:472
    )
            at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1302)
            at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java

    :311)
            at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
    eSupport.java:119)
            at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBa

    se.java:89)
            at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:34
    3)
            at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:32

    3)
            at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.ja
    va:1043)
            at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java
    :774)

            at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
            at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.ja
    va:1035)
            at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.

    java:291)
            at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
            at org.apache.catalina.core.StandardService.startInternal(StandardServic
    e.java:443)

            at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
            at org.apache.catalina.core.StandardServer.startInternal(StandardServer.
    java:724)
            at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)

            at org.apache.catalina.startup.Catalina.start(Catalina.java:620)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.

    java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:304)

            at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
    12-Apr-2011 8:02:23 PM org.apache.catalina.startup.HostConfig deployDirectory
    INFO: Deploying web application directory ROOT

    12-Apr-2011 8:02:23 PM org.apache.catalina.startup.HostConfig deployDirectory
    SEVERE: Error deploying web application directory ROOT
    java.lang.NoSuchMethodError: javax.servlet.ServletContext.getSessionCookieConfig

    ()Ljavax/servlet/SessionCookieConfig;
            at org.apache.catalina.deploy.WebXml.configureContext(WebXml.java:1281)
            at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.jav

    a:1276)
            at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfi
    g.java:874)
            at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfi

    g.java:317)
            at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
    eSupport.java:119)
            at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBa

    se.java:89)
            at org.apache.catalina.core.StandardContext.startInternal(StandardContex
    t.java:4974)
            at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)

            at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
    .java:812)
            at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:78
    7)
            at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:607)


            at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.jav
    a:1044)
            at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.j
    ava:967)

            at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:472
    )
            at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1302)
            at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java

    :311)
            at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
    eSupport.java:119)
            at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBa

    se.java:89)
            at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:34
    3)
            at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:32

    3)
            at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.ja
    va:1043)
            at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java
    :774)

            at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
            at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.ja
    va:1035)
            at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.

    java:291)
            at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
            at org.apache.catalina.core.StandardService.startInternal(StandardServic
    e.java:443)

            at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
            at org.apache.catalina.core.StandardServer.startInternal(StandardServer.
    java:724)
            at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)

            at org.apache.catalina.startup.Catalina.start(Catalina.java:620)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.

    java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:304)

            at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
    12-Apr-2011 8:02:23 PM org.apache.coyote.AbstractProtocolHandler start
    INFO: Starting ProtocolHandler ["http-apr-8080"]

    12-Apr-2011 8:02:23 PM org.apache.coyote.AbstractProtocolHandler start
    INFO: Starting ProtocolHandler ["ajp-apr-8009"]
    12-Apr-2011 8:02:23 PM org.apache.catalina.startup.Catalina start

    INFO: Server startup in 801 ms

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

温馨耳语 2024-11-08 02:06:43
Error Message: java.lang.NoSuchMethodError: javax.servlet.ServletContext.getSessionCookieConfig()
Ljavax/servlet/SessionCookieConfig;

症状:Tomcat 无法启动

可能原因:这是 Servlets 3.0 中的新方法(Tomcat 7 支持)。
有一个 Servlets 2.x API 是您的 CLASSPATHJDK 扩展目录。
解决方案:检查您的CLASSPATH。从 JDK 的 扩展目录中删除 servlet-api.jar(如果有)。

来源:http://www3.ntu.edu.sg/home /ehchua/programming/howto/Tomcat_HowTo.html

Error Message: java.lang.NoSuchMethodError: javax.servlet.ServletContext.getSessionCookieConfig()
Ljavax/servlet/SessionCookieConfig;

Symptoms: Tomcat cannot start

Probable Causes: This is a new method in Servlets 3.0 (which Tomcat 7 supports).
There is a Servlets 2.x API is your CLASSPATH or JDK's extension directory.
Solution: Check your CLASSPATH. Remove servlet-api.jar from JDK's extension directory if any.

Source: http://www3.ntu.edu.sg/home/ehchua/programming/howto/Tomcat_HowTo.html

一身骄傲 2024-11-08 02:06:43

我通过将以下 jar 添加到我的 tomcat/lib 目录解决了这个确切的错误:

javax.persistence-2.0.0.jar

persistence-api-1.0.2.jar

您可以在此处找到最新版本: http://mvnrepository.com/

I resolved this exact error by adding the following jars to my tomcat/lib directory:

javax.persistence-2.0.0.jar

persistence-api-1.0.2.jar

You can find the latest versions here: http://mvnrepository.com/

守望孤独 2024-11-08 02:06:43

如果您编译了一个包含其运行时依赖项的 jar,并且引用了旧版本的 tomcat servlet-api.jar,也可能会发生这种情况。

然后,当您的 jar 加载到不同版本的 Tomcat 中时,servlet api 不正确,并抛出此错误。

因此,请检查您的 jar 是如何编译的,并确保它不以某种方式将 servlet-api.jar 作为依赖项包含在内!

This can also happen if you have compiled a jar that includes it's runtime dependencies, and has a reference to an old version of the tomcat servlet-api.jar.

Then when your jar is loaded in a different version of Tomcat, the servlet api is incorrect, and it throws this error.

So check how your jar is compiled and make sure it's not including the servlet-api.jar as a dependency in some way!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文