gpt4 book ai didi

java - Tomcat 在未部署时抛出严重警告

转载 作者:行者123 更新时间:2023-11-28 22:27:37 26 4
gpt4 key购买 nike

Tomcat版本:7.0.41(也试过8.0.32)
JRE: 6u42
编写了一个非常简单的 JAX-WS 应用程序(作为测试)。当使用“?wsdl”时,应用程序目前只显示 wsdl 文件,当给出 SOAP 请求时,我只是返回一个字符串。

@WebService
public class SOAPWithWS
{
@WebMethod
public String HelloTest(String sMessage)
{
return "Received : " + sMessage;
}
}

当我尝试取消部署上下文时,它会给我如下警告:

Mar 09, 2016 1:54:24 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [/WS] created a ThreadLocal with key of type [com.sun.xml.bind.v2.runtime.Coordinator$1] (value [com.sun.xml.bind.v2.runtime.Coordinator$1@3e26faf2]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@712545be]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
Mar 09, 2016 1:54:24 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [/WS] created a ThreadLocal with key of type [com.sun.xml.bind.v2.ClassFactory$1] (value [com.sun.xml.bind.v2.ClassFactory$1@4605f6fa]) and a value of type [java.util.WeakHashMap] (value [{class com.sun.xml.ws.runtime.config.TubelineDefinition=java.lang.ref.WeakReference@3199bb00, class com.sun.xml.ws.runtime.config.TubeFactoryConfig=java.lang.ref.WeakReference@63c41670, class javax.xml.bind.annotation.adapters.CollapsedStringAdapter=java.lang.ref.WeakReference@5e9d463b, class com.sun.xml.ws.runtime.config.Tubelines=java.lang.ref.WeakReference@276dfc04, class javax.xml.bind.annotation.W3CDomHandler=java.lang.ref.WeakReference@25bc7ed5, class java.util.ArrayList=java.lang.ref.WeakReference@7a2ae54d, class com.sun.xml.ws.runtime.config.MetroConfig=java.lang.ref.WeakReference@163460e4, class com.sun.xml.ws.runtime.config.TubeFactoryList=java.lang.ref.WeakReference@48c5241f}]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
Mar 09, 2016 1:54:24 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [/WS] created a ThreadLocal with key of type [org.glassfish.gmbal.generic.OperationTracer$1] (value [org.glassfish.gmbal.generic.OperationTracer$1@6c6948c]) and a value of type [java.util.ArrayList] (value [[]]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.

每次我测试时都会发生这种情况。 GlassFish 服务器上不会发生同样的情况(只是试图测试这种情况)。知道发生了什么以及如何消除这个问题吗?

最佳答案

您的应用程序存在内存泄漏。检查此主题,它可能会有所帮助;

What are these warnings in catalina.out?

关于java - Tomcat 在未部署时抛出严重警告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35893990/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com