suchen

Heim  >  Fragen und Antworten  >  Hauptteil

java - 将CAS 服务端工程 部署到tocmat7 ,启动时报错。

1.用的是eclipse+tomcat7。
2.部署工程是这样的,如下图

3.启动tomcat时报错,代码如下

五月 04, 2016 2:45:24 下午 org.apache.tomcat.util.digester.SetPropertiesRule begin
警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:cas-server-webapp' did not find a matching property.
五月 04, 2016 2:45:24 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server version:        Apache Tomcat/7.0.59
五月 04, 2016 2:45:24 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server built:          Jan 28 2015 15:51:10 UTC
五月 04, 2016 2:45:24 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server number:         7.0.59.0
五月 04, 2016 2:45:24 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Name:               Windows 7
五月 04, 2016 2:45:24 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Version:            6.1
五月 04, 2016 2:45:24 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Architecture:          amd64
五月 04, 2016 2:45:24 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Java Home:             D:\jdk1.7.0_71\jre
五月 04, 2016 2:45:24 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Version:           1.7.0_71-b14
五月 04, 2016 2:45:24 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Vendor:            Oracle Corporation
五月 04, 2016 2:45:24 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_BASE:         D:\tomcat7.0.59\apache-tomcat-7.0.59
五月 04, 2016 2:45:24 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_HOME:         D:\tomcat7.0.59\apache-tomcat-7.0.59
五月 04, 2016 2:45:24 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:62525
五月 04, 2016 2:45:24 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.base=D:\tomcat7.0.59\apache-tomcat-7.0.59
五月 04, 2016 2:45:24 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.home=D:\tomcat7.0.59\apache-tomcat-7.0.59
五月 04, 2016 2:45:24 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dwtp.deploy=D:\tomcat7.0.59\apache-tomcat-7.0.59\webapps
五月 04, 2016 2:45:24 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djava.endorsed.dirs=D:\tomcat7.0.59\apache-tomcat-7.0.59\endorsed
五月 04, 2016 2:45:24 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Xms256M
五月 04, 2016 2:45:24 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Xmx512M
五月 04, 2016 2:45:24 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -XX:PermSize=256m
五月 04, 2016 2:45:24 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -XX:MaxPermSize=512m
五月 04, 2016 2:45:24 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dfile.encoding=UTF-8
五月 04, 2016 2:45:24 下午 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: D:\jdk1.7.0_71\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;D:\jdk1.7.0_71\jre\bin;D:/jdk1.7.0_71/bin/../jre/bin/server;D:/jdk1.7.0_71/bin/../jre/bin;D:/jdk1.7.0_71/bin/../jre/lib/amd64;C:\ProgramData\Oracle\Java\javapath;C:\oracle\ora90\bin;D:\jdk1.7.0_71\bin;D:\jdk1.8.0_31/bin;D:\jdk1.6.0_43\bin;D:\tortoiseSVN1.8.11\bin;D:\maven3.2.3\apache-maven-3.2.3\bin;D:\TortoiseSVN1.6.11\bin;C:\Windows\system32;C:\Windows;;D:\eclipse;;.
五月 04, 2016 2:45:25 下午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["http-bio-8080"]
五月 04, 2016 2:45:25 下午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["http-bio-8444"]
五月 04, 2016 2:45:25 下午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["http-bio-8443"]
五月 04, 2016 2:45:25 下午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["ajp-bio-8009"]
五月 04, 2016 2:45:25 下午 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 1705 ms
五月 04, 2016 2:45:25 下午 org.apache.catalina.core.StandardService startInternal
信息: Starting service Catalina
五月 04, 2016 2:45:25 下午 org.apache.catalina.core.StandardEngine startInternal
信息: Starting Servlet Engine: Apache Tomcat/7.0.59
五月 04, 2016 2:45:39 下午 org.apache.catalina.core.ContainerBase startInternal
严重: A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/cas]]
    at java.util.concurrent.FutureTask.report(FutureTask.java:122)
    at java.util.concurrent.FutureTask.get(FutureTask.java:188)
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1123)
    at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:816)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1575)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1565)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/cas]]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
    ... 6 more
