当我尝试在linux机器上部署我的项目时,我遇到了异常,我正在为我的项目使用Spring和hibernate框架。以下是catalin.out中的错误
Using CATALINA_BASE: /usr/share/tomcat5
Using CATALINA_HOME: /usr/share/tomcat5
Using CATALINA_TMPDIR: /usr/share/tomcat5/temp
Using JRE_HOME:
Created MBeanServer with ID: oovd91:gmddgare.0:leeginweb1.inetu.net:1
Using CATALINA_BASE: /usr/share/tomcat5
Using CATALINA_HOME: /usr/share/tomcat5
Using CATALINA_TMPDIR: /usr/share/tomcat5/temp
Using JRE_HOME:
Created MBeanServer with ID: onrubt:gmddgel2.0:leeginweb1.inetu.net:1
11-Apr-11 8:21:38 AM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/lib/gcj-4.1.2
11-Apr-11 8:21:38 AM org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
11-Apr-11 8:21:38 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 477 ms
11-Apr-11 8:21:38 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
11-Apr-11 8:21:38 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.23
11-Apr-11 8:21:38 AM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
11-Apr-11 8:21:38 AM org.apache.catalina.core.ContainerBase addChildInternal
SEVERE: ContainerBase.addChild: start:
LifecycleException: Error initializaing : java.lang.NullPointerException
at org.apache.catalina.core.StandardContext.start(catalina-5.5.23.jar.sozxb574.so)
at org.apache.catalina.core.ContainerBase.addChildInternal(catalina-5.5.23.jar.sozxb574.so)
at org.apache.catalina.core.ContainerBase.addChild(catalina-5.5.23.jar.sozxb574.so)
at org.apache.catalina.core.StandardHost.addChild(catalina-5.5.23.jar.sozxb574.so)
at org.apache.catalina.startup.HostConfig.deployDescriptor(catalina-5.5.23.jar.sozxb574.so)
at org.apache.catalina.startup.HostConfig.deployDescriptors(catalina-5.5.23.jar.sozxb574.so)
at org.apache.catalina.startup.HostConfig.deployApps(catalina-5.5.23.jar.sozxb574.so)
at org.apache.catalina.startup.HostConfig.start(catalina-5.5.23.jar.sozxb574.so)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(catalina-5.5.23.jar.sozxb574.so)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(catalina-5.5.23.jar.sozxb574.so)
at org.apache.catalina.core.ContainerBase.start(catalina-5.5.23.jar.sozxb574.so)
at org.apache.catalina.core.StandardHost.start(catalina-5.5.23.jar.sozxb574.so)
at org.apache.catalina.core.ContainerBase.start(catalina-5.5.23.jar.sozxb574.so)
at org.apache.catalina.core.StandardEngine.start(catalina-5.5.23.jar.sozxb574.so)
at org.apache.catalina.core.StandardService.start(catalina-5.5.23.jar.sozxb574.so)
at org.apache.catalina.core.StandardServer.start(catalina-5.5.23.jar.sozxb574.so)
at org.apache.catalina.startup.Catalina.start(catalina-5.5.23.jar.sozxb574.so)
at java.lang.reflect.Method.invoke(libgcj.so.7rh)
at org.apache.catalina.startup.Bootstrap.start(bootstrap.jar.so)
at org.apache.catalina.startup.Bootstrap.main(bootstrap.jar.so)
11-Apr-11 8:21:38 AM org.apache.catalina.startup.HostConfig deployDescriptor
SEVERE: Error deploying configuration descriptor Brighton.xml
java.lang.IllegalStateException: ContainerBase.addChild: start: LifecycleException: Error initializaing : java.lang.NullPointerException
at org.apache.catalina.core.ContainerBase.addChildInternal(catalina-5.5.23.jar.sozxb574.so)
at org.apache.catalina.core.ContainerBase.addChild(catalina-5.5.23.jar.sozxb574.so)
at org.apache.catalina.core.StandardHost.addChild(catalina-5.5.23.jar.sozxb574.so)
at org.apache.catalina.startup.HostConfig.deployDescriptor(catalina-5.5.23.jar.sozxb574.so)
at org.apache.catalina.startup.HostConfig.deployDescriptors(catalina-5.5.23.jar.sozxb574.so)
at org.apache.catalina.startup.HostConfig.deployApps(catalina-5.5.23.jar.sozxb574.so)
at org.apache.catalina.startup.HostConfig.start(catalina-5.5.23.jar.sozxb574.so)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(catalina-5.5.23.jar.sozxb574.so)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(catalina-5.5.23.jar.sozxb574.so)
at org.apache.catalina.core.ContainerBase.start(catalina-5.5.23.jar.sozxb574.so)
at org.apache.catalina.core.StandardHost.start(catalina-5.5.23.jar.sozxb574.so)
at org.apache.catalina.core.ContainerBase.start(catalina-5.5.23.jar.sozxb574.so)
at org.apache.catalina.core.StandardEngine.start(catalina-5.5.23.jar.sozxb574.so)
at org.apache.catalina.core.StandardService.start(catalina-5.5.23.jar.sozxb574.so)
at org.apache.catalina.core.StandardServer.start(catalina-5.5.23.jar.sozxb574.so)
at org.apache.catalina.startup.Catalina.start(catalina-5.5.23.jar.sozxb574.so)
at java.lang.reflect.Method.invoke(libgcj.so.7rh)
at org.apache.catalina.startup.Bootstrap.start(bootstrap.jar.so)
at org.apache.catalina.startup.Bootstrap.main(bootstrap.jar.so)
11-Apr-11 8:21:38 AM org.apache.catalina.core.ContainerBase addChildInternal
SEVERE: ContainerBase.addChild: start:
LifecycleException: Error initializaing : java.lang.NullPointerException
at org.apache.catalina.core.StandardContext.start(catalina-5.5.23.jar.sozxb574.so)
at org.apache.catalina.core.ContainerBase.addChildInternal(catalina-5.5.23.jar.sozxb574.so)
at org.apache.catalina.core.ContainerBase.addChild(catalina-5.5.23.jar.sozxb574.so)
at org.apache.catalina.core.StandardHost.addChild(catalina-5.5.23.jar.sozxb574.so)
at org.apache.catalina.startup.HostConfig.deployDescriptor(catalina-5.5.23.jar.sozxb574.so)
at org.apache.catalina.startup.HostConfig.deployDescriptors(catalina-5.5.23.jar.sozxb574.so)
at org.apache.catalina.startup.HostConfig.deployApps(catalina-5.5.23.jar.sozxb574.so)
at org.apache.catalina.startup.HostConfig.start(catalina-5.5.23.jar.sozxb574.so)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(catalina-5.5.23.jar.sozxb574.so)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(catalina-5.5.23.jar.sozxb574.so)
at org.apache.catalina.core.ContainerBase.start(catalina-5.5.23.jar.sozxb574.so)
at org.apache.catalina.core.StandardHost.start(catalina-5.5.23.jar.sozxb574.so)
at org.apache.catalina.core.ContainerBase.start(catalina-5.5.23.jar.sozxb574.so)
at org.apache.catalina.core.StandardEngine.start(catalina-5.5.23.jar.sozxb574.so)
at org.apache.catalina.core.StandardService.start(catalina-5.5.23.jar.sozxb574.so)
at org.apache.catalina.core.StandardServer.start(catalina-5.5.23.jar.sozxb574.so)
at org.apache.catalina.startup.Catalina.start(catalina-5.5.23.jar.sozxb574.so)
at java.lang.reflect.Method.invoke(libgcj.so.7rh)
at org.apache.catalina.startup.Bootstrap.start(bootstrap.jar.so)
at org.apache.catalina.startup.Bootstrap.main(bootstrap.jar.so)
11-Apr-11 8:21:38 AM org.apache.catalina.startup.HostConfig deployDescriptor
SEVERE: Error deploying configuration descriptor TrackingToolWebService.xml
java.lang.IllegalStateException: ContainerBase.addChild: start: LifecycleException: Error initializaing : java.lang.NullPointerException
at org.apache.catalina.core.ContainerBase.addChildInternal(catalina-5.5.23.jar.sozxb574.so)
at org.apache.catalina.core.ContainerBase.addChild(catalina-5.5.23.jar.sozxb574.so)
at org.apache.catalina.core.StandardHost.addChild(catalina-5.5.23.jar.sozxb574.so)
at org.apache.catalina.startup.HostConfig.deployDescriptor(catalina-5.5.23.jar.sozxb574.so)
at org.apache.catalina.startup.HostConfig.deployDescriptors(catalina-5.5.23.jar.sozxb574.so)
at org.apache.catalina.startup.HostConfig.deployApps(catalina-5.5.23.jar.sozxb574.so)
at org.apache.catalina.startup.HostConfig.start(catalina-5.5.23.jar.sozxb574.so)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(catalina-5.5.23.jar.sozxb574.so)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(catalina-5.5.23.jar.sozxb574.so)
at org.apache.catalina.core.ContainerBase.start(catalina-5.5.23.jar.sozxb574.so)
at org.apache.catalina.core.StandardHost.start(catalina-5.5.23.jar.sozxb574.so)
at org.apache.catalina.core.ContainerBase.start(catalina-5.5.23.jar.sozxb574.so)
at org.apache.catalina.core.StandardEngine.start(catalina-5.5.23.jar.sozxb574.so)
at org.apache.catalina.core.StandardService.start(catalina-5.5.23.jar.sozxb574.so)
at org.apache.catalina.core.StandardServer.start(catalina-5.5.23.jar.sozxb574.so)
at org.apache.catalina.startup.Catalina.start(catalina-5.5.23.jar.sozxb574.so)
at java.lang.reflect.Method.invoke(libgcj.so.7rh)
at org.apache.catalina.startup.Bootstrap.start(bootstrap.jar.so)
at org.apache.catalina.startup.Bootstrap.main(bootstrap.jar.so)
11-Apr-11 8:21:39 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive Brighton.war
11-Apr-11 8:21:39 AM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Error configuring application listener of class org.springframework.web.context.ContextLoaderListener
java.lang.NoClassDefFoundError: org.springframework.web.context.ContextLoader
at java.lang.Class.initializeClass(libgcj.so.7rh)
at java.lang.Class.initializeClass(libgcj.so.7rh)
at java.lang.Class.newInstance(libgcj.so.7rh)
at org.apache.catalina.core.StandardContext.listenerStart(catalina-5.5.23.jar.sozxb574.so)
at org.apache.catalina.core.StandardContext.start(catalina-5.5.23.jar.sozxb574.so)
at org.apache.catalina.core.ContainerBase.addChildInternal(catalina-5.5.23.jar.sozxb574.so)
at org.apache.catalina.core.ContainerBase.addChild(catalina-5.5.23.jar.sozxb574.so)
at org.apache.catalina.core.StandardHost.addChild(catalina-5.5.23.jar.sozxb574.so)
at org.apache.catalina.startup.HostConfig.deployWAR(catalina-5.5.23.jar.sozxb574.so)
at org.apache.catalina.startup.HostConfig.deployWARs(catalina-5.5.23.jar.sozxb574.so)
at org.apache.catalina.startup.HostConfig.deployApps(catalina-5.5.23.jar.sozxb574.so)
at org.apache.catalina.startup.HostConfig.start(catalina-5.5.23.jar.sozxb574.so)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(catalina-5.5.23.jar.sozxb574.so)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(catalina-5.5.23.jar.sozxb574.so)
at org.apache.catalina.core.ContainerBase.start(catalina-5.5.23.jar.sozxb574.so)
at org.apache.catalina.core.StandardHost.start(catalina-5.5.23.jar.sozxb574.so)
at org.apache.catalina.core.ContainerBase.start(catalina-5.5.23.jar.sozxb574.so)
at org.apache.catalina.core.StandardEngine.start(catalina-5.5.23.jar.sozxb574.so)
at org.apache.catalina.core.StandardService.start(catalina-5.5.23.jar.sozxb574.so)
at org.apache.catalina.core.StandardServer.start(catalina-5.5.23.jar.sozxb574.so)
at org.apache.catalina.startup.Catalina.start(catalina-5.5.23.jar.sozxb574.so)
at java.lang.reflect.Method.invoke(libgcj.so.7rh)
at org.apache.catalina.startup.Bootstrap.start(bootstrap.jar.so)
at org.apache.catalina.startup.Bootstrap.main(bootstrap.jar.so)
Caused by: java.lang.ClassNotFoundException: java.util.concurrent.ConcurrentHashMap
at org.apache.catalina.loader.WebappClassLoader.loadClass(catalina-5.5.23.jar.sozxb574.so)
at org.apache.catalina.loader.WebappClassLoader.loadClass(catalina-5.5.23.jar.sozxb574.so)
at java.lang.Class.forName(libgcj.so.7rh)
at java.lang.Class.initializeClass(libgcj.so.7rh)
...23 more
11-Apr-11 8:21:39 AM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Skipped installing application listeners due to previous error(s)
11-Apr-11 8:21:39 AM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
11-Apr-11 8:21:39 AM org.apache.catalina.core.StandardContext start
SEVERE: Context [/Brighton] startup failed due to previous errors
11-Apr-11 8:21:39 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive TrackingToolWebService.war
log4j:WARN No appenders could be found for logger (org.apache.commons.digester.Digester.sax).
log4j:WARN Please initialize the log4j system properly.
11-Apr-11 8:21:41 AM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
11-Apr-11 8:21:41 AM org.apache.catalina.core.StandardContext start
SEVERE: Context [/TrackingToolWebService] startup failed due to previous errors
11-Apr-11 8:21:41 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
11-Apr-11 8:21:41 AM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
11-Apr-11 8:21:41 AM org.apache.catalina.core.ApplicationContext log
INFO: org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: [org.apache.webapp.balancer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News / Redirect URL: http://www.cnn.com], [org.apache.webapp.balancer.rules.RequestParameterRule: Target param name: paramName / Target param value: paramValue / Redirect URL: ], [org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL: http://jakarta.apache.org]]
11-Apr-11 8:21:41 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
11-Apr-11 8:21:41 AM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
11-Apr-11 8:21:42 AM org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
11-Apr-11 8:21:42 AM org.apache.catalina.connector.MapperListener init
INFO: Registering Hosts
11-Apr-11 8:21:42 AM org.apache.catalina.connector.MapperListener init
INFO: Registering WebModule Contexts
11-Apr-11 8:21:42 AM org.apache.catalina.connector.MapperListener init
INFO: Registering Servlets
11-Apr-11 8:21:42 AM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
11-Apr-11 8:21:42 AM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/34 config=null
11-Apr-11 8:21:42 AM org.apache.catalina.connector.MapperListener init
INFO: Registering Hosts
11-Apr-11 8:21:42 AM org.apache.catalina.connector.MapperListener init
INFO: Registering WebModule Contexts
11-Apr-11 8:21:42 AM org.apache.catalina.connector.MapperListener init
INFO: Registering Servlets
11-Apr-11 8:21:42 AM org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
11-Apr-11 8:21:42 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 4364 m
答案 0 :(得分:3)
异常java.lang.NoClassDefFoundError: org.springframework.web.context.ContextLoader
至少表明您缺少Spring框架JAR文件:spring-web-<version>.jar
。此JAR必须是WAR文件分发的一部分。捆绑WAR文件时,请确保它最终位于WEB-INF/lib
。您可能必须添加多个这样的JAR文件。检查您的日志,看看是否还有java.lang.NoClassDefFoundError
个。