Rune <RunR6000 <at> yahoo.com> writes:

> 
> Hi,
> I had the exact same problem I looked into it and discovered that 
> it was due to that the FileInputStream in the ResourceResolverSpi
> (ResolverLocalFilesystem) I used was never closed. 
> I was not able just to close the stream since it is used later on, 
> so I circumvented the problem by reading the stream into a byte array 
> and initialized the XMLSignatureInput in ResolverLocalFilesystem.java 
> with this instead of the InputStream.
> 
> Your problem is probably related. What RessourceResolver did you use?   
> 
> Rune
> 
> 

Ignore the above I found the problem. Change the lines 
bytes=JavaUtils.getBytesFromStream(_inputOctetStreamProxy);
_inputOctetStreamProxy=new ByteArrayInputStream(bytes);

in the bottom of XMLSignatureInput to
bytes=JavaUtils.getBytesFromStream(_inputOctetStreamProxy);
_inputOctetStreamProxy.close();
_inputOctetStreamProxy=new ByteArrayInputStream(bytes);

The file is now released. 

I don't know why everything is to be read into memory which certainly is a
problem when you want to sign large binary files :( 




Reply via email to