You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Guillaume Nodet (JIRA)" <ji...@apache.org> on 2013/12/06 10:47:36 UTC
[jira] [Commented] (FELIX-3712) FileInstall throws Interrupted
exception when refreshed
[ https://issues.apache.org/jira/browse/FELIX-3712?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13841135#comment-13841135 ]
Guillaume Nodet commented on FELIX-3712:
----------------------------------------
I've made sure the InterruptedException is caught correctly.
Committing to https://svn.apache.org/repos/asf/felix/trunk ...
M fileinstall/src/main/java/org/apache/felix/fileinstall/internal/DirectoryWatcher.java
M fileinstall/src/main/java/org/apache/felix/fileinstall/internal/FileInstall.java
Committed r1548470
The logic can be changed to avoid refreshing bundles that are already wired, but this would require FELIX-3543, so I'll defer it until we do a minor/major release.
> FileInstall throws Interrupted exception when refreshed
> -------------------------------------------------------
>
> Key: FELIX-3712
> URL: https://issues.apache.org/jira/browse/FELIX-3712
> Project: Felix
> Issue Type: Bug
> Components: File Install
> Affects Versions: fileinstall-3.2.4, fileinstall-3.2.6
> Reporter: Per-Erik Svensson
>
> FileInstall will throw exception when refreshing. It is possible there are easier ways to reproduce this but here is one way:
> 1) Uninstall gogo command (if available) from the osgi container.
> 2) Install fileinstall
> 3) Put gogo command in the directory watched by fileinstall
> Result: Fileinstall throws
> In main loop, we have serious trouble: java.lang.RuntimeException: java.lang.InterruptedException
> java.lang.RuntimeException: java.lang.InterruptedException
> at org.apache.felix.fileinstall.internal.FileInstall.refresh(FileInstall.java:332)
> at org.apache.felix.fileinstall.internal.DirectoryWatcher.refresh(DirectoryWatcher.java:677)
> at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:494)
> at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:291)
> Caused by: java.lang.InterruptedException
> at java.lang.Object.wait(Native Method)
> at org.apache.felix.fileinstall.internal.FileInstall.refresh(FileInstall.java:330)
> ... 3 more
> Possible reason: Due to FELIX-3414, the refresh() method in DirectoryWatcher was changed from calling
> packageAdmin#refreshPackages() directly, to using the FileInstall#refresh()
> helper method. The later wraps interrupted excpetions in a runtime exception which is never caught in the directory watcher's main loop. Thus, the directory watcher will re-throw the exception, which it previously did not (since the interrupted excpetion would get caught).
--
This message was sent by Atlassian JIRA
(v6.1#6144)