Bug 1081958 - WebDav using HTTP PUT method causes java.nio.BufferOverflowException
Summary: WebDav using HTTP PUT method causes java.nio.BufferOverflowException
Keywords:
Status: CLOSED DUPLICATE of bug 1083054
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Web
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: ---
Assignee: Rémy Maucherat
QA Contact: Radim Hatlapatka
Russell Dickenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-03-28 10:08 UTC by Radim Hatlapatka
Modified: 2014-10-25 12:17 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
java >= 1.7
Last Closed: 2014-04-30 11:29:42 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Radim Hatlapatka 2014-03-28 10:08:40 UTC
Description of problem:
Using HTTP PUT while having webdav enabled causes java.nio.BufferOverflowException on JDK 1.7 and newer (probably connected to NIO2 connector) [1]

Version-Release number of selected component (if applicable): EAP 6.3.0.DR6


How reproducible: always


Steps to Reproduce:
1. enable webdav + set read-only to false in static configuration of web subsystem
   * /subsystem=web/configuration=static-resources:write-attribute(name=webdav, value=true)  
   * /subsystem=web/configuration=static-resources:write-attribute(name=read-only, value=false)
2. deploy some webapp (e.g. called webdav.war)
3. use sardine and do PUT request (SardineFactory.begin().put(http://localhost:8080/webdav/date.txt, new Date().toString().getBytes());

Actual results: org.apache.http.NoHttpResponseException: The target server failed to respond (on client) and [1] on server

Expected results: date.txt appears on the specified url => successful PUT request

Additional info:
I wasn't able to reproduce it using CURL that's why I suggest using sardine where I am getting this response everytime (other webdav operations work just fine)

[1]
23:04:34,836 ERROR [org.apache.catalina.connector] (http-/127.0.0.1:8080-6) JBWEB001018: An exception or error occurred in the container during the request processing: java.nio.BufferOverflowException
	at java.nio.DirectByteBuffer.put(DirectByteBuffer.java:357) [rt.jar:1.7.0_45]
	at org.apache.coyote.http11.InternalNioOutputBuffer.commit(InternalNioOutputBuffer.java:669) [jbossweb-7.4.0.Final.jar:7.4.0.Final]
	at org.apache.coyote.http11.Http11NioProcessor.commit(Http11NioProcessor.java:480) [jbossweb-7.4.0.Final.jar:7.4.0.Final]
	at org.apache.coyote.http11.Http11NioProcessor.action(Http11NioProcessor.java:798) [jbossweb-7.4.0.Final.jar:7.4.0.Final]
	at org.apache.coyote.Response.action(Response.java:190) [jbossweb-7.4.0.Final.jar:7.4.0.Final]
	at org.apache.coyote.Response.sendHeaders(Response.java:390) [jbossweb-7.4.0.Final.jar:7.4.0.Final]
	at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:352) [jbossweb-7.4.0.Final.jar:7.4.0.Final]
	at org.apache.catalina.connector.OutputBuffer.close(OutputBuffer.java:318) [jbossweb-7.4.0.Final.jar:7.4.0.Final]
	at org.apache.catalina.connector.Response.finishResponse(Response.java:487) [jbossweb-7.4.0.Final.jar:7.4.0.Final]
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:371) [jbossweb-7.4.0.Final.jar:7.4.0.Final]
	at org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:353) [jbossweb-7.4.0.Final.jar:7.4.0.Final]
	at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:911) [jbossweb-7.4.0.Final.jar:7.4.0.Final]
	at org.apache.tomcat.util.net.NioEndpoint$ChannelProcessor.run(NioEndpoint.java:930) [jbossweb-7.4.0.Final.jar:7.4.0.Final]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_45]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_45]
	at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_45]

Comment 2 Radim Hatlapatka 2014-04-30 11:29:42 UTC
This is actually the same issue as in BZ#1083054. Closing this issue as duplicate

*** This bug has been marked as a duplicate of bug 1083054 ***


Note You need to log in before you can comment on or make changes to this bug.