Thanks a lot for the quick reply Ingo.
After sending out my first mail I did a small test: I explicitly closed the
HttpConnection at the end of the Put Method.
More specifically: I added the following lines at the end of the putMethod
of WebdavResource:
closeSession();
client = getSessionInstance(httpURL);
And yeah this fixed the problem.
I don't have much experience with HttpUtil. I have a couple of questions:
1. What should be the expected behavior? Should the session have been closed
by default or is it something the program has to do explicitly?
2. Why does this problem surface only in case of Weblogic and not JBoss?
3. Will the above fix cause any other issues?
4. Is there any other better fix for this issue?
Thanks again,
Ritu
-----Original Message-----
From: Ingo Brunberg [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 14, 2004 8:16 PM
To: [EMAIL PROTECTED]
Subject: Re: Need help: Facing Connection reset: Read timed out: problem
when invoking any method on WebdavResource after PUT
The first thing that comes to my mind is that Weblogic might not be able to
handle the chunked transfer encoding correctly that is used when your
upload source is a stream. It looks like it cannot detect the end of
the request body.
I would rather expect this to be a Weblogic problem than a bug in
Httpclient since the latter doesn't give any problems with other
servers.
Ingo
> Hello all,
>
> I am accessing Slide Server via Slide Client API (using WebdavResource).
> Slide is deployed on Weblogic App Server. I am facing a "Connection reset
:
> Read timed out" issue when accessing any method of WebdavResource after
PUT
> method. Has anyone faced a similar issue or has any idea of what is
causing
> this issue?
>
> Things to note:
> -- This error comes only when executing any method immediately after PUT.
> I.e. If I execute "putMethod" followed by a "proppatchMethod", I see the
> below stack trace.
> -- But very importantly the putMethod itself goes fine and the file gets
> uploaded to Slide server.
> -- It does not happen when executing any other 2 methods in succession.
For
> e.g. if I execute "copyMethod" followed by a "proppatchMethod", everything
> works fine.
> -- This error is only on WebLogic. It works fine on JBoss APP server.
>
> It looks like this has something to do with the fact that the PUT method
> uploads a data stream, which is not being handled correctly by either
> WebLogic server or HttpClient (the way weblogic expects it).
>
> I am pasting the stack trace of the Weblogic Server. Please help, if you
> have any idea. This is urgent for me. Any suggestions are also very
welcome.
>
> java.net.SocketException: Connection reset at
> java.net.SocketInputStream.read(SocketInputStream.java:168)
> at
> weblogic.servlet.internal.PostInputStream.read(PostInputStream.java:136)
> at
> weblogic.servlet.internal.PostInputStream.read(PostInputStream.java:156)
> at
>
weblogic.servlet.internal.ServletInputStreamImpl.read(ServletInputStreamImpl
> .java:180)
> at
> org.apache.xerces.utils.ChunkyByteArray.fill(ChunkyByteArray.java:222)
> at
> org.apache.xerces.utils.ChunkyByteArray.<init>(ChunkyByteArray.java:98)
> at
>
org.apache.xerces.readers.DefaultReaderFactory.createReader(DefaultReaderFac
> tory.java:153)
> at
>
org.apache.xerces.readers.DefaultEntityHandler.startReadingFromDocument(Defa
> ultEntityHandler.java:493)
> at
> org.apache.xerces.framework.XMLParser.parseSomeSetup(XMLParser.java:314)
> at
org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1097)
> at org.jdom.input.SAXBuilder.build(SAXBuilder.java:455)
> at org.jdom.input.SAXBuilder.build(SAXBuilder.java:769)
> at
>
org.apache.slide.webdav.method.AbstractWebdavMethod.parseRequestContent(Abst
> ractWebdavMethod.java:630)
> at
>
org.apache.slide.webdav.method.AbstractWebdavMethod.parseRequestContent(Abst
> ractWebdavMethod.java:599)
> at
>
org.apache.slide.webdav.method.PropPatchMethod.parseRequest(PropPatchMethod.
> java:160)
> at
>
org.apache.slide.webdav.method.AbstractWebdavMethod.run(AbstractWebdavMethod
> .java:314)
> at
> org.apache.slide.webdav.WebdavServlet.service(WebdavServlet.java:165)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
> weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run
> (ServletStubImpl.java:971)
> at
>
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
> :402)
> at
weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
> at
>
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
> at
> org.apache.slide.webdav.filter.LogFilter.doFilter(LogFilter.java:139)
>
> at
>
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
> at
>
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(W
> ebAppServletContext.java:6356)
> at
>
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubjec
> t.java:317)
> at
> weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
> at
>
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
> ntext.java:3635)
> at
>
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
> :2585)
> at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
> at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
>
> java.net.SocketTimeoutException: Read timed out
> at java.net.SocketInputStream.socketRead0(Native Method)
> at java.net.SocketInputStream.read(SocketInputStream.java:129)
> at
> weblogic.servlet.internal.PostInputStream.read(PostInputStream.java:136)
> at
> weblogic.servlet.internal.PostInputStream.read(PostInputStream.java:156)
> at
>
weblogic.servlet.internal.ServletInputStreamImpl.read(ServletInputStreamImpl
> .java:180)
> at
> org.apache.xerces.utils.ChunkyByteArray.fill(ChunkyByteArray.java:222)
> at
> org.apache.xerces.utils.ChunkyByteArray.<init>(ChunkyByteArray.java:98)
> at
>
org.apache.xerces.readers.DefaultReaderFactory.createReader(DefaultReaderFac
> tory.java:153)
> at
>
org.apache.xerces.readers.DefaultEntityHandler.startReadingFromDocument(Defa
> ultEntityHandler.java:493)
> at
> org.apache.xerces.framework.XMLParser.parseSomeSetup(XMLParser.java:314)
> at
org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1097)
> at org.jdom.input.SAXBuilder.build(SAXBuilder.java:455)
> at org.jdom.input.SAXBuilder.build(SAXBuilder.java:769)
> at
>
org.apache.slide.webdav.method.AbstractWebdavMethod.parseRequestContent(Abst
> ractWebdavMethod.java:630)
> at
>
org.apache.slide.webdav.method.AbstractWebdavMethod.parseRequestContent(Abst
> ractWebdavMethod.java:599)
> at
>
org.apache.slide.webdav.method.PropPatchMethod.parseRequest(PropPatchMethod.
> java:160)
> at
>
org.apache.slide.webdav.method.AbstractWebdavMethod.run(AbstractWebdavMethod
> .java:314)
> at
> org.apache.slide.webdav.WebdavServlet.service(WebdavServlet.java:165)
>
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
>
weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(Servle
> tStubImpl.java:971)
> at
>
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
> :402)
> at
weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
> at
>
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
> at
> org.apache.slide.webdav.filter.LogFilter.doFilter(LogFilter.java:139)
>
> at
>
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
> at
>
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(W
> ebAppServletContext.java:6356)
> at
>
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubjec
> t.java:317)
> at
> weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
> at
>
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
> ntext.java:3635)
> at
>
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
> :2585)
> at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
> at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
>
> Thanks,
> Ritu
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]