Caused by: java.lang.NoClassDefFoundError: org/jasig/cas/CasEnvironmentContextListener$AjcClosure3
    at java.lang.Class.getDeclaredFields0(Native Method)
    at java.lang.Class.privateGetDeclaredFields(Class.java:2499)
    at java.lang.Class.getDeclaredFields(Class.java:1811)
    at org.apache.catalina.util.Introspection.getDeclaredFields(Introspection.java:106)
    at org.apache.catalina.startup.WebAnnotationSet.loadFieldsAnnotation(WebAnnotationSet.java:270)
    at org.apache.catalina.startup.WebAnnotationSet.loadApplicationListenerAnnotations(WebAnnotationSet.java:89)
    at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:63)
    at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:415)
    at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:892)
    at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:386)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
    at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5412)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    ... 6 more
Caused by: java.lang.ClassNotFoundException: org.jasig.cas.CasEnvironmentContextListener$AjcClosure3
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1720)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571)
    ... 20 more

五月 04, 2016 2:45:39 下午 org.apache.catalina.core.ContainerBase startInternal
严重: A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost]]
    at java.util.concurrent.FutureTask.report(FutureTask.java:122)
    at java.util.concurrent.FutureTask.get(FutureTask.java:188)
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1123)
    at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:300)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:739)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:689)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:321)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:455)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost]]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1575)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1565)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.catalina.LifecycleException: A child container failed during start
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1131)
    at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:816)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    ... 6 more

五月 04, 2016 2:45:39 下午 org.apache.catalina.startup.Catalina start
严重: The required Server component failed to start so Tomcat is unable to start.
org.apache.catalina.LifecycleException: Failed to start component [StandardServer[8005]]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:689)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:321)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:455)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardService[Catalina]]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
    at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:739)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    ... 7 more
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina]]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
    at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    ... 9 more
Caused by: org.apache.catalina.LifecycleException: A child container failed during start
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1131)
    at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:300)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    ... 11 more

五月 04, 2016 2:45:39 下午 org.apache.coyote.AbstractProtocol pause
信息: Pausing ProtocolHandler ["http-bio-8080"]
五月 04, 2016 2:45:39 下午 org.apache.coyote.AbstractProtocol pause
信息: Pausing ProtocolHandler ["http-bio-8444"]
五月 04, 2016 2:45:39 下午 org.apache.coyote.AbstractProtocol pause
信息: Pausing ProtocolHandler ["http-bio-8443"]
五月 04, 2016 2:45:39 下午 org.apache.coyote.AbstractProtocol pause
信息: Pausing ProtocolHandler ["ajp-bio-8009"]
五月 04, 2016 2:45:39 下午 org.apache.catalina.core.StandardService stopInternal
信息: Stopping service Catalina
五月 04, 2016 2:45:39 下午 org.apache.coyote.AbstractProtocol destroy
信息: Destroying ProtocolHandler ["http-bio-8080"]
五月 04, 2016 2:45:39 下午 org.apache.coyote.AbstractProtocol destroy
信息: Destroying ProtocolHandler ["http-bio-8444"]
五月 04, 2016 2:45:39 下午 org.apache.coyote.AbstractProtocol destroy
信息: Destroying ProtocolHandler ["http-bio-8443"]
五月 04, 2016 2:45:39 下午 org.apache.coyote.AbstractProtocol destroy
信息: Destroying ProtocolHandler ["ajp-bio-8009"]

4.一看之下应该是缺少jar包,但是我在项目下的WEB-INF/lib下是有找到此jar包的。

5.我也将jar包放到tomcat目录下的lib,也还是没有能解决问题。

6.如果将工程打成war包,放在tomcat目录下时,启动和访问没有问题。

7.想了好久,不知道问题出现在了哪里,特来请教各位大神。
8.谢谢!!!

怪我咯怪我咯2769 Tage vor881

Antworte allen(0)Ich werde antworten

Keine Antwort
  • StornierenAntwort