Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0003655 [Hessian] minor always 08-28-09 08:51 07-29-19 13:54
Reporter ferg View Status public  
Assigned To ferg
Priority normal Resolution fixed  
Status closed   Product Version 4.0.1
Summary 0003655: Hessian InputStream result is closed
Description (rep by Mattias Jiderhamn)
After upgrading from Resin/Hessian 3.1 to 4.0.1 we have a problem
returning InputStream from Hessian calls.
I get this exception while trying to read the stream on the client:

java.io.IOException: stream is closed
  at sun.net.www.http.ChunkedInputStream.ensureOpen(ChunkedInputStream.java:151)
  at sun.net.www.http.ChunkedInputStream.read(ChunkedInputStream.java:646)
  at java.io.FilterInputStream.read(FilterInputStream.java:116)
  at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:2446)
  at com.caucho.hessian.io.Hessian2Input.readBuffer(Hessian2Input.java:2689)
  at com.caucho.hessian.io.Hessian2Input.read(Hessian2Input.java:2635)
  at com.caucho.hessian.io.Hessian2Input$ReadInputStream.read(Hessian2Input.java:2785)
...


I created a small testcase which just sends the output of a
Hessian2Output to a Hessian2Input and in that case, InputStream works fine.

The proxy is created using Springs HessianProxyFactoryBean.

Any tips on how to debug this???

  
Additional Information
Attached Files  Hessian_3000655.patch [^] (571 bytes) 08-28-09 09:46

- Relationships

- Notes
(0004196)
Peter Dettman
08-28-09 09:49

I was able to reproduce Mattias' issue, and tracked the problem down to HessianProxy (see attached patch). The call to http.disconnect in the finally block of the invoke method was causing the reply to be truncated. I have copied the handling for Hessian 1 'InputStream' replies and it appears to fix the problem.
 
(0004545)
stefanthurnherr
04-26-10 03:46

Hi Hessian team

Any chance that this gets fixed in the next official minor/major release? I just hit the same bug using resin-hessian 4.0.3 on the server side, and hessian-4.0.3 on the client side.
 
(0004686)
fabdouglas
07-29-10 14:17

This bug exists in 4.0.7, and the attached patch works very well for this version.

Any change to get it in 4.0.8?
 
(0004869)
selikoff
12-09-10 12:39

Is there a reason this bug has not been resolved? The solution works perfectly. Without the fix transferring/downloading files is broken in Hessian 4.
 
(0005058)
Holy
02-15-11 07:26

Hello, is there a chance to get this patch to next release? And is there a time plan for this release? Thx
 
(0005379)
selikoff
07-18-11 12:12
edited on: 07-18-11 12:13

Could someone please include this fix in the next release? I'd update the SVN myself, but I'm not familiar with the repository.

You just need to update src/com/caucho/hessian/client/HessianProxy.java and add:

    if (value instanceof InputStream) {
            value = new ResultInputStream(conn, is, in, (InputStream) value);
            is = null;
            conn = null;
    }

After line:

Object value = in.readReply(method.getReturnType());

I've verified it as solving the issue.

 
(0006909)
tiendat
07-27-19 05:37

Dear experts,

I have been able to reproduced this issue in Hessian v4.0.38.

Just wonder if this issue was fixed in the newest version?

Best
Tien Dat
 
(0006910)
ferg
07-29-19 13:54

hessian/34c1
 

- Issue History
Date Modified Username Field Change
08-28-09 08:51 ferg New Issue
08-28-09 09:46 Peter Dettman File Added: Hessian_3000655.patch
08-28-09 09:49 Peter Dettman Note Added: 0004196
08-28-09 09:50 Peter Dettman Issue Monitored: Peter Dettman
08-30-09 11:25 mate Issue Monitored: mate
04-26-10 03:46 stefanthurnherr Note Added: 0004545
04-26-10 03:49 stefanthurnherr Issue Monitored: stefanthurnherr
07-29-10 14:17 fabdouglas Note Added: 0004686
07-29-10 14:17 fabdouglas Issue Monitored: fabdouglas
12-09-10 12:39 selikoff Note Added: 0004869
02-15-11 07:23 Holy Issue Monitored: Holy
02-15-11 07:26 Holy Note Added: 0005058
06-14-11 05:38 jsbret Issue Monitored: jsbret
07-18-11 12:12 selikoff Note Added: 0005379
07-18-11 12:13 selikoff Note Edited: 0005379
07-18-11 12:13 selikoff Issue Monitored: selikoff
07-27-19 05:37 tiendat Note Added: 0006909
07-29-19 13:54 ferg Note Added: 0006910
07-29-19 13:54 ferg Assigned To  => ferg
07-29-19 13:54 ferg Status new => closed
07-29-19 13:54 ferg Resolution open => fixed
07-29-19 13:54 ferg Fixed in Version  => 4.0.63
07-29-19 13:54 ferg Steps to Reproduce Updated


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
60 total queries executed.
40 unique queries executed.
Powered by Mantis Bugtracker