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

标签 java web-services tomcat soap jax-ws

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/

相关文章:

java - 如何将对象从android手机发送到servlet?

c# - ASP.NET WebHook 和 Web 服务之间的区别?

将war文件部署到webapps后,Java项目未从tomcat管理器在tomcat服务器上运行?

java - 如何使用jenkins将java web应用程序部署到tomcat服务器?

java - 拖放图像按钮有 onDrag 问题

java - 使用mockito调用方法时如何检查方法参数?

C# app.config 问题 - ConfigurationErrorsException : Unrecognized element 'setting'

Java EE 异常 : Name java:comp is not bound in this Context

java - Spring转换器、 validator 和DataBinder : how to handle multivalued bean fields individually?

java - Apache CXF : adding custom documentation in the WSDL?