2

我正在编写一个部署在 tomcat 上的 web 服务,当客户端调用 web 服务时,它设法成功发送信息,但是当我应该得到回复时,我在控制台中收到如下错误消息我确实注意到 tomcat 崩溃并关闭,每次我运行客户端时,我都必须再次启动 tomcat

at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:203)
at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:76)
at        org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:400)
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:225)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:438)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:402)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
at ws.test.WebserviceSTSStub.certificate(WebserviceSTSStub.java:184)
at client.Client.main(Client.java:144)
Caused by: org.apache.commons.httpclient.NoHttpResponseException: The server localhost failed to respond
at org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBase.java:1976)
at org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:1735)
at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1098)
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346)
at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:560)
at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:199)
... 9 more
Failed at communicating methods

这是来自 tomcat 的日志文件

Nov 29, 2012 3:26:44 PM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler ["http-apr-8080"]
Nov 29, 2012 3:26:44 PM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler ["ajp-apr-8009"]
Nov 29, 2012 3:26:44 PM org.apache.catalina.core.StandardService stopInternal
INFO: Stopping service Catalina
Nov 29, 2012 3:26:44 PM org.apache.catalina.core.StandardWrapper unload
INFO: Waiting for 1 instance(s) to be deallocated
Nov 29, 2012 3:26:45 PM org.apache.catalina.core.StandardWrapper unload
INFO: Waiting for 1 instance(s) to be deallocated
Nov 29, 2012 3:26:46 PM org.apache.catalina.core.StandardWrapper unload
INFO: Waiting for 1 instance(s) to be deallocated
Nov 29, 2012 3:26:47 PM org.apache.catalina.loader.WebappClassLoader         clearReferencesThreads
SEVERE: The web application [/axis2] is still processing a request that has yet to     finish. This is very likely to create a memory leak. You can control the time allowed for     requests to finish by using the unloadDelay attribute of the standard Context implementation.
Nov 29, 2012 3:26:47 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [/axis2] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@1b3cbc9]) and a value of type [org.apache.axis2.context.MessageContext] (value [[MessageContext: logID=urn:uuid:81669E5CA369177A451354188407165]]) 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.
Nov 29, 2012 3:26:47 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [/axis2] created a ThreadLocal with key of type [org.apache.xmlbeans.XmlBeans$1] (value [org.apache.xmlbeans.XmlBeans$1@1080026]) and a value of type [java.lang.ref.SoftReference] (value [java.lang.ref.SoftReference@41ca9a]) 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.
Nov 29, 2012 3:26:47 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [/axis2] created a ThreadLocal with key of type [org.apache.xmlbeans.impl.store.CharUtil$1] (value [org.apache.xmlbeans.impl.store.CharUtil$1@15c4bc6]) and a value of type [java.lang.ref.SoftReference] (value [java.lang.ref.SoftReference@72b4dc]) 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.
Nov 29, 2012 3:26:47 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [/axis2] created a ThreadLocal with key of type [org.apache.xmlbeans.impl.schema.SchemaTypeLoaderImpl$1] (value [org.apache.xmlbeans.impl.schema.SchemaTypeLoaderImpl$1@c001cd]) and a value of type [java.util.ArrayList] (value [[java.lang.ref.SoftReference@1b66f75]]) 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.
Nov 29, 2012 3:26:47 PM org.apache.coyote.AbstractProtocol stop
INFO: Stopping ProtocolHandler ["http-apr-8080"]
Nov 29, 2012 3:26:47 PM org.apache.coyote.AbstractProtocol stop
INFO: Stopping ProtocolHandler ["ajp-apr-8009"]

我无法判断服务的逻辑是否损坏,或者设置是设置不正确,但我得到的印象是服务无法找到发送请求的客户端

这可能是由外部库引起的吗?我使用刚刚放在 webapps\axis2\WEB-INF\lib 文件夹中的 bouncycastle 库

我在 webapps\axis2\WEB-INF\classes 中还有一个属性文件和一个 jaas 配置文件,我按如下方式访问它们

属性文件

Properties props = new Properties();
      props.load( new FileInputStream( "C:\\apache\\apache-tomcat-7.0.29\\webapps\\axis2\\WEB-INF\\classes\\server.properties"));

JAAS 配置文件

System.setProperty( "java.security.auth.login.config", "C:\\apache\\apache-tomcat-7.0.29\\webapps\\axis2\\WEB-INF\\classes\\jaas.conf");
4

0 回答 0