Tomcat 6 网络应用程序无法启动



我使用的是Tomcat 6.0.29版本,JVM版本为1.6.0_51-b11-456-11M4508,来自Apple股份有限公司,运行在具有x86_64操作系统体系结构的Mac OS X 10.8.4版本上。这是因为我们使用的是老客户环境。

我正在使用IDEA和Ant一起构建web应用程序,构建脚本运行良好,除了第一次运行脚本之外,因为我后来遇到了构建错误。但是再次运行脚本可以使项目编译时没有任何问题。

但是web应用程序不会启动。当试图从Tomcat Web应用程序管理器启动它时,Tomcat说:FAIL-上下文路径/grgy上的应用程序无法启动,catalina.out写道:

Listening for transport dt_socket at address: 8000
2013-sep-04 20:00:40 org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: .:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java
2013-sep-04 20:00:40 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
2013-sep-04 20:00:40 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 506 ms
2013-sep-04 20:00:40 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
2013-sep-04 20:00:40 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.29
2013-sep-04 20:00:40 org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor host-manager.xml
2013-sep-04 20:00:41 org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor manager.xml
2013-sep-04 20:00:41 org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive jamwiki-1.2.4.war
2013-09-04 20:00:42
Full thread dump Java HotSpot(TM) 64-Bit Server VM (20.51-b01-456 mixed mode):
"GC Daemon" daemon prio=2 tid=7fe3cfbca800 nid=0x112938000 in Object.wait() [112937000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <7654d9498> (a sun.misc.GC$LatencyLock)
    at sun.misc.GC$Daemon.run(GC.java:100)
    - locked <7654d9498> (a sun.misc.GC$LatencyLock)
"AWT-AppKit" daemon prio=5 tid=7fe3cf82f000 nid=0x7fff7667b180 runnable [00000000]
   java.lang.Thread.State: RUNNABLE
"Low Memory Detector" daemon prio=5 tid=7fe3d0019000 nid=0x111bb2000 runnable [00000000]
   java.lang.Thread.State: RUNNABLE
"C2 CompilerThread1" daemon prio=9 tid=7fe3d0018000 nid=0x111aaf000 runnable [00000000]
   java.lang.Thread.State: RUNNABLE
"C2 CompilerThread0" daemon prio=9 tid=7fe3d0017800 nid=0x1119ac000 waiting on condition [00000000]
   java.lang.Thread.State: RUNNABLE
"JDWP Event Helper Thread" daemon prio=5 tid=7fe3d0016800 nid=0x1118a9000 runnable [00000000]
   java.lang.Thread.State: RUNNABLE
"JDWP Transport Listener: dt_socket" daemon prio=5 tid=7fe3d0016000 nid=0x1117a6000 runnable [00000000]
   java.lang.Thread.State: RUNNABLE
"Signal Dispatcher" daemon prio=9 tid=7fe3cc8fe000 nid=0x11169d000 waiting on condition [00000000]
   java.lang.Thread.State: RUNNABLE
"Surrogate Locker Thread (Concurrent GC)" daemon prio=5 tid=7fe3cc8fd000 nid=0x11159a000 waiting on condition [00000000]
   java.lang.Thread.State: RUNNABLE
"Finalizer" daemon prio=8 tid=7fe3d0015000 nid=0x11138f000 in Object.wait() [11138e000]
   java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <765330cf8> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:118)
    - locked <765330cf8> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:134)
    at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:171)
"Reference Handler" daemon prio=10 tid=7fe3d0014800 nid=0x11128c000 in Object.wait() [11128b000]
   java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <765330bc0> (a java.lang.ref.Reference$Lock)
    at java.lang.Object.wait(Object.java:485)
    at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:116)
    - locked <765330bc0> (a java.lang.ref.Reference$Lock)
