OutOfMemoryError Java堆空间

时间:2013-10-07 06:44:48

标签: java tomcat

我们在tomcat 5.5上使用JDK6生产环境。上周将系统升级到tomcat 7 JDK 7.从那以后,我们每天都会收到OutOfMemoryError。

我添加了标记来捕获OOM上的堆转储。使用Memory Analyzer Tool分析它们。转储显示可疑对象com.sun.org.apache.xml.internal.resolver.Catalog浅大小〜56B,保留大小~1.3 GB,带有以下堆栈跟踪

http-apr-8080-exec-36
  at java.util.zip.ZipCoder.getBytes(Ljava/lang/String;)[B (Unknown Source)
  at java.util.zip.ZipFile.getEntry(Ljava/lang/String;)Ljava/util/zip/ZipEntry; (Unknown Source)
  at java.util.jar.JarFile.getEntry(Ljava/lang/String;)Ljava/util/zip/ZipEntry; (Unknown Source)
  at java.util.jar.JarFile.getJarEntry(Ljava/lang/String;)Ljava/util/jar/JarEntry; (Unknown Source)
  at sun.misc.URLClassPath$JarLoader.getResource(Ljava/lang/String;Z)Lsun/misc/Resource; (Unknown Source)
  at sun.misc.URLClassPath$JarLoader.findResource(Ljava/lang/String;Z)Ljava/net/URL; (Unknown Source)
  at sun.misc.URLClassPath$1.next()Z (Unknown Source)
  at sun.misc.URLClassPath$1.hasMoreElements()Z (Unknown Source)
  at java.net.URLClassLoader$3$1.run()Ljava/net/URL; (Unknown Source)
  at java.net.URLClassLoader$3$1.run()Ljava/lang/Object; (Unknown Source)
  at java.security.AccessController.doPrivileged(Ljava/security/PrivilegedAction;Ljava/security/AccessControlContext;)Ljava/lang/Object; (Native Method)
  at java.net.URLClassLoader$3.next()Z (Unknown Source)
  at java.net.URLClassLoader$3.hasMoreElements()Z (Unknown Source)
  at sun.misc.CompoundEnumeration.next()Z (Unknown Source)
  at sun.misc.CompoundEnumeration.hasMoreElements()Z (Unknown Source)
  at sun.misc.CompoundEnumeration.next()Z (Unknown Source)
  at sun.misc.CompoundEnumeration.hasMoreElements()Z (Unknown Source)
  at com.sun.xml.ws.policy.privateutil.ServiceFinder$LazyIterator.hasNext()Z (ServiceFinder.java:362)
  at com.sun.xml.ws.policy.privateutil.ServiceFinder.toArray()[Ljava/lang/Object; (ServiceFinder.java:228)
  at com.sun.xml.ws.policy.privateutil.PolicyUtils$ServiceProvider.load(Ljava/lang/Class;)[Ljava/lang/Object; (PolicyUtils.java:451)
  at com.sun.xml.ws.policy.AssertionValidationProcessor.<init>(Ljava/util/Collection;)V (AssertionValidationProcessor.java:80)
  at com.sun.xml.ws.api.policy.ValidationProcessor.<init>()V (ValidationProcessor.java:69)
  at com.sun.xml.ws.api.policy.ValidationProcessor.getInstance()Lcom/sun/xml/ws/api/policy/ValidationProcessor; (ValidationProcessor.java:79)
  at com.sun.xml.ws.api.policy.AlternativeSelector.doSelection(Lcom/sun/xml/ws/policy/EffectivePolicyModifier;)V (AlternativeSelector.java:50)
  at com.sun.xml.ws.policy.WsitPolicyUtil.doAlternativeSelection(Lcom/sun/xml/ws/policy/PolicyMap;)Lcom/sun/xml/ws/policy/PolicyMap; (WsitPolicyUtil.java:96)
  at com.sun.xml.ws.policy.jaxws.WsitPolicyResolver.resolve(Lcom/sun/xml/ws/api/policy/PolicyResolver$ClientContext;)Lcom/sun/xml/ws/policy/PolicyMap; (WsitPolicyResolver.java:121)
  at com.sun.xml.ws.policy.PolicyWSDLParserExtension.postFinished(Lcom/sun/xml/ws/api/wsdl/parser/WSDLParserExtensionContext;)V (PolicyWSDLParserExtension.java:953)
  at com.sun.xml.ws.wsdl.parser.DelegatingParserExtension.postFinished(Lcom/sun/xml/ws/api/wsdl/parser/WSDLParserExtensionContext;)V (DelegatingParserExtension.java:187)
  at com.sun.xml.ws.wsdl.parser.WSDLParserExtensionFacade.postFinished(Lcom/sun/xml/ws/api/wsdl/parser/WSDLParserExtensionContext;)V (WSDLParserExtensionFacade.java:334)
  at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parse(Ljava/net/URL;Ljavax/xml/transform/Source;Lorg/xml/sax/EntityResolver;ZLcom/sun/xml/ws/api/server/Container;Lcom/sun/xml/ws/api/policy/PolicyResolver;[Lcom/sun/xml/ws/api/wsdl/parser/WSDLParserExtension;)Lcom/sun/xml/ws/model/wsdl/WSDLModelImpl; (RuntimeWSDLParser.java:171)
  at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parse(Ljava/net/URL;Ljavax/xml/transform/Source;Lorg/xml/sax/EntityResolver;ZLcom/sun/xml/ws/api/server/Container;[Lcom/sun/xml/ws/api/wsdl/parser/WSDLParserExtension;)Lcom/sun/xml/ws/model/wsdl/WSDLModelImpl; (RuntimeWSDLParser.java:131)
  at com.sun.xml.ws.client.WSServiceDelegate.parseWSDL(Ljava/net/URL;Ljavax/xml/transform/Source;)Lcom/sun/xml/ws/model/wsdl/WSDLModelImpl; (WSServiceDelegate.java:267)
  at com.sun.xml.ws.client.WSServiceDelegate.<init>(Ljavax/xml/transform/Source;Ljavax/xml/namespace/QName;Ljava/lang/Class;)V (WSServiceDelegate.java:230)
  at com.sun.xml.ws.client.WSServiceDelegate.<init>(Ljava/net/URL;Ljavax/xml/namespace/QName;Ljava/lang/Class;)V (WSServiceDelegate.java:178)
  at com.sun.xml.ws.spi.ProviderImpl.createServiceDelegate(Ljava/net/URL;Ljavax/xml/namespace/QName;Ljava/lang/Class;)Ljavax/xml/ws/spi/ServiceDelegate; (ProviderImpl.java:106)
  at javax.xml.ws.Service.<init>(Ljava/net/URL;Ljavax/xml/namespace/QName;)V (Service.java:92)
  at org.tempuri.Trans.<init>()V (Trans.java:42)
  at mposclient.MPOSClient.RetailerTransaction(Ljava/sql/Connection;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; (MPOSClient.java:21)
  at WebService.IMTOPUP.topupAmount(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; (IMTOPUP.java:170)
  at sun.reflect.GeneratedMethodAccessor64.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object; (Unknown Source)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object; (Unknown Source)
  at java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object; (Unknown Source)
  at com.sun.xml.ws.api.server.InstanceResolver$1.invoke(Lcom/sun/xml/ws/api/message/Packet;Ljava/lang/reflect/Method;[Ljava/lang/Object;)Ljava/lang/Object; (InstanceResolver.java:246)
  at com.sun.xml.ws.server.InvokerTube$2.invoke(Lcom/sun/xml/ws/api/message/Packet;Ljava/lang/reflect/Method;[Ljava/lang/Object;)Ljava/lang/Object; (InvokerTube.java:146)
  at com.sun.xml.ws.server.sei.EndpointMethodHandler.invoke(Lcom/sun/xml/ws/api/message/Packet;)Lcom/sun/xml/ws/api/message/Packet; (EndpointMethodHandler.java:257)
  at com.sun.xml.ws.server.sei.SEIInvokerTube.processRequest(Lcom/sun/xml/ws/api/message/Packet;)Lcom/sun/xml/ws/api/pipe/NextAction; (SEIInvokerTube.java:95)
  at com.sun.xml.ws.api.pipe.Fiber.__doRun(Lcom/sun/xml/ws/api/pipe/Tube;)Lcom/sun/xml/ws/api/pipe/Tube; (Fiber.java:629)
  at com.sun.xml.ws.api.pipe.Fiber._doRun(Lcom/sun/xml/ws/api/pipe/Tube;)Lcom/sun/xml/ws/api/pipe/Tube; (Fiber.java:588)
  at com.sun.xml.ws.api.pipe.Fiber.doRun(Lcom/sun/xml/ws/api/pipe/Tube;)Lcom/sun/xml/ws/api/pipe/Tube; (Fiber.java:573)
  at com.sun.xml.ws.api.pipe.Fiber.runSync(Lcom/sun/xml/ws/api/pipe/Tube;Lcom/sun/xml/ws/api/message/Packet;)Lcom/sun/xml/ws/api/message/Packet; (Fiber.java:470)
  at com.sun.xml.ws.server.WSEndpointImpl$2.process(Lcom/sun/xml/ws/api/message/Packet;Lcom/sun/xml/ws/api/server/WebServiceContextDelegate;Lcom/sun/xml/ws/api/server/TransportBackChannel;)Lcom/sun/xml/ws/api/message/Packet; (WSEndpointImpl.java:295)
  at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(Lcom/sun/xml/ws/transport/http/WSHTTPConnection;)V (HttpAdapter.java:515)
  at com.sun.xml.ws.transport.http.HttpAdapter.handle(Lcom/sun/xml/ws/transport/http/WSHTTPConnection;)V (HttpAdapter.java:285)
  at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(Ljavax/servlet/ServletContext;Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V (ServletAdapter.java:143)
  at com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doGet(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Ljavax/servlet/ServletContext;)V (WSServletDelegate.java:155)
  at com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doPost(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Ljavax/servlet/ServletContext;)V (WSServletDelegate.java:189)
  at com.sun.xml.ws.transport.http.servlet.WSServlet.doPost(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V (WSServlet.java:76)
  at javax.servlet.http.HttpServlet.service(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V (HttpServlet.java:647)
  at javax.servlet.http.HttpServlet.service(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V (HttpServlet.java:728)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V (ApplicationFilterChain.java:305)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V (ApplicationFilterChain.java:210)
  at org.apache.catalina.core.StandardWrapperValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V (StandardWrapperValve.java:222)
  at org.apache.catalina.core.StandardContextValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V (StandardContextValve.java:123)
  at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V (AuthenticatorBase.java:472)
  at org.apache.catalina.core.StandardHostValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V (StandardHostValve.java:171)
  at org.apache.catalina.valves.ErrorReportValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V (ErrorReportValve.java:99)
  at org.apache.catalina.valves.AccessLogValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V (AccessLogValve.java:936)
  at org.apache.catalina.core.StandardEngineValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V (StandardEngineValve.java:118)
  at org.apache.catalina.connector.CoyoteAdapter.service(Lorg/apache/coyote/Request;Lorg/apache/coyote/Response;)V (CoyoteAdapter.java:407)
  at org.apache.coyote.http11.AbstractHttp11Processor.process(Lorg/apache/tomcat/util/net/SocketWrapper;)Lorg/apache/tomcat/util/net/AbstractEndpoint$Handler$SocketState; (AbstractHttp11Processor.java:1004)
  at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(Lorg/apache/tomcat/util/net/SocketWrapper;Lorg/apache/tomcat/util/net/SocketStatus;)Lorg/apache/tomcat/util/net/AbstractEndpoint$Handler$SocketState; (AbstractProtocol.java:589)
  at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run()V (AprEndpoint.java:1852)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(Ljava/util/concurrent/ThreadPoolExecutor$Worker;)V (Unknown Source)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run()V (Unknown Source)
  at java.lang.Thread.run()V (Unknown Source)

另一个具有类似堆栈跟踪的

http-apr-8082-exec-58
  at java.util.Arrays.copyOf([BI)[B (Unknown Source)
  at java.util.zip.ZipCoder.getBytes(Ljava/lang/String;)[B (Unknown Source)
  at java.util.zip.ZipFile.getEntry(Ljava/lang/String;)Ljava/util/zip/ZipEntry; (Unknown Source)
  at java.util.jar.JarFile.getEntry(Ljava/lang/String;)Ljava/util/zip/ZipEntry; (Unknown Source)
  at java.util.jar.JarFile.getJarEntry(Ljava/lang/String;)Ljava/util/jar/JarEntry; (Unknown Source)
  at sun.misc.URLClassPath$JarLoader.getResource(Ljava/lang/String;Z)Lsun/misc/Resource; (Unknown Source)
  at sun.misc.URLClassPath$JarLoader.findResource(Ljava/lang/String;Z)Ljava/net/URL; (Unknown Source)
  at sun.misc.URLClassPath$1.next()Z (Unknown Source)
  at sun.misc.URLClassPath$1.hasMoreElements()Z (Unknown Source)
  at java.net.URLClassLoader$3$1.run()Ljava/net/URL; (Unknown Source)
  at java.net.URLClassLoader$3$1.run()Ljava/lang/Object; (Unknown Source)
  at java.security.AccessController.doPrivileged(Ljava/security/PrivilegedAction;Ljava/security/AccessControlContext;)Ljava/lang/Object; (Native Method)
  at java.net.URLClassLoader$3.next()Z (Unknown Source)
  at java.net.URLClassLoader$3.hasMoreElements()Z (Unknown Source)
  at sun.misc.CompoundEnumeration.next()Z (Unknown Source)
  at sun.misc.CompoundEnumeration.hasMoreElements()Z (Unknown Source)
  at sun.misc.CompoundEnumeration.next()Z (Unknown Source)
  at sun.misc.CompoundEnumeration.hasMoreElements()Z (Unknown Source)
  at com.sun.xml.ws.policy.privateutil.ServiceFinder$LazyIterator.hasNext()Z (ServiceFinder.java:362)
  at com.sun.xml.ws.policy.privateutil.ServiceFinder.toArray()[Ljava/lang/Object; (ServiceFinder.java:228)
  at com.sun.xml.ws.policy.privateutil.PolicyUtils$ServiceProvider.load(Ljava/lang/Class;)[Ljava/lang/Object; (PolicyUtils.java:451)
  at com.sun.xml.ws.policy.AssertionValidationProcessor.<init>(Ljava/util/Collection;)V (AssertionValidationProcessor.java:80)
  at com.sun.xml.ws.api.policy.ValidationProcessor.<init>()V (ValidationProcessor.java:69)
  at com.sun.xml.ws.api.policy.ValidationProcessor.getInstance()Lcom/sun/xml/ws/api/policy/ValidationProcessor; (ValidationProcessor.java:79)
  at com.sun.xml.ws.api.policy.AlternativeSelector.doSelection(Lcom/sun/xml/ws/policy/EffectivePolicyModifier;)V (AlternativeSelector.java:50)
  at com.sun.xml.ws.policy.DefaultPolicyResolver.doAlternativeSelection(Lcom/sun/xml/ws/policy/PolicyMap;)Lcom/sun/xml/ws/policy/PolicyMap; (DefaultPolicyResolver.java:110)
  at com.sun.xml.ws.policy.DefaultPolicyResolver.resolve(Lcom/sun/xml/ws/api/policy/PolicyResolver$ClientContext;)Lcom/sun/xml/ws/policy/PolicyMap; (DefaultPolicyResolver.java:66)
  at com.sun.xml.ws.policy.PolicyWSDLParserExtension.postFinished(Lcom/sun/xml/ws/api/wsdl/parser/WSDLParserExtensionContext;)V (PolicyWSDLParserExtension.java:953)
  at com.sun.xml.ws.wsdl.parser.DelegatingParserExtension.postFinished(Lcom/sun/xml/ws/api/wsdl/parser/WSDLParserExtensionContext;)V (DelegatingParserExtension.java:187)
  at com.sun.xml.ws.wsdl.parser.WSDLParserExtensionFacade.postFinished(Lcom/sun/xml/ws/api/wsdl/parser/WSDLParserExtensionContext;)V (WSDLParserExtensionFacade.java:334)
  at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parse(Lcom/sun/xml/ws/api/wsdl/parser/XMLEntityResolver$Parser;Lcom/sun/xml/ws/api/wsdl/parser/XMLEntityResolver;ZLcom/sun/xml/ws/api/server/Container;Lcom/sun/xml/ws/api/policy/PolicyResolver;[Lcom/sun/xml/ws/api/wsdl/parser/WSDLParserExtension;)Lcom/sun/xml/ws/model/wsdl/WSDLModelImpl; (RuntimeWSDLParser.java:252)
  at com.sun.xml.ws.api.model.wsdl.WSDLModel$WSDLParser.parse(Lcom/sun/xml/ws/api/wsdl/parser/XMLEntityResolver$Parser;Lcom/sun/xml/ws/api/wsdl/parser/XMLEntityResolver;ZLcom/sun/xml/ws/api/server/Container;Lcom/sun/xml/ws/api/policy/PolicyResolver;[Lcom/sun/xml/ws/api/wsdl/parser/WSDLParserExtension;)Lcom/sun/xml/ws/api/model/wsdl/WSDLModel; (WSDLModel.java:183)
  at com.sun.xml.ws.policy.jaxws.PolicyResourceLoader.getWsdlModel(Ljava/net/URL;Z)Lcom/sun/xml/ws/api/model/wsdl/WSDLModel; (PolicyResourceLoader.java:81)
  at com.sun.xml.ws.policy.jaxws.PolicyConfigParser.parseModel(Ljava/net/URL;Z[Lcom/sun/xml/ws/policy/PolicyMapMutator;)Lcom/sun/xml/ws/api/model/wsdl/WSDLModel; (PolicyConfigParser.java:223)
  at com.sun.xml.ws.policy.jaxws.PolicyConfigParser.parseModel(Ljava/lang/String;Lcom/sun/xml/ws/api/server/Container;[Lcom/sun/xml/ws/policy/PolicyMapMutator;)Lcom/sun/xml/ws/api/model/wsdl/WSDLModel; (PolicyConfigParser.java:185)
  at com.sun.xml.ws.policy.jaxws.PolicyConfigParser.parse(Ljava/lang/String;Lcom/sun/xml/ws/api/server/Container;[Lcom/sun/xml/ws/policy/PolicyMapMutator;)Lcom/sun/xml/ws/policy/PolicyMap; (PolicyConfigParser.java:103)
  at com.sun.xml.ws.policy.jaxws.WsitPolicyResolver.resolve(Lcom/sun/xml/ws/api/policy/PolicyResolver$ClientContext;)Lcom/sun/xml/ws/policy/PolicyMap; (WsitPolicyResolver.java:106)
  at com.sun.xml.ws.policy.PolicyWSDLParserExtension.postFinished(Lcom/sun/xml/ws/api/wsdl/parser/WSDLParserExtensionContext;)V (PolicyWSDLParserExtension.java:953)
  at com.sun.xml.ws.wsdl.parser.DelegatingParserExtension.postFinished(Lcom/sun/xml/ws/api/wsdl/parser/WSDLParserExtensionContext;)V (DelegatingParserExtension.java:187)
  at com.sun.xml.ws.wsdl.parser.WSDLParserExtensionFacade.postFinished(Lcom/sun/xml/ws/api/wsdl/parser/WSDLParserExtensionContext;)V (WSDLParserExtensionFacade.java:334)
  at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parse(Ljava/net/URL;Ljavax/xml/transform/Source;Lorg/xml/sax/EntityResolver;ZLcom/sun/xml/ws/api/server/Container;Lcom/sun/xml/ws/api/policy/PolicyResolver;[Lcom/sun/xml/ws/api/wsdl/parser/WSDLParserExtension;)Lcom/sun/xml/ws/model/wsdl/WSDLModelImpl; (RuntimeWSDLParser.java:171)
  at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parse(Ljava/net/URL;Ljavax/xml/transform/Source;Lorg/xml/sax/EntityResolver;ZLcom/sun/xml/ws/api/server/Container;[Lcom/sun/xml/ws/api/wsdl/parser/WSDLParserExtension;)Lcom/sun/xml/ws/model/wsdl/WSDLModelImpl; (RuntimeWSDLParser.java:131)
  at com.sun.xml.ws.client.WSServiceDelegate.parseWSDL(Ljava/net/URL;Ljavax/xml/transform/Source;)Lcom/sun/xml/ws/model/wsdl/WSDLModelImpl; (WSServiceDelegate.java:267)
  at com.sun.xml.ws.client.WSServiceDelegate.<init>(Ljavax/xml/transform/Source;Ljavax/xml/namespace/QName;Ljava/lang/Class;)V (WSServiceDelegate.java:230)
  at com.sun.xml.ws.client.WSServiceDelegate.<init>(Ljava/net/URL;Ljavax/xml/namespace/QName;Ljava/lang/Class;)V (WSServiceDelegate.java:178)
  at com.sun.xml.ws.spi.ProviderImpl.createServiceDelegate(Ljava/net/URL;Ljavax/xml/namespace/QName;Ljava/lang/Class;)Ljavax/xml/ws/spi/ServiceDelegate; (ProviderImpl.java:106)
  at javax.xml.ws.Service.<init>(Ljava/net/URL;Ljavax/xml/namespace/QName;)V (Service.java:92)
  at com.eservglobal.soaptopupsuite.Soaptopupsuite.<init>()V (Soaptopupsuite.java:42)
  at telenor.vas.voms.PrepaidRecharge.AnyTopup(Ltelenor/vas/voms/VoMSCommon;Lcom/eservglobal/soaptopupsuite/Session;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)[Ljava/lang/String; (PrepaidRecharge.java:106)
  at telenor.vas.voms.PrepaidRecharge.PrepaidRecharge(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)[Ljava/lang/String; (PrepaidRecharge.java:35)
  at telenor.vas.topup.TopUpWS.TopUp(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ltelenor/vas/topup/PaymentResponse; (TopUpWS.java:468)
  at sun.reflect.GeneratedMethodAccessor69.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object; (Unknown Source)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object; (Unknown Source)
  at java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object; (Unknown Source)
  at com.sun.xml.ws.api.server.InstanceResolver$1.invoke(Lcom/sun/xml/ws/api/message/Packet;Ljava/lang/reflect/Method;[Ljava/lang/Object;)Ljava/lang/Object; (InstanceResolver.java:246)
  at com.sun.xml.ws.server.InvokerTube$2.invoke(Lcom/sun/xml/ws/api/message/Packet;Ljava/lang/reflect/Method;[Ljava/lang/Object;)Ljava/lang/Object; (InvokerTube.java:146)
  at com.sun.xml.ws.server.sei.EndpointMethodHandler.invoke(Lcom/sun/xml/ws/api/message/Packet;)Lcom/sun/xml/ws/api/message/Packet; (EndpointMethodHandler.java:257)
  at com.sun.xml.ws.server.sei.SEIInvokerTube.processRequest(Lcom/sun/xml/ws/api/message/Packet;)Lcom/sun/xml/ws/api/pipe/NextAction; (SEIInvokerTube.java:95)
  at com.sun.xml.ws.api.pipe.Fiber.__doRun(Lcom/sun/xml/ws/api/pipe/Tube;)Lcom/sun/xml/ws/api/pipe/Tube; (Fiber.java:629)
  at com.sun.xml.ws.api.pipe.Fiber._doRun(Lcom/sun/xml/ws/api/pipe/Tube;)Lcom/sun/xml/ws/api/pipe/Tube; (Fiber.java:588)
  at com.sun.xml.ws.api.pipe.Fiber.doRun(Lcom/sun/xml/ws/api/pipe/Tube;)Lcom/sun/xml/ws/api/pipe/Tube; (Fiber.java:573)
  at com.sun.xml.ws.api.pipe.Fiber.runSync(Lcom/sun/xml/ws/api/pipe/Tube;Lcom/sun/xml/ws/api/message/Packet;)Lcom/sun/xml/ws/api/message/Packet; (Fiber.java:470)
  at com.sun.xml.ws.server.WSEndpointImpl$2.process(Lcom/sun/xml/ws/api/message/Packet;Lcom/sun/xml/ws/api/server/WebServiceContextDelegate;Lcom/sun/xml/ws/api/server/TransportBackChannel;)Lcom/sun/xml/ws/api/message/Packet; (WSEndpointImpl.java:295)
  at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(Lcom/sun/xml/ws/transport/http/WSHTTPConnection;)V (HttpAdapter.java:515)
  at com.sun.xml.ws.transport.http.HttpAdapter.handle(Lcom/sun/xml/ws/transport/http/WSHTTPConnection;)V (HttpAdapter.java:285)
  at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(Ljavax/servlet/ServletContext;Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V (ServletAdapter.java:143)
  at com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doGet(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Ljavax/servlet/ServletContext;)V (WSServletDelegate.java:155)
  at com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doPost(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Ljavax/servlet/ServletContext;)V (WSServletDelegate.java:189)
  at com.sun.xml.ws.transport.http.servlet.WSServlet.doPost(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V (WSServlet.java:76)
  at javax.servlet.http.HttpServlet.service(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V (HttpServlet.java:647)
  at javax.servlet.http.HttpServlet.service(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V (HttpServlet.java:728)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V (ApplicationFilterChain.java:305)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V (ApplicationFilterChain.java:210)
  at org.apache.catalina.core.StandardWrapperValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V (StandardWrapperValve.java:222)
  at org.apache.catalina.core.StandardContextValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V (StandardContextValve.java:123)
  at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V (AuthenticatorBase.java:472)
  at org.apache.catalina.core.StandardHostValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V (StandardHostValve.java:171)
  at org.apache.catalina.valves.ErrorReportValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V (ErrorReportValve.java:99)
  at org.apache.catalina.valves.AccessLogValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V (AccessLogValve.java:936)
  at org.apache.catalina.core.StandardEngineValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V (StandardEngineValve.java:118)
  at org.apache.catalina.connector.CoyoteAdapter.service(Lorg/apache/coyote/Request;Lorg/apache/coyote/Response;)V (CoyoteAdapter.java:407)
  at org.apache.coyote.http11.AbstractHttp11Processor.process(Lorg/apache/tomcat/util/net/SocketWrapper;)Lorg/apache/tomcat/util/net/AbstractEndpoint$Handler$SocketState; (AbstractHttp11Processor.java:1004)
  at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(Lorg/apache/tomcat/util/net/SocketWrapper;Lorg/apache/tomcat/util/net/SocketStatus;)Lorg/apache/tomcat/util/net/AbstractEndpoint$Handler$SocketState; (AbstractProtocol.java:589)
  at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run()V (AprEndpoint.java:1852)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(Ljava/util/concurrent/ThreadPoolExecutor$Worker;)V (Unknown Source)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run()V (Unknown Source)
  at java.lang.Thread.run()V (Unknown Source)

我怀疑发生此问题是因为我正在调用另一个Web服务。

我使用以下JVM选项,最小内存设置为500米,最大值为1500米

-XX:MaxPermSize=170m
-XX:+CMSClassUnloadingEnabled
-XX:+CMSPermGenSweepingEnabled
-XX:+HeapDumpOnOutOfMemoryError
-XX:HeapDumpPath=C:\heaplogs\

5 个答案:

答案 0 :(得分:2)

这听起来与this bug非常相似。如果它是相同的,则CatalogManager将保留对所创建的CatalogEntry的每个实例的引用。该链接建议您可以重用相同的服务对象,但每次调用时都必须重新初始化它,以强制CatalogManger放弃其存储的引用。

该帖子中的另一篇文章建议尝试使用以下内容强制CatalogManger放弃引用

-Dxml.catalog.staticCatalog=false

如果上述方法不起作用,我个人非常幸运Axis2消费SOAP。

答案 1 :(得分:0)

我能想到的唯一一个显而易见的事情 - 你有内存泄漏。

您可以使用jvisualvm来检测在调用之后保存对com.sun.org.apache.xml.internal.resolver.Catalog个对象的引用的GC根。 这是一个非常好的免费工具。

您可以通过Google搜索来找到有关如何使用jvisualvm的指南。

答案 2 :(得分:0)

从tomcat / bin打开catalina.sh。

然后

JAVA_OPTS =“ - Djava.awt.headless = true -Dfile.encoding = UTF-8 -server -Xms1536m -Xmx1536m -XX:NewSize = 256m -XX:MaxNewSize = 256m -XX:PermSize = 256m -XX:MaxPermSize = 256m -XX:+ DisableExplicitGC“

=&GT;重启你的tomcat

答案 3 :(得分:0)

你绝对应该让MAT告诉你谁持有这些参考资料,为什么他们还活着而不是GCed。

另一种选择是尝试使用专门的内存泄漏检测工具,例如Plumbr

答案 4 :(得分:-2)

每当你得到一个OOM,它应用了一些导致内存泄漏的功能。发现内存泄漏可能很困难,但因为你已经缩小了嫌疑人的范围。只需检查webservice客户端中是否有任何可能导致此问题的代码。

从堆栈跟踪中我怀疑是你的webservice客户端中的一些代码正在创建数组或复制它。

另外,请检查您的Vm args是否设置正确。