You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@santuario.apache.org by "Andreas B. (JIRA)" <ji...@apache.org> on 2012/09/18 17:05:07 UTC

[jira] [Comment Edited] (SANTUARIO-344) XMLSignature keeps file-handle on xml-file

    [ https://issues.apache.org/jira/browse/SANTUARIO-344?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13457875#comment-13457875 ] 

Andreas B. edited comment on SANTUARIO-344 at 9/19/12 2:03 AM:
---------------------------------------------------------------

Unfortunately I can't :-(
I'm using the framework in a corporate setup with spring-batch and Xades4J, therefore it isn't even easy to create a simplified example I could post.
I had the same problem on a colleague's machine, although it is not a permanent problem.

To your comments:
* gc should not have any effects, because the resources are freed as soon you call .close()
* when I take a look at the source-code, .close() probably is not called, when an exception is thrown in the lines above (XMLSignatureInput.getBytesFromInputStream()). Although this could only apply to my problem, if an exception is caught somewhere, and ignored, because I don't see any in the logs.
                
      was (Author: burnyguru):
    Unfortunately I can't :-(
I'm using the framework in a corporate setup with spring-batch and Xades4J, though it isn't even easy to create a simplified example I could post.
I had the same problem on a colleague's machine, although it is not a permanent problem.

To your comments:
* gc should not have any effects, because the resources are freed as soon you call .close()
* when I take a look at the source-code, .close() probably is not called, when an exception is thrown in the lines above (XMLSignatureInput.getBytesFromInputStream()). Although this could only apply to my problem, if an exception is caught somewhere, and ignored, because I don't see any in the logs.
                  
> XMLSignature keeps file-handle on xml-file
> ------------------------------------------
>
>                 Key: SANTUARIO-344
>                 URL: https://issues.apache.org/jira/browse/SANTUARIO-344
>             Project: Santuario
>          Issue Type: Bug
>          Components: Java
>    Affects Versions: Java 1.5.1
>         Environment: Windows (XP, 7)
>            Reporter: Andreas B.
>            Assignee: Colm O hEigeartaigh
>            Priority: Minor
>
> When creating a signature based on a XML file (i.e. calling the method {{org.apache.xml.security.signature.XMLSignature.sign(Key signingKey)}}) the filehandle to the signed resource (the XML file) stays open after the method has finished (successfully).
> I was able to track it down to the above mentioned method, but then get lost somewhere at {{org.apache.xml.security.signature.Reference}}, which seems to use a cache for resource.
> Background: I want to delete the source-file after signature generation, which is not possible until the VM stops.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira