You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by pelikan <pe...@gmail.com> on 2008/08/16 01:58:43 UTC
Intermittent Tomcat Problem
I am using CXF 2.1.1 to consume a .NET SOAP service. We have been using cxf
for a short time and are very happy with how easy it was to provide SOAP
services almost problem-free.
I used wsdl2java to generate the client code from the WSDL. Using that code
and running from the command line, I am able to make as many calls as I
would like over & over without a single problem.
The problem comes when I run the exact same code within Tomcat 5.5.20 in our
WebApp which has many additional libraries (usual stack of hibernate, mysql,
spring, etc), I can always connect to the .NET service fine the very first
time. After that it is a crap shoot, but less than a 50% success rate. What
happens is I get the stack trace below from the Logging Interceptors. The
"read time out" is odd because even as it waits for the failing response, I
can instantiate the SOAP service from the command line without an error.
Has anybody had a similar situation? I'm trying to minimize the amount of
time I spend on this issue this oddly sunny San Francisco weekend.
Thanks
Aug 15, 2008 3:57:12 PM
org.apache.cxf.interceptor.LoggingOutInterceptor$LoggingCallback onClose
INFO: Outbound Message
---------------------------
Encoding: UTF-8
Headers: {SOAPAction=["http://www.company.com/AuthenticateUser"],
Accept=[*]}
Messages:
Payload: <soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><AuthenticateUser
xmlns="http://www.company.com/"><emailAddress>email@domain.com</emailAddress><password>testttttt</password></AuthenticateUser></soap:Body></soap:Envelope>
--------------------------------------
Aug 15, 2008 3:58:13 PM org.apache.cxf.phase.PhaseInterceptorChain
doIntercept
INFO: Interceptor has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Could not send Message.
at
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:64)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:296)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:242)
at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:178)
at $Proxy86.authenticateUser(Unknown Source)
at
com.company.server.manager.impl.UserManagerImpl.loginUser(UserManagerImpl.java:1699)
at com.company.server.services.ServiceUser.doLogin(ServiceUser.java:259)
at
com.company.server.services.ServiceUser.doTransactionalExceptionService(ServiceUser.java:360)
at
com.company.server.services.TransactionalServiceExceptionHandler.doTransactionalService(TransactionalServiceExceptionHandler.java:127)
at
com.company.server.TransactionalServiceHandler.doService(TransactionalServiceHandler.java:50)
at sun.reflect.GeneratedMethodAccessor95.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy81.doService(Unknown Source)
at com.company.server.ServiceDispatcher.dispatch(ServiceDispatcher.java:93)
at
com.company.transport.xmlhttp.XmlHttpServiceController.handleRequestInternal(XmlHttpServiceController.java:130)
at
org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
at
org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
at
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)
at
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:809)
at
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
at
org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:511)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:256)
at java.io.BufferedInputStream.read(BufferedInputStream.java:313)
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:659)
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:767)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:604)
at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:961)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:367)
at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1904)
at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1832)
at
org.apache.cxf.io.CacheAndWriteOutputStream.postClose(CacheAndWriteOutputStream.java:47)
at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:159)
at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:591)
at
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
... 45 more
--
View this message in context: http://www.nabble.com/Intermittent-Tomcat-Problem-tp19007231p19007231.html
Sent from the cxf-user mailing list archive at Nabble.com.
Re: Intermittent Tomcat Problem
Posted by pelikan <pe...@gmail.com>.
Thanks for the suggestion, Glassfish looks like an interesting cxf
alternative. I dabbled with it for a bit but somehow managed to resolve my
issues by using cxf 2.1.2 and updating xerces & xalan to current releases.
The ones we were using had no version numbers.
I feel like I dodged a bullet.
--
View this message in context: http://www.nabble.com/Intermittent-Tomcat-Problem-tp19007231p19038922.html
Sent from the cxf-user mailing list archive at Nabble.com.
Re: Intermittent Tomcat Problem
Posted by Glen Mazza <gl...@gmail.com>.
pelikan wrote:
>
> The problem comes when I run the exact same code within Tomcat 5.5.20 in
> our WebApp which has many additional libraries (usual stack of hibernate,
> mysql, spring, etc), I can always connect to the .NET service fine the
> very first time.
I think you're going to need to use process of elimination here--keep
removing functionality until you can get your Tomcat app working, so we can
figure out what library is the culprit--or another idea: try my DoubleIt
web service[1] (just replace it with your WSDL) on Tomcat 5.5.20 vs. .NET
service. See if you can get that working--it doesn't have mysql or
hibernate or whatever so it's very simple.
You may also want to try Metro (follow the DoubleIt instructions)--since you
are apparently in the middle of JAR hell if that web service stack works for
you, consider yourself liberated.
Yet another option--is debug your Tomcat web app and/or use Wireshark--it
can be done from within Eclipse[2].
Glen
[1] http://www.jroller.com/gmazza/date/20080417
[2] http://www.jroller.com/gmazza/date/20071212
--
View this message in context: http://www.nabble.com/Intermittent-Tomcat-Problem-tp19007231p19007784.html
Sent from the cxf-user mailing list archive at Nabble.com.