[
https://issues.apache.org/jira/browse/KARAF-2309?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13655810#comment-13655810
]
Xilai Dai commented on KARAF-2309:
----------------------------------
the fix could be simple just invoke close() on the zipfile in the canHandle()
method of org.apache.karaf.deployer.kar.KarArtifactInstaller, like this:
{code}
ZipFile zipFile = null;
try {
zipFile = new ZipFile(file);
if (zipFile.getEntry("META-INF/KARAF.MF") != null) {
logger.info("Found a Karaf archive with .zip prefix; will
deploy.");
return true;
}
} catch (Exception e) {
logger.warn("Problem extracting zip file '{}'; ignoring.",
file.getName(), e);
} finally {
zipFile.close();
}
{code}
> Normal Zip file which put into the deploy folder can't be deleted anymore
> -------------------------------------------------------------------------
>
> Key: KARAF-2309
> URL: https://issues.apache.org/jira/browse/KARAF-2309
> Project: Karaf
> Issue Type: Bug
> Components: karaf-kar
> Affects Versions: 2.3.1
> Environment: Win7, java 7
> Reporter: Xilai Dai
>
> If user put a normal zip file into deploy folder (has not META-INF/KARAF.MF),
> then, this zip file can't be removed anymore due to karaf still open it.
--
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