felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Guillaume Nodet (JIRA)" <j...@apache.org>
Subject [jira] Commented: (FELIX-1753) The start level should check that the bundle still exists before starting it to avoid an ugly exception
Date Tue, 13 Oct 2009 22:09:31 GMT

    [ https://issues.apache.org/jira/browse/FELIX-1753?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12765274#action_12765274

Guillaume Nodet commented on FELIX-1753:

I certainly did not imply to add more locking.

But if you have lots of bundles to start at a given level, during the time you start the first
bundles, you may have other bundles being uninstalled.  I just think we should not print anything
if one bundle has been uninstalled between the time the bundle list has been computed and
the time we try to actually start the bundle.

What about adding the following just before trying to acquire the lock in the setActiveStartLevel

if (impl.getState() == Bundle.UNINSTALLED)

I don't think we should print / log an error, as this is imho a valid, yet rare, use case.

> The start level should check that the bundle still exists before starting it to avoid
an ugly exception
> -------------------------------------------------------------------------------------------------------
>                 Key: FELIX-1753
>                 URL: https://issues.apache.org/jira/browse/FELIX-1753
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: felix-2.0.0
>            Reporter: Guillaume Nodet
> ERROR: Error locking file:/Users/gnodet/work/felix/git/karaf/assembly/target/apache-felix-karaf-1.1.0-SNAPSHOT/deploy/test.xml
(java.lang.IllegalStateException: Bundle in unexpected state.)
> java.lang.IllegalStateException: Bundle in unexpected state.
> 	at org.apache.felix.framework.Felix.acquireBundleLock(Felix.java:4513)
> 	at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1048)
> 	at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)
> 	at java.lang.Thread.run(Thread.java:613)
> This is the exception I have when i start felix after having removed a bundle managed
by fileinstall while felix was stopped.
> I think it should be easy enough to add a check to avoid this exception.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message