"main" prio=5 tid=7fe3cd001000 nid=0x107488000 waiting on condition [107485000]
   java.lang.Thread.State: TIMED_WAITING (sleeping)
    at java.lang.Thread.sleep(Native Method)
    at sun.tools.attach.MacosxVirtualMachine.<init>(MacosxVirtualMachine.java:76)
    at sun.tools.attach.MacosxAttachProvider.attachVirtualMachine(MacosxAttachProvider.java:34)
    at com.sun.tools.attach.VirtualMachine.attach(VirtualMachine.java:195)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at net.sf.ehcache.pool.sizeof.AgentLoader.loadAgent(AgentLoader.java:131)
    at net.sf.ehcache.pool.sizeof.AgentSizeOf.<clinit>(AgentSizeOf.java:33)
    at net.sf.ehcache.pool.impl.DefaultSizeOfEngine.<init>(DefaultSizeOfEngine.java:86)
    at net.sf.ehcache.CacheManager.createSizeOfEngine(CacheManager.java:1820)
    at net.sf.ehcache.CacheManager.doInit(CacheManager.java:375)
    at net.sf.ehcache.CacheManager.init(CacheManager.java:352)
    at net.sf.ehcache.CacheManager.<init>(CacheManager.java:237)
    at org.jamwiki.utils.WikiCache.initialize(WikiCache.java:114)
    at org.jamwiki.servlets.JAMWikiListener.contextInitialized(JAMWikiListener.java:39)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4135)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4630)
    - locked <7654fe068> (a org.apache.catalina.core.StandardContext)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
    - locked <7654c5390> (a java.util.HashMap)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)
    at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:905)
    at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:740)
    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:500)
    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
    at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
    - locked <7654c52f8> (a org.apache.catalina.core.StandardHost)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
    - locked <7654c52f8> (a org.apache.catalina.core.StandardHost)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
    - locked <7654af570> (a org.apache.catalina.core.StandardEngine)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445)
    at org.apache.catalina.core.StandardService.start(StandardService.java:519)
    - locked <7654af570> (a org.apache.catalina.core.StandardEngine)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
    - locked <7654ca930> (a [Lorg.apache.catalina.Service;)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
"VM Thread" prio=9 tid=7fe3d0010000 nid=0x111189000 runnable 
"Gang worker#0 (Parallel GC Threads)" prio=9 tid=7fe3cc800800 nid=0x10a8cb000 runnable 
"Gang worker#1 (Parallel GC Threads)" prio=9 tid=7fe3cc801000 nid=0x10a9ce000 runnable 
"Gang worker#2 (Parallel GC Threads)" prio=9 tid=7fe3cc802000 nid=0x10aad1000 runnable 
"Gang worker#3 (Parallel GC Threads)" prio=9 tid=7fe3cc802800 nid=0x10abd4000 runnable 
"Concurrent Mark-Sweep GC Thread" prio=9 tid=7fe3cc87d800 nid=0x110e00000 runnable 
"VM Periodic Task Thread" prio=10 tid=7fe3d0022800 nid=0x111cb5000 waiting on condition 
"Exception Catcher Thread" prio=10 tid=7fe3cd001800 nid=0x1076f2000 runnable 
JNI global references: 4552
Heap
 par new generation   total 31040K, used 7757K [760000000, 7621a0000, 765330000)
  eden space 27648K,  15% used [760000000, 7604436a8, 761b00000)
  from space 3392K, 100% used [761e50000, 7621a0000, 7621a0000)
  to   space 3392K,   0% used [761b00000, 761b00000, 761e50000)
 concurrent mark-sweep generation total 240896K, used 2851K [765330000, 773e70000, 7e0000000)
 concurrent-mark-sweep perm gen total 25280K, used 25006K [7e0000000, 7e18b0000, 800000000)
2013-sep-04 20:00:48 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory docs
2013-sep-04 20:00:48 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory examples
2013-sep-04 20:00:48 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory grgy
2013-sep-04 20:00:51 com.sun.xml.ws.transport.http.servlet.WSServletContextListener contextInitialized
INFO: WSSERVLET12: JAX-WS context listener initializing
2013-sep-04 20:00:54 com.sun.xml.ws.server.MonitorBase createRoot
INFO: Metro monitoring rootname successfully set to: com.sun.metro:pp=/,type=WSEndpoint,name=/grgy-ChangeDocumentStatusService-ChangeDocumentStatusPort
2013-sep-04 20:00:54 com.sun.xml.ws.transport.http.servlet.WSServletDelegate <init>
INFO: WSSERVLET14: JAX-WS servlet initializing
2013-sep-04 20:00:54 org.apache.catalina.core.StandardContext start
ALLVARLIG: Error listenerStart
2013-sep-04 20:00:54 org.apache.catalina.core.StandardContext start
ALLVARLIG: Context [/grgy] startup failed due to previous errors
2013-sep-04 20:00:54 com.sun.xml.ws.transport.http.servlet.WSServletDelegate destroy
INFO: WSSERVLET15: JAX-WS servlet destroyed
2013-sep-04 20:00:54 com.sun.xml.ws.server.MonitorBase closeMOM
INFO: Closing Metro monitoring root: com.sun.metro:pp=/,type=WSEndpoint,name=/grgy-ChangeDocumentStatusService-ChangeDocumentStatusPort
2013-sep-04 20:00:54 com.sun.xml.ws.transport.http.servlet.WSServletContextListener contextDestroyed
INFO: WSSERVLET13: JAX-WS context listener destroyed
2013-sep-04 20:00:54 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
ALLVARLIG: The web application [/grgy] registered the JBDC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
2013-sep-04 20:00:54 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
ALLVARLIG: The web application [/grgy] appears to have started a thread named [MySQL Statement Cancellation Timer] but has failed to stop it. This is very likely to create a memory leak.
2013-sep-04 20:00:54 org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
ALLVARLIG: The web application [/grgy] created a ThreadLocal with key of type [null] (value [com.sun.xml.bind.v2.runtime.Coordinator$1@5ca554da]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@6a65e3ba]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
2013-sep-04 20:00:54 org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
ALLVARLIG: The web application [/grgy] created a ThreadLocal with key of type [null] (value [org.glassfish.gmbal.generic.OperationTracer$1@4749fee8]) and a value of type [java.util.ArrayList] (value [[]]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
2013-sep-04 20:00:54 org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
ALLVARLIG: The web application [/grgy] created a ThreadLocal with key of type [null] (value [com.sun.xml.bind.v2.ClassFactory$1@4afe55e8]) and a value of type [java.util.WeakHashMap] (value [{class com.sun.xml.ws.runtime.config.Tubelines=java.lang.ref.WeakReference@7b4e5966, class com.sun.xml.ws.runtime.config.TubelineDefinition=java.lang.ref.WeakReference@54cf76c8, class com.sun.xml.ws.runtime.config.MetroConfig=java.lang.ref.WeakReference@7f6ff8, class javax.xml.bind.annotation.W3CDomHandler=java.lang.ref.WeakReference@2e900309, class java.util.ArrayList=java.lang.ref.WeakReference@70b75bc0, class com.sun.xml.ws.runtime.config.TubeFactoryConfig=java.lang.ref.WeakReference@15e8d410, class com.sun.xml.ws.runtime.config.TubeFactoryList=java.lang.ref.WeakReference@68ba71ac, class javax.xml.bind.annotation.adapters.CollapsedStringAdapter=java.lang.ref.WeakReference@287d08eb}]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
log4j:ERROR LogMananger.repositorySelector was null likely due to error in class reloading, using NOPLoggerRepository.
2013-sep-04 20:00:55 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory ROOT
2013-sep-04 20:00:55 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
2013-sep-04 20:00:55 org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
2013-sep-04 20:00:55 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/27  config=null
2013-sep-04 20:00:55 org.apache.catalina.startup.Catalina start
INFO: Server startup in 14515 ms

在catalina.sh中,我修改了以下内容:

if [ -z "$LOGGING_MANAGER" ]; then
  JAVA_OPTS="$JAVA_OPTS -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Dfile.encoding=UTF-8 -Xms256m -Xmx2048m -XX:MaxPermSize=512m -Djava.awt.headless=true"
else 
  JAVA_OPTS="$JAVA_OPTS $LOGGING_MANAGER -Dfile.encoding=UTF-8 -Xms256m -Xmx2048m -XX:MaxPermSize=512m -Djava.awt.headless=true"
fi

有什么想法吗?问题出在哪里?我应该如何让我的网络应用程序重新启动并运行?

谨致问候,乔纳斯

显然事情并没有那么复杂。。。

我再次阅读了catalina.out的日志,并注意到有一个线程正在等待JAMWikListener。在Tomcat Web应用程序管理器中,JAMViki的启动是正确的,但当我尝试使用该应用程序时,我收到了一条丑陋的错误消息,说该应用程序不工作(当然我在转述)。

因此,我从我的网络应用程序文件夹中删除了JAMViki应用程序,然后一切都恢复正常。

谨致问候,乔纳斯

相关内容

  • 没有找到相关文章

最新更新