Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1077835

Summary: BufferOverflowException during PUT REST response
Product: [JBoss] JBoss Enterprise Portal Platform 6 Reporter: mgottval <mgottval>
Component: PortalAssignee: Lucas Ponce <lponce>
Status: CLOSED NOTABUG QA Contact: Tomas Kyjovsky <tkyjovsk>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.2.0CC: epp-bugs, mvecera, theute
Target Milestone: ER01   
Target Release: 6.2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-03-20 15:49:28 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
template-user
none
Programatic REST client test none

Description mgottval 2014-03-18 16:35:14 UTC
Created attachment 876032 [details]
template-user

Description of problem:
When executing the HttpPut request, the target server fails to respond.

Steps to Reproduce:
I have an application code sending the PUT request:
e.g.:
HttpPut putRequest = new HttpPut(http://localhost:8080/rest/private/managed-components/template/user?importMode=overwrite);
FileEntity input = new FileEntity(template-user.zip, "application/zip");
putRequest.setEntity(input);
HttpResponse response = httpClient.execute(putRequest);

(The template-user.zip can be created as 
user/template/navigation.xml
user/template/pages.xml
user/template/user.xml,
or can be also some simple JSON entity with type "application/json")
       
The HttpResponse - response is null. Output says: INFO: I/O exception (org.apache.http.NoHttpResponseException) caught when processing request: The target server failed to respond.

In JPP log, there are exceptions:
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:666)
...

Comment 2 Lucas Ponce 2014-03-20 14:49:46 UTC
Created attachment 876895 [details]
Programatic REST client test

I've written a similar REST Client test and it works fine with jboss-portal-6.2.0-DR1-prod.zip.

Please, could you compare it with your tests to validate it ?

Thanks,
Lucas

Comment 3 mgottval 2014-03-20 15:35:45 UTC
I compared the libraries, changed from org.jboss.resteasy to org.apache.httpcomponents in the project and it works fine. 

Thanks