You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Dan Gravell (JIRA)" <ji...@apache.org> on 2012/09/03 12:49:07 UTC

[jira] [Created] (FELIX-3652) ArrayIndexOutOfBoundsException when trying to adapt() a stopped bundle

Dan Gravell created FELIX-3652:
----------------------------------

             Summary: ArrayIndexOutOfBoundsException when trying to adapt() a stopped bundle
                 Key: FELIX-3652
                 URL: https://issues.apache.org/jira/browse/FELIX-3652
             Project: Felix
          Issue Type: Bug
          Components: Framework
    Affects Versions: framework-4.0.2
            Reporter: Dan Gravell
            Priority: Minor


I have the following code block:

final Iterable<Bundle> startedBundles = [...]

for (Bundle bundle : startedBundles) {
	try {
		if(!FelixObrUtils.isFragment(bundle)) sysBundle.getBundleContext().getBundle(bundle.getBundleId()).stop();
	} catch (BundleException e) {
		LOG.error("Failed to stop " + bundle.getSymbolicName(), e);
	}
}
resolver.deploy(0);
blockingRefreshBundles(null, sysBundle.getBundleContext());
for (Bundle bundle : startedBundles) {
	try {
		if(!FelixObrUtils.isFragment(bundle)) sysBundle.getBundleContext().getBundle(bundle.getBundleId()).start();
	} catch (BundleException e) {
		LOG.error("Failed to restart " + bundle.getSymbolicName(), e);
	}
}

blockingRefreshBundles() blocks until frameworkWiring.refreshBundles has completed using a CountDownLatch and a FrameworkListener.

Pertinently, FelixObrUtils.isFragment looks like:

public static boolean isFragment(Bundle bundle) {
	return (bundle.adapt(BundleRevision.class).getTypes() & BundleRevision.TYPE_FRAGMENT) != 0;
}

Upon the second call to FelixObrUtils.isFragment I get:

java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
    	at java.util.ArrayList.rangeCheck(ArrayList.java:571)
    	at java.util.ArrayList.get(ArrayList.java:349)
    	at org.apache.felix.framework.BundleImpl.adapt(BundleImpl.java:1046)
    	at com.elsten.bliss.updater.FelixObrUtils.isFragment(FelixObrUtils.java:149)
    	at com.elsten.bliss.updater.OnlineUpdater$2.doRun(OnlineUpdater.java:124)
    	at com.elsten.util.CatchThrowableRunnable.run(CatchThrowableRunnable.java:23)
    	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    	at java.lang.Thread.run(Thread.java:679)

Presumably this is because the bundle has been stopped, possibly updated and refreshed in the meantime.

Maybe I should not be doing this on a stopped bundle, and I should be getting a fresh view of the bundle, but shouldn't this be handled differently? AIOOBE is not documented as an exception that may be thrown in the OSGi API. Knowing how to handle this requires knowledge of BundleImpl's implementation (m_revisions etc).

--
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

[jira] [Updated] (FELIX-3652) ArrayIndexOutOfBoundsException when trying to adapt() a stopped bundle

Posted by "Dan Gravell (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-3652?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dan Gravell updated FELIX-3652:
-------------------------------

    Description: 
I have the following code block:

final Iterable<Bundle> startedBundles = [...]

for (Bundle bundle : startedBundles) {
	try {
		if(!FelixObrUtils.isFragment(bundle)) sysBundle.getBundleContext().getBundle(bundle.getBundleId()).stop();
	} catch (BundleException e) {
		LOG.error("Failed to stop " + bundle.getSymbolicName(), e);
	}
}
resolver.deploy(0);
blockingRefreshBundles(null, sysBundle.getBundleContext());
for (Bundle bundle : startedBundles) {
	try {
		if(!FelixObrUtils.isFragment(bundle)) sysBundle.getBundleContext().getBundle(bundle.getBundleId()).start();
	} catch (BundleException e) {
		LOG.error("Failed to restart " + bundle.getSymbolicName(), e);
	}
}

blockingRefreshBundles() blocks until frameworkWiring.refreshBundles has completed using a CountDownLatch and a FrameworkListener.

Pertinently, FelixObrUtils.isFragment looks like:

public static boolean isFragment(Bundle bundle) {
	return (bundle.adapt(BundleRevision.class).getTypes() & BundleRevision.TYPE_FRAGMENT) != 0;
}

Upon the second call to FelixObrUtils.isFragment I get:

java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
    	at java.util.ArrayList.rangeCheck(ArrayList.java:571)
    	at java.util.ArrayList.get(ArrayList.java:349)
    	at org.apache.felix.framework.BundleImpl.adapt(BundleImpl.java:1046)
    	at com.elsten.bliss.updater.FelixObrUtils.isFragment(FelixObrUtils.java:149)
    	at com.elsten.bliss.updater.OnlineUpdater$2.doRun(OnlineUpdater.java:124)
    	at com.elsten.util.CatchThrowableRunnable.run(CatchThrowableRunnable.java:23)
    	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    	at java.lang.Thread.run(Thread.java:679)

Presumably this is because the bundle has been stopped, possibly updated and refreshed in the meantime.

Maybe I should not be doing this on a stopped bundle, and I should be getting a fresh view of the bundle, but shouldn't this be handled differently? AIOOBE is not documented as an exception that may be thrown in the OSGi API. Knowing how to handle this requires knowledge of BundleImpl's implementation (m_revisions etc).

  was:
I have the following code block:
{code:java}
final Iterable<Bundle> startedBundles = [...]

for (Bundle bundle : startedBundles) {
	try {
		if(!FelixObrUtils.isFragment(bundle)) sysBundle.getBundleContext().getBundle(bundle.getBundleId()).stop();
	} catch (BundleException e) {
		LOG.error("Failed to stop " + bundle.getSymbolicName(), e);
	}
}
resolver.deploy(0);
blockingRefreshBundles(null, sysBundle.getBundleContext());
for (Bundle bundle : startedBundles) {
	try {
		if(!FelixObrUtils.isFragment(bundle)) sysBundle.getBundleContext().getBundle(bundle.getBundleId()).start();
	} catch (BundleException e) {
		LOG.error("Failed to restart " + bundle.getSymbolicName(), e);
	}
}
{code:java}

blockingRefreshBundles() blocks until frameworkWiring.refreshBundles has completed using a CountDownLatch and a FrameworkListener.

Pertinently, FelixObrUtils.isFragment looks like:

{code:java}
public static boolean isFragment(Bundle bundle) {
	return (bundle.adapt(BundleRevision.class).getTypes() & BundleRevision.TYPE_FRAGMENT) != 0;
}
{code:java}

Upon the second call to FelixObrUtils.isFragment I get:

{code}
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
    	at java.util.ArrayList.rangeCheck(ArrayList.java:571)
    	at java.util.ArrayList.get(ArrayList.java:349)
    	at org.apache.felix.framework.BundleImpl.adapt(BundleImpl.java:1046)
    	at com.elsten.bliss.updater.FelixObrUtils.isFragment(FelixObrUtils.java:149)
    	at com.elsten.bliss.updater.OnlineUpdater$2.doRun(OnlineUpdater.java:124)
    	at com.elsten.util.CatchThrowableRunnable.run(CatchThrowableRunnable.java:23)
    	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    	at java.lang.Thread.run(Thread.java:679)
{code}

Presumably this is because the bundle has been stopped, possibly updated and refreshed in the meantime.

Maybe I should not be doing this on a stopped bundle, and I should be getting a fresh view of the bundle, but shouldn't this be handled differently? AIOOBE is not documented as an exception that may be thrown in the OSGi API. Knowing how to handle this requires knowledge of BundleImpl's implementation (m_revisions etc).

    
> ArrayIndexOutOfBoundsException when trying to adapt() a stopped bundle
> ----------------------------------------------------------------------
>
>                 Key: FELIX-3652
>                 URL: https://issues.apache.org/jira/browse/FELIX-3652
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: framework-4.0.2
>            Reporter: Dan Gravell
>            Priority: Minor
>
> I have the following code block:
> final Iterable<Bundle> startedBundles = [...]
> for (Bundle bundle : startedBundles) {
> 	try {
> 		if(!FelixObrUtils.isFragment(bundle)) sysBundle.getBundleContext().getBundle(bundle.getBundleId()).stop();
> 	} catch (BundleException e) {
> 		LOG.error("Failed to stop " + bundle.getSymbolicName(), e);
> 	}
> }
> resolver.deploy(0);
> blockingRefreshBundles(null, sysBundle.getBundleContext());
> for (Bundle bundle : startedBundles) {
> 	try {
> 		if(!FelixObrUtils.isFragment(bundle)) sysBundle.getBundleContext().getBundle(bundle.getBundleId()).start();
> 	} catch (BundleException e) {
> 		LOG.error("Failed to restart " + bundle.getSymbolicName(), e);
> 	}
> }
> blockingRefreshBundles() blocks until frameworkWiring.refreshBundles has completed using a CountDownLatch and a FrameworkListener.
> Pertinently, FelixObrUtils.isFragment looks like:
> public static boolean isFragment(Bundle bundle) {
> 	return (bundle.adapt(BundleRevision.class).getTypes() & BundleRevision.TYPE_FRAGMENT) != 0;
> }
> Upon the second call to FelixObrUtils.isFragment I get:
> java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
>     	at java.util.ArrayList.rangeCheck(ArrayList.java:571)
>     	at java.util.ArrayList.get(ArrayList.java:349)
>     	at org.apache.felix.framework.BundleImpl.adapt(BundleImpl.java:1046)
>     	at com.elsten.bliss.updater.FelixObrUtils.isFragment(FelixObrUtils.java:149)
>     	at com.elsten.bliss.updater.OnlineUpdater$2.doRun(OnlineUpdater.java:124)
>     	at com.elsten.util.CatchThrowableRunnable.run(CatchThrowableRunnable.java:23)
>     	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
>     	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
>     	at java.lang.Thread.run(Thread.java:679)
> Presumably this is because the bundle has been stopped, possibly updated and refreshed in the meantime.
> Maybe I should not be doing this on a stopped bundle, and I should be getting a fresh view of the bundle, but shouldn't this be handled differently? AIOOBE is not documented as an exception that may be thrown in the OSGi API. Knowing how to handle this requires knowledge of BundleImpl's implementation (m_revisions etc).

--
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

[jira] [Updated] (FELIX-3652) ArrayIndexOutOfBoundsException when trying to adapt() a stopped bundle

Posted by "Dan Gravell (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-3652?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dan Gravell updated FELIX-3652:
-------------------------------

    Description: 
I have the following code block:
{code:java}
final Iterable<Bundle> startedBundles = [...]

for (Bundle bundle : startedBundles) {
	try {
		if(!FelixObrUtils.isFragment(bundle)) sysBundle.getBundleContext().getBundle(bundle.getBundleId()).stop();
	} catch (BundleException e) {
		LOG.error("Failed to stop " + bundle.getSymbolicName(), e);
	}
}
resolver.deploy(0);
blockingRefreshBundles(null, sysBundle.getBundleContext());
for (Bundle bundle : startedBundles) {
	try {
		if(!FelixObrUtils.isFragment(bundle)) sysBundle.getBundleContext().getBundle(bundle.getBundleId()).start();
	} catch (BundleException e) {
		LOG.error("Failed to restart " + bundle.getSymbolicName(), e);
	}
}
{code:java}

blockingRefreshBundles() blocks until frameworkWiring.refreshBundles has completed using a CountDownLatch and a FrameworkListener.

Pertinently, FelixObrUtils.isFragment looks like:

{code:java}
public static boolean isFragment(Bundle bundle) {
	return (bundle.adapt(BundleRevision.class).getTypes() & BundleRevision.TYPE_FRAGMENT) != 0;
}
{code:java}

Upon the second call to FelixObrUtils.isFragment I get:

{code}
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
    	at java.util.ArrayList.rangeCheck(ArrayList.java:571)
    	at java.util.ArrayList.get(ArrayList.java:349)
    	at org.apache.felix.framework.BundleImpl.adapt(BundleImpl.java:1046)
    	at com.elsten.bliss.updater.FelixObrUtils.isFragment(FelixObrUtils.java:149)
    	at com.elsten.bliss.updater.OnlineUpdater$2.doRun(OnlineUpdater.java:124)
    	at com.elsten.util.CatchThrowableRunnable.run(CatchThrowableRunnable.java:23)
    	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    	at java.lang.Thread.run(Thread.java:679)
{code}

Presumably this is because the bundle has been stopped, possibly updated and refreshed in the meantime.

Maybe I should not be doing this on a stopped bundle, and I should be getting a fresh view of the bundle, but shouldn't this be handled differently? AIOOBE is not documented as an exception that may be thrown in the OSGi API. Knowing how to handle this requires knowledge of BundleImpl's implementation (m_revisions etc).

  was:
I have the following code block:

final Iterable<Bundle> startedBundles = [...]

for (Bundle bundle : startedBundles) {
	try {
		if(!FelixObrUtils.isFragment(bundle)) sysBundle.getBundleContext().getBundle(bundle.getBundleId()).stop();
	} catch (BundleException e) {
		LOG.error("Failed to stop " + bundle.getSymbolicName(), e);
	}
}
resolver.deploy(0);
blockingRefreshBundles(null, sysBundle.getBundleContext());
for (Bundle bundle : startedBundles) {
	try {
		if(!FelixObrUtils.isFragment(bundle)) sysBundle.getBundleContext().getBundle(bundle.getBundleId()).start();
	} catch (BundleException e) {
		LOG.error("Failed to restart " + bundle.getSymbolicName(), e);
	}
}

blockingRefreshBundles() blocks until frameworkWiring.refreshBundles has completed using a CountDownLatch and a FrameworkListener.

Pertinently, FelixObrUtils.isFragment looks like:

public static boolean isFragment(Bundle bundle) {
	return (bundle.adapt(BundleRevision.class).getTypes() & BundleRevision.TYPE_FRAGMENT) != 0;
}

Upon the second call to FelixObrUtils.isFragment I get:

java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
    	at java.util.ArrayList.rangeCheck(ArrayList.java:571)
    	at java.util.ArrayList.get(ArrayList.java:349)
    	at org.apache.felix.framework.BundleImpl.adapt(BundleImpl.java:1046)
    	at com.elsten.bliss.updater.FelixObrUtils.isFragment(FelixObrUtils.java:149)
    	at com.elsten.bliss.updater.OnlineUpdater$2.doRun(OnlineUpdater.java:124)
    	at com.elsten.util.CatchThrowableRunnable.run(CatchThrowableRunnable.java:23)
    	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    	at java.lang.Thread.run(Thread.java:679)

Presumably this is because the bundle has been stopped, possibly updated and refreshed in the meantime.

Maybe I should not be doing this on a stopped bundle, and I should be getting a fresh view of the bundle, but shouldn't this be handled differently? AIOOBE is not documented as an exception that may be thrown in the OSGi API. Knowing how to handle this requires knowledge of BundleImpl's implementation (m_revisions etc).

    
> ArrayIndexOutOfBoundsException when trying to adapt() a stopped bundle
> ----------------------------------------------------------------------
>
>                 Key: FELIX-3652
>                 URL: https://issues.apache.org/jira/browse/FELIX-3652
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: framework-4.0.2
>            Reporter: Dan Gravell
>            Priority: Minor
>
> I have the following code block:
> {code:java}
> final Iterable<Bundle> startedBundles = [...]
> for (Bundle bundle : startedBundles) {
> 	try {
> 		if(!FelixObrUtils.isFragment(bundle)) sysBundle.getBundleContext().getBundle(bundle.getBundleId()).stop();
> 	} catch (BundleException e) {
> 		LOG.error("Failed to stop " + bundle.getSymbolicName(), e);
> 	}
> }
> resolver.deploy(0);
> blockingRefreshBundles(null, sysBundle.getBundleContext());
> for (Bundle bundle : startedBundles) {
> 	try {
> 		if(!FelixObrUtils.isFragment(bundle)) sysBundle.getBundleContext().getBundle(bundle.getBundleId()).start();
> 	} catch (BundleException e) {
> 		LOG.error("Failed to restart " + bundle.getSymbolicName(), e);
> 	}
> }
> {code:java}
> blockingRefreshBundles() blocks until frameworkWiring.refreshBundles has completed using a CountDownLatch and a FrameworkListener.
> Pertinently, FelixObrUtils.isFragment looks like:
> {code:java}
> public static boolean isFragment(Bundle bundle) {
> 	return (bundle.adapt(BundleRevision.class).getTypes() & BundleRevision.TYPE_FRAGMENT) != 0;
> }
> {code:java}
> Upon the second call to FelixObrUtils.isFragment I get:
> {code}
> java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
>     	at java.util.ArrayList.rangeCheck(ArrayList.java:571)
>     	at java.util.ArrayList.get(ArrayList.java:349)
>     	at org.apache.felix.framework.BundleImpl.adapt(BundleImpl.java:1046)
>     	at com.elsten.bliss.updater.FelixObrUtils.isFragment(FelixObrUtils.java:149)
>     	at com.elsten.bliss.updater.OnlineUpdater$2.doRun(OnlineUpdater.java:124)
>     	at com.elsten.util.CatchThrowableRunnable.run(CatchThrowableRunnable.java:23)
>     	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
>     	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
>     	at java.lang.Thread.run(Thread.java:679)
> {code}
> Presumably this is because the bundle has been stopped, possibly updated and refreshed in the meantime.
> Maybe I should not be doing this on a stopped bundle, and I should be getting a fresh view of the bundle, but shouldn't this be handled differently? AIOOBE is not documented as an exception that may be thrown in the OSGi API. Knowing how to handle this requires knowledge of BundleImpl's implementation (m_revisions etc).

--
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

[jira] [Commented] (FELIX-3652) ArrayIndexOutOfBoundsException when trying to adapt() a stopped bundle

Posted by "Dan Gravell (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-3652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13447329#comment-13447329 ] 

Dan Gravell commented on FELIX-3652:
------------------------------------

I'll do that, but I haven't tried reproducing this yet.
                
> ArrayIndexOutOfBoundsException when trying to adapt() a stopped bundle
> ----------------------------------------------------------------------
>
>                 Key: FELIX-3652
>                 URL: https://issues.apache.org/jira/browse/FELIX-3652
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: framework-4.0.2
>            Reporter: Dan Gravell
>            Priority: Minor
>
> I have the following code block:
> final Iterable<Bundle> startedBundles = [...]
> for (Bundle bundle : startedBundles) {
> 	try {
> 		if(!FelixObrUtils.isFragment(bundle)) sysBundle.getBundleContext().getBundle(bundle.getBundleId()).stop();
> 	} catch (BundleException e) {
> 		LOG.error("Failed to stop " + bundle.getSymbolicName(), e);
> 	}
> }
> resolver.deploy(0);
> blockingRefreshBundles(null, sysBundle.getBundleContext());
> for (Bundle bundle : startedBundles) {
> 	try {
> 		if(!FelixObrUtils.isFragment(bundle)) sysBundle.getBundleContext().getBundle(bundle.getBundleId()).start();
> 	} catch (BundleException e) {
> 		LOG.error("Failed to restart " + bundle.getSymbolicName(), e);
> 	}
> }
> blockingRefreshBundles() blocks until frameworkWiring.refreshBundles has completed using a CountDownLatch and a FrameworkListener.
> Pertinently, FelixObrUtils.isFragment looks like:
> public static boolean isFragment(Bundle bundle) {
> 	return (bundle.adapt(BundleRevision.class).getTypes() & BundleRevision.TYPE_FRAGMENT) != 0;
> }
> Upon the second call to FelixObrUtils.isFragment I get:
> java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
>     	at java.util.ArrayList.rangeCheck(ArrayList.java:571)
>     	at java.util.ArrayList.get(ArrayList.java:349)
>     	at org.apache.felix.framework.BundleImpl.adapt(BundleImpl.java:1046)
>     	at com.elsten.bliss.updater.FelixObrUtils.isFragment(FelixObrUtils.java:149)
>     	at com.elsten.bliss.updater.OnlineUpdater$2.doRun(OnlineUpdater.java:124)
>     	at com.elsten.util.CatchThrowableRunnable.run(CatchThrowableRunnable.java:23)
>     	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
>     	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
>     	at java.lang.Thread.run(Thread.java:679)
> Presumably this is because the bundle has been stopped, possibly updated and refreshed in the meantime.
> Maybe I should not be doing this on a stopped bundle, and I should be getting a fresh view of the bundle, but shouldn't this be handled differently? AIOOBE is not documented as an exception that may be thrown in the OSGi API. Knowing how to handle this requires knowledge of BundleImpl's implementation (m_revisions etc).

--
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

[jira] [Commented] (FELIX-3652) ArrayIndexOutOfBoundsException when trying to adapt() a stopped bundle

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-3652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13447333#comment-13447333 ] 

Richard S. Hall commented on FELIX-3652:
----------------------------------------

If you can get me to reproduce it, then I can look into directly.
                
> ArrayIndexOutOfBoundsException when trying to adapt() a stopped bundle
> ----------------------------------------------------------------------
>
>                 Key: FELIX-3652
>                 URL: https://issues.apache.org/jira/browse/FELIX-3652
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: framework-4.0.2
>            Reporter: Dan Gravell
>            Priority: Minor
>
> I have the following code block:
> final Iterable<Bundle> startedBundles = [...]
> for (Bundle bundle : startedBundles) {
> 	try {
> 		if(!FelixObrUtils.isFragment(bundle)) sysBundle.getBundleContext().getBundle(bundle.getBundleId()).stop();
> 	} catch (BundleException e) {
> 		LOG.error("Failed to stop " + bundle.getSymbolicName(), e);
> 	}
> }
> resolver.deploy(0);
> blockingRefreshBundles(null, sysBundle.getBundleContext());
> for (Bundle bundle : startedBundles) {
> 	try {
> 		if(!FelixObrUtils.isFragment(bundle)) sysBundle.getBundleContext().getBundle(bundle.getBundleId()).start();
> 	} catch (BundleException e) {
> 		LOG.error("Failed to restart " + bundle.getSymbolicName(), e);
> 	}
> }
> blockingRefreshBundles() blocks until frameworkWiring.refreshBundles has completed using a CountDownLatch and a FrameworkListener.
> Pertinently, FelixObrUtils.isFragment looks like:
> public static boolean isFragment(Bundle bundle) {
> 	return (bundle.adapt(BundleRevision.class).getTypes() & BundleRevision.TYPE_FRAGMENT) != 0;
> }
> Upon the second call to FelixObrUtils.isFragment I get:
> java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
>     	at java.util.ArrayList.rangeCheck(ArrayList.java:571)
>     	at java.util.ArrayList.get(ArrayList.java:349)
>     	at org.apache.felix.framework.BundleImpl.adapt(BundleImpl.java:1046)
>     	at com.elsten.bliss.updater.FelixObrUtils.isFragment(FelixObrUtils.java:149)
>     	at com.elsten.bliss.updater.OnlineUpdater$2.doRun(OnlineUpdater.java:124)
>     	at com.elsten.util.CatchThrowableRunnable.run(CatchThrowableRunnable.java:23)
>     	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
>     	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
>     	at java.lang.Thread.run(Thread.java:679)
> Presumably this is because the bundle has been stopped, possibly updated and refreshed in the meantime.
> Maybe I should not be doing this on a stopped bundle, and I should be getting a fresh view of the bundle, but shouldn't this be handled differently? AIOOBE is not documented as an exception that may be thrown in the OSGi API. Knowing how to handle this requires knowledge of BundleImpl's implementation (m_revisions etc).

--
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

[jira] [Commented] (FELIX-3652) ArrayIndexOutOfBoundsException when trying to adapt() a stopped bundle

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-3652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13447312#comment-13447312 ] 

Richard S. Hall commented on FELIX-3652:
----------------------------------------

Is it not possible to modify your code to print the state of the bundle before calling the adapt() method?
                
> ArrayIndexOutOfBoundsException when trying to adapt() a stopped bundle
> ----------------------------------------------------------------------
>
>                 Key: FELIX-3652
>                 URL: https://issues.apache.org/jira/browse/FELIX-3652
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: framework-4.0.2
>            Reporter: Dan Gravell
>            Priority: Minor
>
> I have the following code block:
> final Iterable<Bundle> startedBundles = [...]
> for (Bundle bundle : startedBundles) {
> 	try {
> 		if(!FelixObrUtils.isFragment(bundle)) sysBundle.getBundleContext().getBundle(bundle.getBundleId()).stop();
> 	} catch (BundleException e) {
> 		LOG.error("Failed to stop " + bundle.getSymbolicName(), e);
> 	}
> }
> resolver.deploy(0);
> blockingRefreshBundles(null, sysBundle.getBundleContext());
> for (Bundle bundle : startedBundles) {
> 	try {
> 		if(!FelixObrUtils.isFragment(bundle)) sysBundle.getBundleContext().getBundle(bundle.getBundleId()).start();
> 	} catch (BundleException e) {
> 		LOG.error("Failed to restart " + bundle.getSymbolicName(), e);
> 	}
> }
> blockingRefreshBundles() blocks until frameworkWiring.refreshBundles has completed using a CountDownLatch and a FrameworkListener.
> Pertinently, FelixObrUtils.isFragment looks like:
> public static boolean isFragment(Bundle bundle) {
> 	return (bundle.adapt(BundleRevision.class).getTypes() & BundleRevision.TYPE_FRAGMENT) != 0;
> }
> Upon the second call to FelixObrUtils.isFragment I get:
> java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
>     	at java.util.ArrayList.rangeCheck(ArrayList.java:571)
>     	at java.util.ArrayList.get(ArrayList.java:349)
>     	at org.apache.felix.framework.BundleImpl.adapt(BundleImpl.java:1046)
>     	at com.elsten.bliss.updater.FelixObrUtils.isFragment(FelixObrUtils.java:149)
>     	at com.elsten.bliss.updater.OnlineUpdater$2.doRun(OnlineUpdater.java:124)
>     	at com.elsten.util.CatchThrowableRunnable.run(CatchThrowableRunnable.java:23)
>     	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
>     	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
>     	at java.lang.Thread.run(Thread.java:679)
> Presumably this is because the bundle has been stopped, possibly updated and refreshed in the meantime.
> Maybe I should not be doing this on a stopped bundle, and I should be getting a fresh view of the bundle, but shouldn't this be handled differently? AIOOBE is not documented as an exception that may be thrown in the OSGi API. Knowing how to handle this requires knowledge of BundleImpl's implementation (m_revisions etc).

--
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

[jira] [Commented] (FELIX-3652) ArrayIndexOutOfBoundsException when trying to adapt() a stopped bundle

Posted by "Dan Gravell (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-3652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13447308#comment-13447308 ] 

Dan Gravell commented on FELIX-3652:
------------------------------------

Unfortunately I cannot tell because I don't know which bundle is being inspected at this point. I don't see any uninstalled events though.

Here's the full list of all events:

2012-08-30 11:40:49,380 (thread pool-19-thread-1) DEBUG (256) com.elsten.util (OnlineUpdater.java:83)
2012-08-30 11:40:49,380 (thread pool-19-thread-1) DEBUG (4) com.elsten.util (OnlineUpdater.java:83)
2012-08-30 11:40:49,381 (thread pool-19-thread-1) DEBUG (256) com.elsten.bliss.platform (OnlineUpdater.java:83)
2012-08-30 11:40:49,383 (thread BlockingLowPriorityBufferStorageNotificationBus-notification worker) WARN  Interrupted while sleeping between SN batch notification (BoundedBufferStorageNotificationBus.java:178)
2012-08-30 11:40:49,383 (thread UntaggedSuggestionStorageNotificationListener) INFO  Interrupted while waiting for untagged files (UntaggedSuggestionStorageNotificationListener.java:49)
2012-08-30 11:40:49,422 (thread pool-19-thread-1) DEBUG (4) com.elsten.bliss.platform (OnlineUpdater.java:83)
2012-08-30 11:40:49,423 (thread pool-19-thread-1) DEBUG (256) com.elsten.bliss.web.debug (OnlineUpdater.java:83)
2012-08-30 11:40:49,425 (thread BlockingLowPriorityBufferStorageNotificationBus-notification worker) ERROR Exception thrown when notifying storage node listeners of changes: Update [JaudioTaggerStorageNode[full id=file:/mnt/media/music.withoutart/music/Beastie_Boys/Hello_Nasty/21-Dr._Lee,_PhD.flac,root=/mnt/media/music.withoutart/music], JaudioTaggerStorageNode[full id=file:/mnt/media/music.withoutart/music/Beastie_Boys/Hello_Nasty/20-Dedication.flac,root=/mnt/media/music.withoutart/music], JaudioTaggerStorageNode[full id=file:/mnt/media/music.withoutart/music/Beastie_Boys/Hello_Nasty/16-The_Negotiation_Limerick_File.flac,root=/mnt/media/music.withoutart/music], JaudioTaggerStorageNode[full id=file:/mnt/media/music.withoutart/music/Beastie_Boys/Hello_Nasty/02-Move.flac,root=/mnt/media/music.withoutart/music], JaudioTaggerStorageNode[full id=file:/mnt/media/music.withoutart/music/Beastie_Boys/Hello_Nasty/18-Picture_This.flac,root=/mnt/media/music.withoutart/music], JaudioTaggerStorageNode[full id=file:/mnt/media/music.withoutart/music/Beastie_Boys/Hello_Nasty/05-Just_A_Test.flac,root=/mnt/media/music.withoutart/music], JaudioTaggerStorageNode[full id=file:/mnt/media/music.withoutart/music/Beastie_Boys/Hello_Nasty/03-Remote_Control.flac,root=/mnt/media/music.withoutart/music], JaudioTaggerStorageNode[full id=file:/mnt/media/music.withoutart/music/Beastie_Boys/Hello_Nasty/09-Putting_Shame_In_Your_Game.flac,root=/mnt/media/music.withoutart/music], JaudioTaggerStorageNode[full id=file:/mnt/media/music.withoutart/music/Beastie_Boys/Hello_Nasty/11-And_Me.flac,root=/mnt/media/music.withoutart/music], JaudioTaggerStorageNode[full id=file:/mnt/media/music.withoutart/music/Beastie_Boys/Hello_Nasty/08-Sneakin_Out_The_Hospital.flac,root=/mnt/media/music.withoutart/music], JaudioTaggerStorageNode[full id=file:/mnt/media/music.withoutart/music/Beastie_Boys/Hello_Nasty/12-Three_MCs_And_One_DJ.flac,root=/mnt/media/music.withoutart/music], JaudioTaggerStorageNode[full id=file:/mnt/media/music.withoutart/music/Beastie_Boys/Hello_Nasty/10-Flowin_Prose.flac,root=/mnt/media/music.withoutart/music], JaudioTaggerStorageNode[full id=file:/mnt/media/music.withoutart/music/Beastie_Boys/Hello_Nasty/19-Unite.flac,root=/mnt/media/music.withoutart/music], JaudioTaggerStorageNode[full id=file:/mnt/media/music.withoutart/music/Beastie_Boys/Hello_Nasty/07-Intergalactic.flac,root=/mnt/media/music.withoutart/music], JaudioTaggerStorageNode[full id=file:/mnt/media/music.withoutart/music/Beastie_Boys/Hello_Nasty/01-Super_Disco_Breakin.flac,root=/mnt/media/music.withoutart/music], JaudioTaggerStorageNode[full id=file:/mnt/media/music.withoutart/music/Beastie_Boys/Hello_Nasty/15-I_Dont_Know.flac,root=/mnt/media/music.withoutart/music], JaudioTaggerStorageNode[full id=file:/mnt/media/music.withoutart/music/Beastie_Boys/Hello_Nasty/22-Instant_Death.flac,root=/mnt/media/music.withoutart/music], JaudioTaggerStorageNode[full id=file:/mnt/media/music.withoutart/music/Beastie_Boys/Hello_Nasty/06-Body_Movin.flac,root=/mnt/media/music.withoutart/music], JaudioTaggerStorageNode[full id=file:/mnt/media/music.withoutart/music/Beastie_Boys/Hello_Nasty/14-Song_For_Junior.flac,root=/mnt/media/music.withoutart/music], JaudioTaggerStorageNode[full id=file:/mnt/media/music.withoutart/music/Beastie_Boys/Hello_Nasty/13-Cant,_Wont,_Dont_Stop.flac,root=/mnt/media/music.withoutart/music]] (BoundedBufferStorageNotificationBus.java:150)
java.lang.IllegalStateException: RecordManager has been closed
    at jdbm.recman.CacheRecordManager.checkIfClosed(CacheRecordManager.java:445)
    at jdbm.recman.CacheRecordManager.fetch(CacheRecordManager.java:308)
    at jdbm.btree.BTree._fetch(BTree.java:865)
    at jdbm.btree.BTree.getRoot(BTree.java:645)
    at jdbm.btree.BTree.find(BTree.java:435)
    at com.elsten.bliss.platform.tagindex.JdbmTagIndex.add(JdbmTagIndex.java:156)
    at com.elsten.bliss.platform.tagindex.model.TabledTagIndex.storeQuietly(TabledTagIndex.java:174)
    at com.elsten.bliss.platform.tagindex.model.TabledTagIndex.store(TabledTagIndex.java:160)
    at com.elsten.bliss.music.tagged.mapper.TagStoreStorageListener.store(TagStoreStorageListener.java:36)
    at com.elsten.bliss.music.tagged.mapper.TagStoreStorageListener.nodeUpdated(TagStoreStorageListener.java:49)
    at com.elsten.bliss.platform.storage.BoundedBufferStorageNotificationBus$StorageNotificationUpdate.sendUpdates(BoundedBufferStorageNotificationBus.java:180)
    at com.elsten.bliss.platform.storage.BoundedBufferStorageNotificationBus$StorageNotification.run(BoundedBufferStorageNotificationBus.java:146)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    at java.lang.Thread.run(Thread.java:679)
2012-08-30 11:40:50,499 (thread pool-19-thread-1) DEBUG (4) com.elsten.bliss.web.debug (OnlineUpdater.java:83)
2012-08-30 11:40:50,499 (thread pool-19-thread-1) DEBUG (256) com.elsten.bliss.policy.tag.tagtype (OnlineUpdater.java:83)
2012-08-30 11:40:50,500 (thread pool-19-thread-1) DEBUG (4) com.elsten.bliss.policy.tag.tagtype (OnlineUpdater.java:83)
2012-08-30 11:40:50,500 (thread pool-19-thread-1) DEBUG (256) com.elsten.bliss.policy.tag.auto (OnlineUpdater.java:83)
2012-08-30 11:40:50,500 (thread pool-19-thread-1) DEBUG (4) com.elsten.bliss.policy.tag.auto (OnlineUpdater.java:83)
2012-08-30 11:40:50,500 (thread pool-19-thread-1) DEBUG (256) com.elsten.bliss.ui (OnlineUpdater.java:83)
2012-08-30 11:40:51,661 (thread pool-19-thread-1) DEBUG (4) com.elsten.bliss.ui (OnlineUpdater.java:83)
2012-08-30 11:40:51,662 (thread pool-19-thread-1) DEBUG (256) com.elsten.bliss.music.info.dto (OnlineUpdater.java:83)
2012-08-30 11:40:51,662 (thread pool-19-thread-1) DEBUG (4) com.elsten.bliss.music.info.dto (OnlineUpdater.java:83)
2012-08-30 11:40:51,662 (thread pool-19-thread-1) DEBUG (256) com.elsten.bliss.policy.parsed (OnlineUpdater.java:83)
2012-08-30 11:40:51,662 (thread pool-19-thread-1) DEBUG (4) com.elsten.bliss.policy.parsed (OnlineUpdater.java:83)
2012-08-30 11:40:51,663 (thread pool-19-thread-1) DEBUG (256) com.elsten.bliss.bundle (OnlineUpdater.java:83)
2012-08-30 11:40:51,663 (thread pool-19-thread-1) DEBUG (4) com.elsten.bliss.bundle (OnlineUpdater.java:83)
2012-08-30 11:40:51,663 (thread pool-19-thread-1) DEBUG (256) com.elsten.bliss.model (OnlineUpdater.java:83)
2012-08-30 11:40:51,663 (thread pool-19-thread-1) DEBUG (4) com.elsten.bliss.model (OnlineUpdater.java:83)
2012-08-30 11:40:51,664 (thread pool-19-thread-1) DEBUG (256) com.elsten.musicbrainz (OnlineUpdater.java:83)
2012-08-30 11:40:51,664 (thread pool-19-thread-1) DEBUG (4) com.elsten.musicbrainz (OnlineUpdater.java:83)
2012-08-30 11:40:51,762 (thread pool-19-thread-1) DEBUG (64) com.elsten.bliss.model (OnlineUpdater.java:83)
2012-08-30 11:40:51,762 (thread pool-19-thread-1) DEBUG (8) com.elsten.bliss.model (OnlineUpdater.java:83)
2012-08-30 11:40:51,793 (thread pool-19-thread-1) DEBUG (64) com.elsten.bliss.logging (OnlineUpdater.java:83)
2012-08-30 11:40:51,793 (thread pool-19-thread-1) DEBUG (8) com.elsten.bliss.logging (OnlineUpdater.java:83)
2012-08-30 11:40:51,829 (thread pool-19-thread-1) DEBUG (64) com.elsten.musicbrainz (OnlineUpdater.java:83)
2012-08-30 11:40:51,829 (thread pool-19-thread-1) DEBUG (8) com.elsten.musicbrainz (OnlineUpdater.java:83)
2012-08-30 11:40:51,859 (thread pool-19-thread-1) DEBUG (64) com.elsten.util (OnlineUpdater.java:83)
2012-08-30 11:40:51,859 (thread pool-19-thread-1) DEBUG (8) com.elsten.util (OnlineUpdater.java:83)
2012-08-30 11:40:52,010 (thread pool-19-thread-1) DEBUG (64) com.elsten.bliss.platform (OnlineUpdater.java:83)
2012-08-30 11:40:52,010 (thread pool-19-thread-1) DEBUG (8) com.elsten.bliss.platform (OnlineUpdater.java:83)
2012-08-30 11:40:52,050 (thread pool-19-thread-1) DEBUG (64) com.elsten.bliss.bundle (OnlineUpdater.java:83)
2012-08-30 11:40:52,050 (thread pool-19-thread-1) DEBUG (8) com.elsten.bliss.bundle (OnlineUpdater.java:83)
2012-08-30 11:40:52,095 (thread pool-19-thread-1) DEBUG (64) com.elsten.bliss.policy.parsed (OnlineUpdater.java:83)
2012-08-30 11:40:52,095 (thread pool-19-thread-1) DEBUG (8) com.elsten.bliss.policy.parsed (OnlineUpdater.java:83)
2012-08-30 11:40:52,378 (thread pool-19-thread-1) DEBUG (64) com.elsten.bliss.policy.tag.auto (OnlineUpdater.java:83)
2012-08-30 11:40:52,378 (thread pool-19-thread-1) DEBUG (8) com.elsten.bliss.policy.tag.auto (OnlineUpdater.java:83)
2012-08-30 11:40:53,495 (thread pool-19-thread-1) DEBUG (64) com.elsten.bliss.ui (OnlineUpdater.java:83)
2012-08-30 11:40:53,495 (thread pool-19-thread-1) DEBUG (8) com.elsten.bliss.ui (OnlineUpdater.java:83)
2012-08-30 11:40:53,503 (thread FelixFrameworkWiring) DEBUG (256) net.contentobjects.jnotify (OnlineUpdater.java:83)
2012-08-30 11:40:53,503 (thread FelixFrameworkWiring) DEBUG (4) net.contentobjects.jnotify (OnlineUpdater.java:83)
2012-08-30 11:40:53,503 (thread FelixFrameworkWiring) DEBUG (256) log4j (OnlineUpdater.java:83)
2012-08-30 11:40:53,503 (thread FelixFrameworkWiring) DEBUG (4) log4j (OnlineUpdater.java:83)
2012-08-30 11:40:53,504 (thread FelixFrameworkWiring) DEBUG (256) com.elsten.bliss.updater (OnlineUpdater.java:83)
2012-08-30 11:40:53,504 (thread FelixFrameworkWiring) DEBUG (4) com.elsten.bliss.updater (OnlineUpdater.java:83)
2012-08-30 11:40:53,504 (thread FelixFrameworkWiring) DEBUG (256) jdbm-trunk-patched (OnlineUpdater.java:83)
2012-08-30 11:40:53,504 (thread FelixFrameworkWiring) DEBUG (4) jdbm-trunk-patched (OnlineUpdater.java:83)
2012-08-30 11:40:53,507 (thread FelixFrameworkWiring) DEBUG (64) net.contentobjects.jnotify (OnlineUpdater.java:83)
2012-08-30 11:40:53,508 (thread FelixFrameworkWiring) DEBUG (64) log4j (OnlineUpdater.java:83)
2012-08-30 11:40:53,510 (thread FelixFrameworkWiring) DEBUG (64) com.elsten.bliss.updater (OnlineUpdater.java:83)
2012-08-30 11:40:53,513 (thread FelixFrameworkWiring) DEBUG (64) com.elsten.bliss.policy.tag.tagtype (OnlineUpdater.java:83)
2012-08-30 11:40:53,515 (thread FelixFrameworkWiring) DEBUG (64) jdbm-trunk-patched (OnlineUpdater.java:83)
2012-08-30 11:40:53,527 (thread FelixFrameworkWiring) DEBUG (32) jdbm-trunk-patched (OnlineUpdater.java:83)
2012-08-30 11:40:53,527 (thread FelixFrameworkWiring) DEBUG (32) com.elsten.bliss.logging (OnlineUpdater.java:83)
2012-08-30 11:40:53,527 (thread FelixFrameworkWiring) DEBUG (32) log4j (OnlineUpdater.java:83)
2012-08-30 11:40:53,527 (thread FelixFrameworkWiring) DEBUG (32) com.elsten.bliss.logging (OnlineUpdater.java:83)
2012-08-30 11:40:53,527 (thread FelixFrameworkWiring) DEBUG (32) net.contentobjects.jnotify (OnlineUpdater.java:83)
2012-08-30 11:40:53,528 (thread FelixFrameworkWiring) DEBUG (128) net.contentobjects.jnotify (OnlineUpdater.java:83)
2012-08-30 11:40:53,528 (thread FelixFrameworkWiring) DEBUG (2) net.contentobjects.jnotify (OnlineUpdater.java:83)
2012-08-30 11:40:53,528 (thread FelixFrameworkWiring) DEBUG (128) log4j (OnlineUpdater.java:83)
2012-08-30 11:40:53,528 (thread FelixFrameworkWiring) DEBUG (2) log4j (OnlineUpdater.java:83)
2012-08-30 11:40:53,538 (thread FelixFrameworkWiring) DEBUG (32) com.elsten.bliss.model (OnlineUpdater.java:83)
2012-08-30 11:40:53,539 (thread FelixFrameworkWiring) DEBUG (32) com.elsten.util (OnlineUpdater.java:83)
2012-08-30 11:40:53,539 (thread FelixFrameworkWiring) DEBUG (32) com.elsten.bliss.updater (OnlineUpdater.java:83)
2012-08-30 11:40:53,539 (thread FelixFrameworkWiring) DEBUG (128) com.elsten.bliss.updater (OnlineUpdater.java:83)
2012-08-30 11:40:53,545 (thread FelixFrameworkWiring) DEBUG (2) com.elsten.bliss.updater (OnlineUpdater.java:83)
2012-08-30 11:40:53,545 (thread FelixFrameworkWiring) DEBUG (128) jdbm-trunk-patched (OnlineUpdater.java:83)
2012-08-30 11:40:53,545 (thread FelixFrameworkWiring) DEBUG (2) jdbm-trunk-patched (OnlineUpdater.java:83)
2012-08-30 11:40:53,545 (thread pool-19-thread-1) DEBUG (128) com.elsten.util (OnlineUpdater.java:83)
2012-08-30 11:40:53,545 (thread pool-19-thread-1) DEBUG (2) com.elsten.util (OnlineUpdater.java:83)
2012-08-30 11:40:53,563 (thread pool-19-thread-1) DEBUG (32) com.elsten.musicbrainz (OnlineUpdater.java:83)
2012-08-30 11:40:53,563 (thread pool-19-thread-1) DEBUG (32) com.elsten.bliss.platform (OnlineUpdater.java:83)
2012-08-30 11:40:53,563 (thread pool-19-thread-1) DEBUG (32) com.elsten.bliss.policy.parsed (OnlineUpdater.java:83)
2012-08-30 11:40:53,563 (thread pool-19-thread-1) DEBUG (32) com.elsten.bliss.policy.tag.tagtype (OnlineUpdater.java:83)
2012-08-30 11:40:53,563 (thread pool-19-thread-1) DEBUG (32) com.elsten.bliss.policy.tag.auto (OnlineUpdater.java:83)
2012-08-30 11:40:53,564 (thread pool-19-thread-1) DEBUG (128) com.elsten.bliss.platform (OnlineUpdater.java:83)
2012-08-30 11:40:53,573 (thread pool-19-thread-1) DEBUG (2) com.elsten.bliss.platform (OnlineUpdater.java:83)
2012-08-30 11:40:53,574 (thread pool-19-thread-1) ERROR Caught a Throwable (CatchThrowableRunnable.java:25)
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
    at java.util.ArrayList.rangeCheck(ArrayList.java:571)
    at java.util.ArrayList.get(ArrayList.java:349)
    at org.apache.felix.framework.BundleImpl.adapt(BundleImpl.java:1046)
    at com.elsten.bliss.updater.FelixObrUtils.isFragment(FelixObrUtils.java:149)
    at com.elsten.bliss.updater.OnlineUpdater$2.doRun(OnlineUpdater.java:124)
    at com.elsten.util.CatchThrowableRunnable.run(CatchThrowableRunnable.java:23)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    at java.lang.Thread.run(Thread.java:679)
2012-08-30 11:42:45,732 (thread FelixShutdown) DEBUG (256) org.apache.felix.framework (OnlineUpdater.java:83)
2012-08-30 11:42:45,733 (thread FelixStartLevel) DEBUG (256) org.json (OnlineUpdater.java:83)
2012-08-30 11:42:45,734 (thread FelixStartLevel) DEBUG (4) org.json (OnlineUpdater.java:83)
2012-08-30 11:42:45,734 (thread FelixStartLevel) DEBUG (256) org.eclipse.jetty.xml (OnlineUpdater.java:83)
2012-08-30 11:42:45,734 (thread FelixStartLevel) DEBUG (4) org.eclipse.jetty.xml (OnlineUpdater.java:83)
2012-08-30 11:42:45,734 (thread FelixStartLevel) DEBUG (256) org.eclipse.jetty.util (OnlineUpdater.java:83)
2012-08-30 11:42:45,734 (thread FelixStartLevel) DEBUG (4) org.eclipse.jetty.util (OnlineUpdater.java:83)
2012-08-30 11:42:45,735 (thread FelixStartLevel) DEBUG (256) org.apache.commons.logging (OnlineUpdater.java:83)
2012-08-30 11:42:45,735 (thread FelixStartLevel) DEBUG (4) org.apache.commons.logging (OnlineUpdater.java:83)
2012-08-30 11:42:45,735 (thread FelixStartLevel) DEBUG (256) org.apache.commons.codec (OnlineUpdater.java:83)
2012-08-30 11:42:45,735 (thread FelixStartLevel) DEBUG (4) org.apache.commons.codec (OnlineUpdater.java:83)
2012-08-30 11:42:45,735 (thread FelixStartLevel) DEBUG (256) org.eclipse.jetty.webapp (OnlineUpdater.java:83)
2012-08-30 11:42:45,736 (thread FelixStartLevel) DEBUG (4) org.eclipse.jetty.webapp (OnlineUpdater.java:83)
2012-08-30 11:42:45,736 (thread FelixStartLevel) DEBUG (256) com.elsten.bliss.updater (OnlineUpdater.java:83)
2012-08-30 11:42:45,736 (thread FelixStartLevel) DEBUG (4) com.elsten.bliss.updater (OnlineUpdater.java:83)
2012-08-30 11:42:45,736 (thread FelixStartLevel) DEBUG (256) org.eclipse.jetty.continuation (OnlineUpdater.java:83)
2012-08-30 11:42:45,736 (thread FelixStartLevel) DEBUG (4) org.eclipse.jetty.continuation (OnlineUpdater.java:83)
2012-08-30 11:42:45,736 (thread FelixStartLevel) DEBUG (256) com.elsten.bliss.platform (OnlineUpdater.java:83)
2012-08-30 11:42:45,740 (thread FelixStartLevel) DEBUG (4) com.elsten.bliss.platform (OnlineUpdater.java:83)
2012-08-30 11:42:45,740 (thread FelixStartLevel) DEBUG (256) com.google.guava (OnlineUpdater.java:83)
2012-08-30 11:42:45,740 (thread FelixStartLevel) DEBUG (4) com.google.guava (OnlineUpdater.java:83)
2012-08-30 11:42:45,740 (thread FelixStartLevel) DEBUG (256) org.apache.commons.io (OnlineUpdater.java:83)
2012-08-30 11:42:45,740 (thread FelixStartLevel) DEBUG (4) org.apache.commons.io (OnlineUpdater.java:83)
2012-08-30 11:42:45,740 (thread FelixStartLevel) DEBUG (256) org.eclipse.jetty.osgi.boot (OnlineUpdater.java:83)
2012-08-30 11:42:45,741 (thread FelixStartLevel) DEBUG (4) org.eclipse.jetty.osgi.boot (OnlineUpdater.java:83)
2012-08-30 11:42:45,741 (thread FelixStartLevel) DEBUG (256) org.apache.commons.collections (OnlineUpdater.java:83)
2012-08-30 11:42:45,741 (thread FelixStartLevel) DEBUG (4) org.apache.commons.collections (OnlineUpdater.java:83)
2012-08-30 11:42:45,741 (thread FelixStartLevel) DEBUG (256) org.eclipse.jetty.security (OnlineUpdater.java:83)
2012-08-30 11:42:45,742 (thread FelixStartLevel) DEBUG (4) org.eclipse.jetty.security (OnlineUpdater.java:83)
2012-08-30 11:42:45,742 (thread FelixStartLevel) DEBUG (256) log4j (OnlineUpdater.java:83)
2012-08-30 11:42:45,742 (thread FelixStartLevel) DEBUG (4) log4j (OnlineUpdater.java:83)
2012-08-30 11:42:45,742 (thread FelixStartLevel) DEBUG (256) org.jaudiotagger (OnlineUpdater.java:83)
2012-08-30 11:42:45,742 (thread FelixStartLevel) DEBUG (4) org.jaudiotagger (OnlineUpdater.java:83)
2012-08-30 11:42:45,742 (thread FelixStartLevel) DEBUG (256) com.sun.jna (OnlineUpdater.java:83)
2012-08-30 11:42:45,743 (thread FelixStartLevel) DEBUG (4) com.sun.jna (OnlineUpdater.java:83)
2012-08-30 11:42:45,743 (thread FelixStartLevel) DEBUG (256) scala-library (OnlineUpdater.java:83)
2012-08-30 11:42:45,743 (thread FelixStartLevel) DEBUG (4) scala-library (OnlineUpdater.java:83)
2012-08-30 11:42:45,743 (thread FelixStartLevel) DEBUG (256) org.eclipse.jetty.deploy (OnlineUpdater.java:83)
2012-08-30 11:42:45,743 (thread FelixStartLevel) DEBUG (4) org.eclipse.jetty.deploy (OnlineUpdater.java:83)
2012-08-30 11:42:45,743 (thread FelixStartLevel) DEBUG (256) jdbm-trunk-patched (OnlineUpdater.java:83)
2012-08-30 11:42:45,743 (thread FelixStartLevel) DEBUG (4) jdbm-trunk-patched (OnlineUpdater.java:83)
2012-08-30 11:42:45,744 (thread FelixStartLevel) DEBUG (256) javax.servlet (OnlineUpdater.java:83)
2012-08-30 11:42:45,744 (thread FelixStartLevel) DEBUG (4) javax.servlet (OnlineUpdater.java:83)
2012-08-30 11:42:45,744 (thread FelixStartLevel) DEBUG (256) com.springsource.javax.media.jai.core (OnlineUpdater.java:83)
2012-08-30 11:42:45,744 (thread FelixStartLevel) DEBUG (4) com.springsource.javax.media.jai.core (OnlineUpdater.java:83)
2012-08-30 11:42:45,744 (thread FelixStartLevel) DEBUG (256) JGoogleAnalytics_0.3 (OnlineUpdater.java:83)
2012-08-30 11:42:45,744 (thread FelixStartLevel) DEBUG (4) JGoogleAnalytics_0.3 (OnlineUpdater.java:83)
2012-08-30 11:42:45,745 (thread FelixStartLevel) DEBUG (256) osgi.cmpn (OnlineUpdater.java:83)
2012-08-30 11:42:45,745 (thread FelixStartLevel) DEBUG (4) osgi.cmpn (OnlineUpdater.java:83)
2012-08-30 11:42:45,745 (thread FelixStartLevel) DEBUG (256) com.springsource.javax.media.jai.codec (OnlineUpdater.java:83)
2012-08-30 11:42:45,745 (thread FelixStartLevel) DEBUG (4) com.springsource.javax.media.jai.codec (OnlineUpdater.java:83)
2012-08-30 11:42:45,745 (thread FelixStartLevel) DEBUG (256) org.apache.commons.httpclient (OnlineUpdater.java:83)
2012-08-30 11:42:45,745 (thread FelixStartLevel) DEBUG (4) org.apache.commons.httpclient (OnlineUpdater.java:83)
2012-08-30 11:42:45,746 (thread FelixStartLevel) DEBUG (256) com.elsten.util (OnlineUpdater.java:83)
2012-08-30 11:42:45,746 (thread FelixStartLevel) DEBUG (4) com.elsten.util (OnlineUpdater.java:83)
2012-08-30 11:42:45,746 (thread FelixStartLevel) DEBUG (256) org.apache.commons.lang (OnlineUpdater.java:83)
2012-08-30 11:42:45,746 (thread FelixStartLevel) DEBUG (4) org.apache.commons.lang (OnlineUpdater.java:83)
2012-08-30 11:42:45,746 (thread FelixStartLevel) DEBUG (256) com.google.gson (OnlineUpdater.java:83)
2012-08-30 11:42:45,746 (thread FelixStartLevel) DEBUG (4) com.google.gson (OnlineUpdater.java:83)
2012-08-30 11:42:45,747 (thread FelixStartLevel) DEBUG (256) org.eclipse.jetty.servlet (OnlineUpdater.java:83)
2012-08-30 11:42:45,747 (thread FelixStartLevel) DEBUG (4) org.eclipse.jetty.servlet (OnlineUpdater.java:83)
2012-08-30 11:42:45,747 (thread FelixStartLevel) DEBUG (256) org.eclipse.jetty.io (OnlineUpdater.java:83)
2012-08-30 11:42:45,747 (thread FelixStartLevel) DEBUG (4) org.eclipse.jetty.io (OnlineUpdater.java:83)
2012-08-30 11:42:45,747 (thread FelixStartLevel) DEBUG (256) org.eclipse.jetty.server (OnlineUpdater.java:83)
2012-08-30 11:42:45,747 (thread FelixStartLevel) DEBUG (4) org.eclipse.jetty.server (OnlineUpdater.java:83)
2012-08-30 11:42:45,748 (thread FelixStartLevel) DEBUG (256) net.contentobjects.jnotify (OnlineUpdater.java:83)
2012-08-30 11:42:45,748 (thread FelixStartLevel) DEBUG (4) net.contentobjects.jnotify (OnlineUpdater.java:83)
2012-08-30 11:42:45,748 (thread FelixStartLevel) DEBUG (256) org.eclipse.jetty.http (OnlineUpdater.java:83)
2012-08-30 11:42:45,748 (thread FelixStartLevel) DEBUG (4) org.eclipse.jetty.http (OnlineUpdater.java:83)
2012-08-30 11:42:45,748 (thread FelixStartLevel) DEBUG (256) org.apache.felix.bundlerepository (OnlineUpdater.java:83)
2012-08-30 11:42:45,749 (thread FelixStartLevel) DEBUG (4) org.apache.felix.bundlerepository (OnlineUpdater.java:83)
2012-08-30 11:42:45,749 (thread FelixStartLevel) DEBUG (256) com.elsten.bliss.bootstrapbundle (OnlineUpdater.java:83)
2012-08-30 11:42:45,749 (thread FelixStartLevel) DEBUG (4) com.elsten.bliss.bootstrapbundle (OnlineUpdater.java:83)

I included some exceptions thrown by threads which were created by bundles being stopped. Previous experience suggests that threading can cause problems in these scenarios.
                
> ArrayIndexOutOfBoundsException when trying to adapt() a stopped bundle
> ----------------------------------------------------------------------
>
>                 Key: FELIX-3652
>                 URL: https://issues.apache.org/jira/browse/FELIX-3652
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: framework-4.0.2
>            Reporter: Dan Gravell
>            Priority: Minor
>
> I have the following code block:
> final Iterable<Bundle> startedBundles = [...]
> for (Bundle bundle : startedBundles) {
> 	try {
> 		if(!FelixObrUtils.isFragment(bundle)) sysBundle.getBundleContext().getBundle(bundle.getBundleId()).stop();
> 	} catch (BundleException e) {
> 		LOG.error("Failed to stop " + bundle.getSymbolicName(), e);
> 	}
> }
> resolver.deploy(0);
> blockingRefreshBundles(null, sysBundle.getBundleContext());
> for (Bundle bundle : startedBundles) {
> 	try {
> 		if(!FelixObrUtils.isFragment(bundle)) sysBundle.getBundleContext().getBundle(bundle.getBundleId()).start();
> 	} catch (BundleException e) {
> 		LOG.error("Failed to restart " + bundle.getSymbolicName(), e);
> 	}
> }
> blockingRefreshBundles() blocks until frameworkWiring.refreshBundles has completed using a CountDownLatch and a FrameworkListener.
> Pertinently, FelixObrUtils.isFragment looks like:
> public static boolean isFragment(Bundle bundle) {
> 	return (bundle.adapt(BundleRevision.class).getTypes() & BundleRevision.TYPE_FRAGMENT) != 0;
> }
> Upon the second call to FelixObrUtils.isFragment I get:
> java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
>     	at java.util.ArrayList.rangeCheck(ArrayList.java:571)
>     	at java.util.ArrayList.get(ArrayList.java:349)
>     	at org.apache.felix.framework.BundleImpl.adapt(BundleImpl.java:1046)
>     	at com.elsten.bliss.updater.FelixObrUtils.isFragment(FelixObrUtils.java:149)
>     	at com.elsten.bliss.updater.OnlineUpdater$2.doRun(OnlineUpdater.java:124)
>     	at com.elsten.util.CatchThrowableRunnable.run(CatchThrowableRunnable.java:23)
>     	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
>     	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
>     	at java.lang.Thread.run(Thread.java:679)
> Presumably this is because the bundle has been stopped, possibly updated and refreshed in the meantime.
> Maybe I should not be doing this on a stopped bundle, and I should be getting a fresh view of the bundle, but shouldn't this be handled differently? AIOOBE is not documented as an exception that may be thrown in the OSGi API. Knowing how to handle this requires knowledge of BundleImpl's implementation (m_revisions etc).

--
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

[jira] [Commented] (FELIX-3652) ArrayIndexOutOfBoundsException when trying to adapt() a stopped bundle

Posted by "Dan Gravell (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-3652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13447339#comment-13447339 ] 

Dan Gravell commented on FELIX-3652:
------------------------------------

Thanks. 

My view of this is that I'm doing something incorrect by re-using the old Bundle objects. Therefore I've implemented my own change by storing the symbolic names of bundles (before anything happens - I note this also requires use of adapt()) and then looking them up again when I want to re-start the bundles. 

I assumed this was worth reporting as the behaviour seemed to diverge from the Javadoc.
                
> ArrayIndexOutOfBoundsException when trying to adapt() a stopped bundle
> ----------------------------------------------------------------------
>
>                 Key: FELIX-3652
>                 URL: https://issues.apache.org/jira/browse/FELIX-3652
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: framework-4.0.2
>            Reporter: Dan Gravell
>            Priority: Minor
>
> I have the following code block:
> final Iterable<Bundle> startedBundles = [...]
> for (Bundle bundle : startedBundles) {
> 	try {
> 		if(!FelixObrUtils.isFragment(bundle)) sysBundle.getBundleContext().getBundle(bundle.getBundleId()).stop();
> 	} catch (BundleException e) {
> 		LOG.error("Failed to stop " + bundle.getSymbolicName(), e);
> 	}
> }
> resolver.deploy(0);
> blockingRefreshBundles(null, sysBundle.getBundleContext());
> for (Bundle bundle : startedBundles) {
> 	try {
> 		if(!FelixObrUtils.isFragment(bundle)) sysBundle.getBundleContext().getBundle(bundle.getBundleId()).start();
> 	} catch (BundleException e) {
> 		LOG.error("Failed to restart " + bundle.getSymbolicName(), e);
> 	}
> }
> blockingRefreshBundles() blocks until frameworkWiring.refreshBundles has completed using a CountDownLatch and a FrameworkListener.
> Pertinently, FelixObrUtils.isFragment looks like:
> public static boolean isFragment(Bundle bundle) {
> 	return (bundle.adapt(BundleRevision.class).getTypes() & BundleRevision.TYPE_FRAGMENT) != 0;
> }
> Upon the second call to FelixObrUtils.isFragment I get:
> java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
>     	at java.util.ArrayList.rangeCheck(ArrayList.java:571)
>     	at java.util.ArrayList.get(ArrayList.java:349)
>     	at org.apache.felix.framework.BundleImpl.adapt(BundleImpl.java:1046)
>     	at com.elsten.bliss.updater.FelixObrUtils.isFragment(FelixObrUtils.java:149)
>     	at com.elsten.bliss.updater.OnlineUpdater$2.doRun(OnlineUpdater.java:124)
>     	at com.elsten.util.CatchThrowableRunnable.run(CatchThrowableRunnable.java:23)
>     	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
>     	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
>     	at java.lang.Thread.run(Thread.java:679)
> Presumably this is because the bundle has been stopped, possibly updated and refreshed in the meantime.
> Maybe I should not be doing this on a stopped bundle, and I should be getting a fresh view of the bundle, but shouldn't this be handled differently? AIOOBE is not documented as an exception that may be thrown in the OSGi API. Knowing how to handle this requires knowledge of BundleImpl's implementation (m_revisions etc).

--
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

[jira] [Comment Edited] (FELIX-3652) ArrayIndexOutOfBoundsException when trying to adapt() a stopped bundle

Posted by "Dan Gravell (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-3652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13447308#comment-13447308 ] 

Dan Gravell edited comment on FELIX-3652 at 9/4/12 2:12 AM:
------------------------------------------------------------

Unfortunately I cannot tell because I don't know which bundle is being inspected at this point. I don't see any uninstalled events though.

Here's the full list of all events. The bundle event lines are all in the form DEBUG (Bundle Event id) bundle symbolic name

2012-08-30 11:40:49,380 (thread pool-19-thread-1) DEBUG (256) com.elsten.util (OnlineUpdater.java:83)
2012-08-30 11:40:49,380 (thread pool-19-thread-1) DEBUG (4) com.elsten.util (OnlineUpdater.java:83)
2012-08-30 11:40:49,381 (thread pool-19-thread-1) DEBUG (256) com.elsten.bliss.platform (OnlineUpdater.java:83)
2012-08-30 11:40:49,383 (thread BlockingLowPriorityBufferStorageNotificationBus-notification worker) WARN  Interrupted while sleeping between SN batch notification (BoundedBufferStorageNotificationBus.java:178)
2012-08-30 11:40:49,383 (thread UntaggedSuggestionStorageNotificationListener) INFO  Interrupted while waiting for untagged files (UntaggedSuggestionStorageNotificationListener.java:49)
2012-08-30 11:40:49,422 (thread pool-19-thread-1) DEBUG (4) com.elsten.bliss.platform (OnlineUpdater.java:83)
2012-08-30 11:40:49,423 (thread pool-19-thread-1) DEBUG (256) com.elsten.bliss.web.debug (OnlineUpdater.java:83)
2012-08-30 11:40:49,425 (thread BlockingLowPriorityBufferStorageNotificationBus-notification worker) ERROR Exception thrown when notifying storage node listeners of changes: Update [JaudioTaggerStorageNode[full id=file:/mnt/media/music.withoutart/music/Beastie_Boys/Hello_Nasty/21-Dr._Lee,_PhD.flac,root=/mnt/media/music.withoutart/music], JaudioTaggerStorageNode[full id=file:/mnt/media/music.withoutart/music/Beastie_Boys/Hello_Nasty/20-Dedication.flac,root=/mnt/media/music.withoutart/music], JaudioTaggerStorageNode[full id=file:/mnt/media/music.withoutart/music/Beastie_Boys/Hello_Nasty/16-The_Negotiation_Limerick_File.flac,root=/mnt/media/music.withoutart/music], JaudioTaggerStorageNode[full id=file:/mnt/media/music.withoutart/music/Beastie_Boys/Hello_Nasty/02-Move.flac,root=/mnt/media/music.withoutart/music], JaudioTaggerStorageNode[full id=file:/mnt/media/music.withoutart/music/Beastie_Boys/Hello_Nasty/18-Picture_This.flac,root=/mnt/media/music.withoutart/music], JaudioTaggerStorageNode[full id=file:/mnt/media/music.withoutart/music/Beastie_Boys/Hello_Nasty/05-Just_A_Test.flac,root=/mnt/media/music.withoutart/music], JaudioTaggerStorageNode[full id=file:/mnt/media/music.withoutart/music/Beastie_Boys/Hello_Nasty/03-Remote_Control.flac,root=/mnt/media/music.withoutart/music], JaudioTaggerStorageNode[full id=file:/mnt/media/music.withoutart/music/Beastie_Boys/Hello_Nasty/09-Putting_Shame_In_Your_Game.flac,root=/mnt/media/music.withoutart/music], JaudioTaggerStorageNode[full id=file:/mnt/media/music.withoutart/music/Beastie_Boys/Hello_Nasty/11-And_Me.flac,root=/mnt/media/music.withoutart/music], JaudioTaggerStorageNode[full id=file:/mnt/media/music.withoutart/music/Beastie_Boys/Hello_Nasty/08-Sneakin_Out_The_Hospital.flac,root=/mnt/media/music.withoutart/music], JaudioTaggerStorageNode[full id=file:/mnt/media/music.withoutart/music/Beastie_Boys/Hello_Nasty/12-Three_MCs_And_One_DJ.flac,root=/mnt/media/music.withoutart/music], JaudioTaggerStorageNode[full id=file:/mnt/media/music.withoutart/music/Beastie_Boys/Hello_Nasty/10-Flowin_Prose.flac,root=/mnt/media/music.withoutart/music], JaudioTaggerStorageNode[full id=file:/mnt/media/music.withoutart/music/Beastie_Boys/Hello_Nasty/19-Unite.flac,root=/mnt/media/music.withoutart/music], JaudioTaggerStorageNode[full id=file:/mnt/media/music.withoutart/music/Beastie_Boys/Hello_Nasty/07-Intergalactic.flac,root=/mnt/media/music.withoutart/music], JaudioTaggerStorageNode[full id=file:/mnt/media/music.withoutart/music/Beastie_Boys/Hello_Nasty/01-Super_Disco_Breakin.flac,root=/mnt/media/music.withoutart/music], JaudioTaggerStorageNode[full id=file:/mnt/media/music.withoutart/music/Beastie_Boys/Hello_Nasty/15-I_Dont_Know.flac,root=/mnt/media/music.withoutart/music], JaudioTaggerStorageNode[full id=file:/mnt/media/music.withoutart/music/Beastie_Boys/Hello_Nasty/22-Instant_Death.flac,root=/mnt/media/music.withoutart/music], JaudioTaggerStorageNode[full id=file:/mnt/media/music.withoutart/music/Beastie_Boys/Hello_Nasty/06-Body_Movin.flac,root=/mnt/media/music.withoutart/music], JaudioTaggerStorageNode[full id=file:/mnt/media/music.withoutart/music/Beastie_Boys/Hello_Nasty/14-Song_For_Junior.flac,root=/mnt/media/music.withoutart/music], JaudioTaggerStorageNode[full id=file:/mnt/media/music.withoutart/music/Beastie_Boys/Hello_Nasty/13-Cant,_Wont,_Dont_Stop.flac,root=/mnt/media/music.withoutart/music]] (BoundedBufferStorageNotificationBus.java:150)
java.lang.IllegalStateException: RecordManager has been closed
    at jdbm.recman.CacheRecordManager.checkIfClosed(CacheRecordManager.java:445)
    at jdbm.recman.CacheRecordManager.fetch(CacheRecordManager.java:308)
    at jdbm.btree.BTree._fetch(BTree.java:865)
    at jdbm.btree.BTree.getRoot(BTree.java:645)
    at jdbm.btree.BTree.find(BTree.java:435)
    at com.elsten.bliss.platform.tagindex.JdbmTagIndex.add(JdbmTagIndex.java:156)
    at com.elsten.bliss.platform.tagindex.model.TabledTagIndex.storeQuietly(TabledTagIndex.java:174)
    at com.elsten.bliss.platform.tagindex.model.TabledTagIndex.store(TabledTagIndex.java:160)
    at com.elsten.bliss.music.tagged.mapper.TagStoreStorageListener.store(TagStoreStorageListener.java:36)
    at com.elsten.bliss.music.tagged.mapper.TagStoreStorageListener.nodeUpdated(TagStoreStorageListener.java:49)
    at com.elsten.bliss.platform.storage.BoundedBufferStorageNotificationBus$StorageNotificationUpdate.sendUpdates(BoundedBufferStorageNotificationBus.java:180)
    at com.elsten.bliss.platform.storage.BoundedBufferStorageNotificationBus$StorageNotification.run(BoundedBufferStorageNotificationBus.java:146)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    at java.lang.Thread.run(Thread.java:679)
2012-08-30 11:40:50,499 (thread pool-19-thread-1) DEBUG (4) com.elsten.bliss.web.debug (OnlineUpdater.java:83)
2012-08-30 11:40:50,499 (thread pool-19-thread-1) DEBUG (256) com.elsten.bliss.policy.tag.tagtype (OnlineUpdater.java:83)
2012-08-30 11:40:50,500 (thread pool-19-thread-1) DEBUG (4) com.elsten.bliss.policy.tag.tagtype (OnlineUpdater.java:83)
2012-08-30 11:40:50,500 (thread pool-19-thread-1) DEBUG (256) com.elsten.bliss.policy.tag.auto (OnlineUpdater.java:83)
2012-08-30 11:40:50,500 (thread pool-19-thread-1) DEBUG (4) com.elsten.bliss.policy.tag.auto (OnlineUpdater.java:83)
2012-08-30 11:40:50,500 (thread pool-19-thread-1) DEBUG (256) com.elsten.bliss.ui (OnlineUpdater.java:83)
2012-08-30 11:40:51,661 (thread pool-19-thread-1) DEBUG (4) com.elsten.bliss.ui (OnlineUpdater.java:83)
2012-08-30 11:40:51,662 (thread pool-19-thread-1) DEBUG (256) com.elsten.bliss.music.info.dto (OnlineUpdater.java:83)
2012-08-30 11:40:51,662 (thread pool-19-thread-1) DEBUG (4) com.elsten.bliss.music.info.dto (OnlineUpdater.java:83)
2012-08-30 11:40:51,662 (thread pool-19-thread-1) DEBUG (256) com.elsten.bliss.policy.parsed (OnlineUpdater.java:83)
2012-08-30 11:40:51,662 (thread pool-19-thread-1) DEBUG (4) com.elsten.bliss.policy.parsed (OnlineUpdater.java:83)
2012-08-30 11:40:51,663 (thread pool-19-thread-1) DEBUG (256) com.elsten.bliss.bundle (OnlineUpdater.java:83)
2012-08-30 11:40:51,663 (thread pool-19-thread-1) DEBUG (4) com.elsten.bliss.bundle (OnlineUpdater.java:83)
2012-08-30 11:40:51,663 (thread pool-19-thread-1) DEBUG (256) com.elsten.bliss.model (OnlineUpdater.java:83)
2012-08-30 11:40:51,663 (thread pool-19-thread-1) DEBUG (4) com.elsten.bliss.model (OnlineUpdater.java:83)
2012-08-30 11:40:51,664 (thread pool-19-thread-1) DEBUG (256) com.elsten.musicbrainz (OnlineUpdater.java:83)
2012-08-30 11:40:51,664 (thread pool-19-thread-1) DEBUG (4) com.elsten.musicbrainz (OnlineUpdater.java:83)
2012-08-30 11:40:51,762 (thread pool-19-thread-1) DEBUG (64) com.elsten.bliss.model (OnlineUpdater.java:83)
2012-08-30 11:40:51,762 (thread pool-19-thread-1) DEBUG (8) com.elsten.bliss.model (OnlineUpdater.java:83)
2012-08-30 11:40:51,793 (thread pool-19-thread-1) DEBUG (64) com.elsten.bliss.logging (OnlineUpdater.java:83)
2012-08-30 11:40:51,793 (thread pool-19-thread-1) DEBUG (8) com.elsten.bliss.logging (OnlineUpdater.java:83)
2012-08-30 11:40:51,829 (thread pool-19-thread-1) DEBUG (64) com.elsten.musicbrainz (OnlineUpdater.java:83)
2012-08-30 11:40:51,829 (thread pool-19-thread-1) DEBUG (8) com.elsten.musicbrainz (OnlineUpdater.java:83)
2012-08-30 11:40:51,859 (thread pool-19-thread-1) DEBUG (64) com.elsten.util (OnlineUpdater.java:83)
2012-08-30 11:40:51,859 (thread pool-19-thread-1) DEBUG (8) com.elsten.util (OnlineUpdater.java:83)
2012-08-30 11:40:52,010 (thread pool-19-thread-1) DEBUG (64) com.elsten.bliss.platform (OnlineUpdater.java:83)
2012-08-30 11:40:52,010 (thread pool-19-thread-1) DEBUG (8) com.elsten.bliss.platform (OnlineUpdater.java:83)
2012-08-30 11:40:52,050 (thread pool-19-thread-1) DEBUG (64) com.elsten.bliss.bundle (OnlineUpdater.java:83)
2012-08-30 11:40:52,050 (thread pool-19-thread-1) DEBUG (8) com.elsten.bliss.bundle (OnlineUpdater.java:83)
2012-08-30 11:40:52,095 (thread pool-19-thread-1) DEBUG (64) com.elsten.bliss.policy.parsed (OnlineUpdater.java:83)
2012-08-30 11:40:52,095 (thread pool-19-thread-1) DEBUG (8) com.elsten.bliss.policy.parsed (OnlineUpdater.java:83)
2012-08-30 11:40:52,378 (thread pool-19-thread-1) DEBUG (64) com.elsten.bliss.policy.tag.auto (OnlineUpdater.java:83)
2012-08-30 11:40:52,378 (thread pool-19-thread-1) DEBUG (8) com.elsten.bliss.policy.tag.auto (OnlineUpdater.java:83)
2012-08-30 11:40:53,495 (thread pool-19-thread-1) DEBUG (64) com.elsten.bliss.ui (OnlineUpdater.java:83)
2012-08-30 11:40:53,495 (thread pool-19-thread-1) DEBUG (8) com.elsten.bliss.ui (OnlineUpdater.java:83)
2012-08-30 11:40:53,503 (thread FelixFrameworkWiring) DEBUG (256) net.contentobjects.jnotify (OnlineUpdater.java:83)
2012-08-30 11:40:53,503 (thread FelixFrameworkWiring) DEBUG (4) net.contentobjects.jnotify (OnlineUpdater.java:83)
2012-08-30 11:40:53,503 (thread FelixFrameworkWiring) DEBUG (256) log4j (OnlineUpdater.java:83)
2012-08-30 11:40:53,503 (thread FelixFrameworkWiring) DEBUG (4) log4j (OnlineUpdater.java:83)
2012-08-30 11:40:53,504 (thread FelixFrameworkWiring) DEBUG (256) com.elsten.bliss.updater (OnlineUpdater.java:83)
2012-08-30 11:40:53,504 (thread FelixFrameworkWiring) DEBUG (4) com.elsten.bliss.updater (OnlineUpdater.java:83)
2012-08-30 11:40:53,504 (thread FelixFrameworkWiring) DEBUG (256) jdbm-trunk-patched (OnlineUpdater.java:83)
2012-08-30 11:40:53,504 (thread FelixFrameworkWiring) DEBUG (4) jdbm-trunk-patched (OnlineUpdater.java:83)
2012-08-30 11:40:53,507 (thread FelixFrameworkWiring) DEBUG (64) net.contentobjects.jnotify (OnlineUpdater.java:83)
2012-08-30 11:40:53,508 (thread FelixFrameworkWiring) DEBUG (64) log4j (OnlineUpdater.java:83)
2012-08-30 11:40:53,510 (thread FelixFrameworkWiring) DEBUG (64) com.elsten.bliss.updater (OnlineUpdater.java:83)
2012-08-30 11:40:53,513 (thread FelixFrameworkWiring) DEBUG (64) com.elsten.bliss.policy.tag.tagtype (OnlineUpdater.java:83)
2012-08-30 11:40:53,515 (thread FelixFrameworkWiring) DEBUG (64) jdbm-trunk-patched (OnlineUpdater.java:83)
2012-08-30 11:40:53,527 (thread FelixFrameworkWiring) DEBUG (32) jdbm-trunk-patched (OnlineUpdater.java:83)
2012-08-30 11:40:53,527 (thread FelixFrameworkWiring) DEBUG (32) com.elsten.bliss.logging (OnlineUpdater.java:83)
2012-08-30 11:40:53,527 (thread FelixFrameworkWiring) DEBUG (32) log4j (OnlineUpdater.java:83)
2012-08-30 11:40:53,527 (thread FelixFrameworkWiring) DEBUG (32) com.elsten.bliss.logging (OnlineUpdater.java:83)
2012-08-30 11:40:53,527 (thread FelixFrameworkWiring) DEBUG (32) net.contentobjects.jnotify (OnlineUpdater.java:83)
2012-08-30 11:40:53,528 (thread FelixFrameworkWiring) DEBUG (128) net.contentobjects.jnotify (OnlineUpdater.java:83)
2012-08-30 11:40:53,528 (thread FelixFrameworkWiring) DEBUG (2) net.contentobjects.jnotify (OnlineUpdater.java:83)
2012-08-30 11:40:53,528 (thread FelixFrameworkWiring) DEBUG (128) log4j (OnlineUpdater.java:83)
2012-08-30 11:40:53,528 (thread FelixFrameworkWiring) DEBUG (2) log4j (OnlineUpdater.java:83)
2012-08-30 11:40:53,538 (thread FelixFrameworkWiring) DEBUG (32) com.elsten.bliss.model (OnlineUpdater.java:83)
2012-08-30 11:40:53,539 (thread FelixFrameworkWiring) DEBUG (32) com.elsten.util (OnlineUpdater.java:83)
2012-08-30 11:40:53,539 (thread FelixFrameworkWiring) DEBUG (32) com.elsten.bliss.updater (OnlineUpdater.java:83)
2012-08-30 11:40:53,539 (thread FelixFrameworkWiring) DEBUG (128) com.elsten.bliss.updater (OnlineUpdater.java:83)
2012-08-30 11:40:53,545 (thread FelixFrameworkWiring) DEBUG (2) com.elsten.bliss.updater (OnlineUpdater.java:83)
2012-08-30 11:40:53,545 (thread FelixFrameworkWiring) DEBUG (128) jdbm-trunk-patched (OnlineUpdater.java:83)
2012-08-30 11:40:53,545 (thread FelixFrameworkWiring) DEBUG (2) jdbm-trunk-patched (OnlineUpdater.java:83)
2012-08-30 11:40:53,545 (thread pool-19-thread-1) DEBUG (128) com.elsten.util (OnlineUpdater.java:83)
2012-08-30 11:40:53,545 (thread pool-19-thread-1) DEBUG (2) com.elsten.util (OnlineUpdater.java:83)
2012-08-30 11:40:53,563 (thread pool-19-thread-1) DEBUG (32) com.elsten.musicbrainz (OnlineUpdater.java:83)
2012-08-30 11:40:53,563 (thread pool-19-thread-1) DEBUG (32) com.elsten.bliss.platform (OnlineUpdater.java:83)
2012-08-30 11:40:53,563 (thread pool-19-thread-1) DEBUG (32) com.elsten.bliss.policy.parsed (OnlineUpdater.java:83)
2012-08-30 11:40:53,563 (thread pool-19-thread-1) DEBUG (32) com.elsten.bliss.policy.tag.tagtype (OnlineUpdater.java:83)
2012-08-30 11:40:53,563 (thread pool-19-thread-1) DEBUG (32) com.elsten.bliss.policy.tag.auto (OnlineUpdater.java:83)
2012-08-30 11:40:53,564 (thread pool-19-thread-1) DEBUG (128) com.elsten.bliss.platform (OnlineUpdater.java:83)
2012-08-30 11:40:53,573 (thread pool-19-thread-1) DEBUG (2) com.elsten.bliss.platform (OnlineUpdater.java:83)
2012-08-30 11:40:53,574 (thread pool-19-thread-1) ERROR Caught a Throwable (CatchThrowableRunnable.java:25)
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
    at java.util.ArrayList.rangeCheck(ArrayList.java:571)
    at java.util.ArrayList.get(ArrayList.java:349)
    at org.apache.felix.framework.BundleImpl.adapt(BundleImpl.java:1046)
    at com.elsten.bliss.updater.FelixObrUtils.isFragment(FelixObrUtils.java:149)
    at com.elsten.bliss.updater.OnlineUpdater$2.doRun(OnlineUpdater.java:124)
    at com.elsten.util.CatchThrowableRunnable.run(CatchThrowableRunnable.java:23)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    at java.lang.Thread.run(Thread.java:679)
2012-08-30 11:42:45,732 (thread FelixShutdown) DEBUG (256) org.apache.felix.framework (OnlineUpdater.java:83)
2012-08-30 11:42:45,733 (thread FelixStartLevel) DEBUG (256) org.json (OnlineUpdater.java:83)
2012-08-30 11:42:45,734 (thread FelixStartLevel) DEBUG (4) org.json (OnlineUpdater.java:83)
2012-08-30 11:42:45,734 (thread FelixStartLevel) DEBUG (256) org.eclipse.jetty.xml (OnlineUpdater.java:83)
2012-08-30 11:42:45,734 (thread FelixStartLevel) DEBUG (4) org.eclipse.jetty.xml (OnlineUpdater.java:83)
2012-08-30 11:42:45,734 (thread FelixStartLevel) DEBUG (256) org.eclipse.jetty.util (OnlineUpdater.java:83)
2012-08-30 11:42:45,734 (thread FelixStartLevel) DEBUG (4) org.eclipse.jetty.util (OnlineUpdater.java:83)
2012-08-30 11:42:45,735 (thread FelixStartLevel) DEBUG (256) org.apache.commons.logging (OnlineUpdater.java:83)
2012-08-30 11:42:45,735 (thread FelixStartLevel) DEBUG (4) org.apache.commons.logging (OnlineUpdater.java:83)
2012-08-30 11:42:45,735 (thread FelixStartLevel) DEBUG (256) org.apache.commons.codec (OnlineUpdater.java:83)
2012-08-30 11:42:45,735 (thread FelixStartLevel) DEBUG (4) org.apache.commons.codec (OnlineUpdater.java:83)
2012-08-30 11:42:45,735 (thread FelixStartLevel) DEBUG (256) org.eclipse.jetty.webapp (OnlineUpdater.java:83)
2012-08-30 11:42:45,736 (thread FelixStartLevel) DEBUG (4) org.eclipse.jetty.webapp (OnlineUpdater.java:83)
2012-08-30 11:42:45,736 (thread FelixStartLevel) DEBUG (256) com.elsten.bliss.updater (OnlineUpdater.java:83)
2012-08-30 11:42:45,736 (thread FelixStartLevel) DEBUG (4) com.elsten.bliss.updater (OnlineUpdater.java:83)
2012-08-30 11:42:45,736 (thread FelixStartLevel) DEBUG (256) org.eclipse.jetty.continuation (OnlineUpdater.java:83)
2012-08-30 11:42:45,736 (thread FelixStartLevel) DEBUG (4) org.eclipse.jetty.continuation (OnlineUpdater.java:83)
2012-08-30 11:42:45,736 (thread FelixStartLevel) DEBUG (256) com.elsten.bliss.platform (OnlineUpdater.java:83)
2012-08-30 11:42:45,740 (thread FelixStartLevel) DEBUG (4) com.elsten.bliss.platform (OnlineUpdater.java:83)
2012-08-30 11:42:45,740 (thread FelixStartLevel) DEBUG (256) com.google.guava (OnlineUpdater.java:83)
2012-08-30 11:42:45,740 (thread FelixStartLevel) DEBUG (4) com.google.guava (OnlineUpdater.java:83)
2012-08-30 11:42:45,740 (thread FelixStartLevel) DEBUG (256) org.apache.commons.io (OnlineUpdater.java:83)
2012-08-30 11:42:45,740 (thread FelixStartLevel) DEBUG (4) org.apache.commons.io (OnlineUpdater.java:83)
2012-08-30 11:42:45,740 (thread FelixStartLevel) DEBUG (256) org.eclipse.jetty.osgi.boot (OnlineUpdater.java:83)
2012-08-30 11:42:45,741 (thread FelixStartLevel) DEBUG (4) org.eclipse.jetty.osgi.boot (OnlineUpdater.java:83)
2012-08-30 11:42:45,741 (thread FelixStartLevel) DEBUG (256) org.apache.commons.collections (OnlineUpdater.java:83)
2012-08-30 11:42:45,741 (thread FelixStartLevel) DEBUG (4) org.apache.commons.collections (OnlineUpdater.java:83)
2012-08-30 11:42:45,741 (thread FelixStartLevel) DEBUG (256) org.eclipse.jetty.security (OnlineUpdater.java:83)
2012-08-30 11:42:45,742 (thread FelixStartLevel) DEBUG (4) org.eclipse.jetty.security (OnlineUpdater.java:83)
2012-08-30 11:42:45,742 (thread FelixStartLevel) DEBUG (256) log4j (OnlineUpdater.java:83)
2012-08-30 11:42:45,742 (thread FelixStartLevel) DEBUG (4) log4j (OnlineUpdater.java:83)
2012-08-30 11:42:45,742 (thread FelixStartLevel) DEBUG (256) org.jaudiotagger (OnlineUpdater.java:83)
2012-08-30 11:42:45,742 (thread FelixStartLevel) DEBUG (4) org.jaudiotagger (OnlineUpdater.java:83)
2012-08-30 11:42:45,742 (thread FelixStartLevel) DEBUG (256) com.sun.jna (OnlineUpdater.java:83)
2012-08-30 11:42:45,743 (thread FelixStartLevel) DEBUG (4) com.sun.jna (OnlineUpdater.java:83)
2012-08-30 11:42:45,743 (thread FelixStartLevel) DEBUG (256) scala-library (OnlineUpdater.java:83)
2012-08-30 11:42:45,743 (thread FelixStartLevel) DEBUG (4) scala-library (OnlineUpdater.java:83)
2012-08-30 11:42:45,743 (thread FelixStartLevel) DEBUG (256) org.eclipse.jetty.deploy (OnlineUpdater.java:83)
2012-08-30 11:42:45,743 (thread FelixStartLevel) DEBUG (4) org.eclipse.jetty.deploy (OnlineUpdater.java:83)
2012-08-30 11:42:45,743 (thread FelixStartLevel) DEBUG (256) jdbm-trunk-patched (OnlineUpdater.java:83)
2012-08-30 11:42:45,743 (thread FelixStartLevel) DEBUG (4) jdbm-trunk-patched (OnlineUpdater.java:83)
2012-08-30 11:42:45,744 (thread FelixStartLevel) DEBUG (256) javax.servlet (OnlineUpdater.java:83)
2012-08-30 11:42:45,744 (thread FelixStartLevel) DEBUG (4) javax.servlet (OnlineUpdater.java:83)
2012-08-30 11:42:45,744 (thread FelixStartLevel) DEBUG (256) com.springsource.javax.media.jai.core (OnlineUpdater.java:83)
2012-08-30 11:42:45,744 (thread FelixStartLevel) DEBUG (4) com.springsource.javax.media.jai.core (OnlineUpdater.java:83)
2012-08-30 11:42:45,744 (thread FelixStartLevel) DEBUG (256) JGoogleAnalytics_0.3 (OnlineUpdater.java:83)
2012-08-30 11:42:45,744 (thread FelixStartLevel) DEBUG (4) JGoogleAnalytics_0.3 (OnlineUpdater.java:83)
2012-08-30 11:42:45,745 (thread FelixStartLevel) DEBUG (256) osgi.cmpn (OnlineUpdater.java:83)
2012-08-30 11:42:45,745 (thread FelixStartLevel) DEBUG (4) osgi.cmpn (OnlineUpdater.java:83)
2012-08-30 11:42:45,745 (thread FelixStartLevel) DEBUG (256) com.springsource.javax.media.jai.codec (OnlineUpdater.java:83)
2012-08-30 11:42:45,745 (thread FelixStartLevel) DEBUG (4) com.springsource.javax.media.jai.codec (OnlineUpdater.java:83)
2012-08-30 11:42:45,745 (thread FelixStartLevel) DEBUG (256) org.apache.commons.httpclient (OnlineUpdater.java:83)
2012-08-30 11:42:45,745 (thread FelixStartLevel) DEBUG (4) org.apache.commons.httpclient (OnlineUpdater.java:83)
2012-08-30 11:42:45,746 (thread FelixStartLevel) DEBUG (256) com.elsten.util (OnlineUpdater.java:83)
2012-08-30 11:42:45,746 (thread FelixStartLevel) DEBUG (4) com.elsten.util (OnlineUpdater.java:83)
2012-08-30 11:42:45,746 (thread FelixStartLevel) DEBUG (256) org.apache.commons.lang (OnlineUpdater.java:83)
2012-08-30 11:42:45,746 (thread FelixStartLevel) DEBUG (4) org.apache.commons.lang (OnlineUpdater.java:83)
2012-08-30 11:42:45,746 (thread FelixStartLevel) DEBUG (256) com.google.gson (OnlineUpdater.java:83)
2012-08-30 11:42:45,746 (thread FelixStartLevel) DEBUG (4) com.google.gson (OnlineUpdater.java:83)
2012-08-30 11:42:45,747 (thread FelixStartLevel) DEBUG (256) org.eclipse.jetty.servlet (OnlineUpdater.java:83)
2012-08-30 11:42:45,747 (thread FelixStartLevel) DEBUG (4) org.eclipse.jetty.servlet (OnlineUpdater.java:83)
2012-08-30 11:42:45,747 (thread FelixStartLevel) DEBUG (256) org.eclipse.jetty.io (OnlineUpdater.java:83)
2012-08-30 11:42:45,747 (thread FelixStartLevel) DEBUG (4) org.eclipse.jetty.io (OnlineUpdater.java:83)
2012-08-30 11:42:45,747 (thread FelixStartLevel) DEBUG (256) org.eclipse.jetty.server (OnlineUpdater.java:83)
2012-08-30 11:42:45,747 (thread FelixStartLevel) DEBUG (4) org.eclipse.jetty.server (OnlineUpdater.java:83)
2012-08-30 11:42:45,748 (thread FelixStartLevel) DEBUG (256) net.contentobjects.jnotify (OnlineUpdater.java:83)
2012-08-30 11:42:45,748 (thread FelixStartLevel) DEBUG (4) net.contentobjects.jnotify (OnlineUpdater.java:83)
2012-08-30 11:42:45,748 (thread FelixStartLevel) DEBUG (256) org.eclipse.jetty.http (OnlineUpdater.java:83)
2012-08-30 11:42:45,748 (thread FelixStartLevel) DEBUG (4) org.eclipse.jetty.http (OnlineUpdater.java:83)
2012-08-30 11:42:45,748 (thread FelixStartLevel) DEBUG (256) org.apache.felix.bundlerepository (OnlineUpdater.java:83)
2012-08-30 11:42:45,749 (thread FelixStartLevel) DEBUG (4) org.apache.felix.bundlerepository (OnlineUpdater.java:83)
2012-08-30 11:42:45,749 (thread FelixStartLevel) DEBUG (256) com.elsten.bliss.bootstrapbundle (OnlineUpdater.java:83)
2012-08-30 11:42:45,749 (thread FelixStartLevel) DEBUG (4) com.elsten.bliss.bootstrapbundle (OnlineUpdater.java:83)

I included some exceptions thrown by threads which were created by bundles being stopped. Previous experience suggests that threading can cause problems in these scenarios.
                
      was (Author: gravelld):
    Unfortunately I cannot tell because I don't know which bundle is being inspected at this point. I don't see any uninstalled events though.

Here's the full list of all events:

2012-08-30 11:40:49,380 (thread pool-19-thread-1) DEBUG (256) com.elsten.util (OnlineUpdater.java:83)
2012-08-30 11:40:49,380 (thread pool-19-thread-1) DEBUG (4) com.elsten.util (OnlineUpdater.java:83)
2012-08-30 11:40:49,381 (thread pool-19-thread-1) DEBUG (256) com.elsten.bliss.platform (OnlineUpdater.java:83)
2012-08-30 11:40:49,383 (thread BlockingLowPriorityBufferStorageNotificationBus-notification worker) WARN  Interrupted while sleeping between SN batch notification (BoundedBufferStorageNotificationBus.java:178)
2012-08-30 11:40:49,383 (thread UntaggedSuggestionStorageNotificationListener) INFO  Interrupted while waiting for untagged files (UntaggedSuggestionStorageNotificationListener.java:49)
2012-08-30 11:40:49,422 (thread pool-19-thread-1) DEBUG (4) com.elsten.bliss.platform (OnlineUpdater.java:83)
2012-08-30 11:40:49,423 (thread pool-19-thread-1) DEBUG (256) com.elsten.bliss.web.debug (OnlineUpdater.java:83)
2012-08-30 11:40:49,425 (thread BlockingLowPriorityBufferStorageNotificationBus-notification worker) ERROR Exception thrown when notifying storage node listeners of changes: Update [JaudioTaggerStorageNode[full id=file:/mnt/media/music.withoutart/music/Beastie_Boys/Hello_Nasty/21-Dr._Lee,_PhD.flac,root=/mnt/media/music.withoutart/music], JaudioTaggerStorageNode[full id=file:/mnt/media/music.withoutart/music/Beastie_Boys/Hello_Nasty/20-Dedication.flac,root=/mnt/media/music.withoutart/music], JaudioTaggerStorageNode[full id=file:/mnt/media/music.withoutart/music/Beastie_Boys/Hello_Nasty/16-The_Negotiation_Limerick_File.flac,root=/mnt/media/music.withoutart/music], JaudioTaggerStorageNode[full id=file:/mnt/media/music.withoutart/music/Beastie_Boys/Hello_Nasty/02-Move.flac,root=/mnt/media/music.withoutart/music], JaudioTaggerStorageNode[full id=file:/mnt/media/music.withoutart/music/Beastie_Boys/Hello_Nasty/18-Picture_This.flac,root=/mnt/media/music.withoutart/music], JaudioTaggerStorageNode[full id=file:/mnt/media/music.withoutart/music/Beastie_Boys/Hello_Nasty/05-Just_A_Test.flac,root=/mnt/media/music.withoutart/music], JaudioTaggerStorageNode[full id=file:/mnt/media/music.withoutart/music/Beastie_Boys/Hello_Nasty/03-Remote_Control.flac,root=/mnt/media/music.withoutart/music], JaudioTaggerStorageNode[full id=file:/mnt/media/music.withoutart/music/Beastie_Boys/Hello_Nasty/09-Putting_Shame_In_Your_Game.flac,root=/mnt/media/music.withoutart/music], JaudioTaggerStorageNode[full id=file:/mnt/media/music.withoutart/music/Beastie_Boys/Hello_Nasty/11-And_Me.flac,root=/mnt/media/music.withoutart/music], JaudioTaggerStorageNode[full id=file:/mnt/media/music.withoutart/music/Beastie_Boys/Hello_Nasty/08-Sneakin_Out_The_Hospital.flac,root=/mnt/media/music.withoutart/music], JaudioTaggerStorageNode[full id=file:/mnt/media/music.withoutart/music/Beastie_Boys/Hello_Nasty/12-Three_MCs_And_One_DJ.flac,root=/mnt/media/music.withoutart/music], JaudioTaggerStorageNode[full id=file:/mnt/media/music.withoutart/music/Beastie_Boys/Hello_Nasty/10-Flowin_Prose.flac,root=/mnt/media/music.withoutart/music], JaudioTaggerStorageNode[full id=file:/mnt/media/music.withoutart/music/Beastie_Boys/Hello_Nasty/19-Unite.flac,root=/mnt/media/music.withoutart/music], JaudioTaggerStorageNode[full id=file:/mnt/media/music.withoutart/music/Beastie_Boys/Hello_Nasty/07-Intergalactic.flac,root=/mnt/media/music.withoutart/music], JaudioTaggerStorageNode[full id=file:/mnt/media/music.withoutart/music/Beastie_Boys/Hello_Nasty/01-Super_Disco_Breakin.flac,root=/mnt/media/music.withoutart/music], JaudioTaggerStorageNode[full id=file:/mnt/media/music.withoutart/music/Beastie_Boys/Hello_Nasty/15-I_Dont_Know.flac,root=/mnt/media/music.withoutart/music], JaudioTaggerStorageNode[full id=file:/mnt/media/music.withoutart/music/Beastie_Boys/Hello_Nasty/22-Instant_Death.flac,root=/mnt/media/music.withoutart/music], JaudioTaggerStorageNode[full id=file:/mnt/media/music.withoutart/music/Beastie_Boys/Hello_Nasty/06-Body_Movin.flac,root=/mnt/media/music.withoutart/music], JaudioTaggerStorageNode[full id=file:/mnt/media/music.withoutart/music/Beastie_Boys/Hello_Nasty/14-Song_For_Junior.flac,root=/mnt/media/music.withoutart/music], JaudioTaggerStorageNode[full id=file:/mnt/media/music.withoutart/music/Beastie_Boys/Hello_Nasty/13-Cant,_Wont,_Dont_Stop.flac,root=/mnt/media/music.withoutart/music]] (BoundedBufferStorageNotificationBus.java:150)
java.lang.IllegalStateException: RecordManager has been closed
    at jdbm.recman.CacheRecordManager.checkIfClosed(CacheRecordManager.java:445)
    at jdbm.recman.CacheRecordManager.fetch(CacheRecordManager.java:308)
    at jdbm.btree.BTree._fetch(BTree.java:865)
    at jdbm.btree.BTree.getRoot(BTree.java:645)
    at jdbm.btree.BTree.find(BTree.java:435)
    at com.elsten.bliss.platform.tagindex.JdbmTagIndex.add(JdbmTagIndex.java:156)
    at com.elsten.bliss.platform.tagindex.model.TabledTagIndex.storeQuietly(TabledTagIndex.java:174)
    at com.elsten.bliss.platform.tagindex.model.TabledTagIndex.store(TabledTagIndex.java:160)
    at com.elsten.bliss.music.tagged.mapper.TagStoreStorageListener.store(TagStoreStorageListener.java:36)
    at com.elsten.bliss.music.tagged.mapper.TagStoreStorageListener.nodeUpdated(TagStoreStorageListener.java:49)
    at com.elsten.bliss.platform.storage.BoundedBufferStorageNotificationBus$StorageNotificationUpdate.sendUpdates(BoundedBufferStorageNotificationBus.java:180)
    at com.elsten.bliss.platform.storage.BoundedBufferStorageNotificationBus$StorageNotification.run(BoundedBufferStorageNotificationBus.java:146)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    at java.lang.Thread.run(Thread.java:679)
2012-08-30 11:40:50,499 (thread pool-19-thread-1) DEBUG (4) com.elsten.bliss.web.debug (OnlineUpdater.java:83)
2012-08-30 11:40:50,499 (thread pool-19-thread-1) DEBUG (256) com.elsten.bliss.policy.tag.tagtype (OnlineUpdater.java:83)
2012-08-30 11:40:50,500 (thread pool-19-thread-1) DEBUG (4) com.elsten.bliss.policy.tag.tagtype (OnlineUpdater.java:83)
2012-08-30 11:40:50,500 (thread pool-19-thread-1) DEBUG (256) com.elsten.bliss.policy.tag.auto (OnlineUpdater.java:83)
2012-08-30 11:40:50,500 (thread pool-19-thread-1) DEBUG (4) com.elsten.bliss.policy.tag.auto (OnlineUpdater.java:83)
2012-08-30 11:40:50,500 (thread pool-19-thread-1) DEBUG (256) com.elsten.bliss.ui (OnlineUpdater.java:83)
2012-08-30 11:40:51,661 (thread pool-19-thread-1) DEBUG (4) com.elsten.bliss.ui (OnlineUpdater.java:83)
2012-08-30 11:40:51,662 (thread pool-19-thread-1) DEBUG (256) com.elsten.bliss.music.info.dto (OnlineUpdater.java:83)
2012-08-30 11:40:51,662 (thread pool-19-thread-1) DEBUG (4) com.elsten.bliss.music.info.dto (OnlineUpdater.java:83)
2012-08-30 11:40:51,662 (thread pool-19-thread-1) DEBUG (256) com.elsten.bliss.policy.parsed (OnlineUpdater.java:83)
2012-08-30 11:40:51,662 (thread pool-19-thread-1) DEBUG (4) com.elsten.bliss.policy.parsed (OnlineUpdater.java:83)
2012-08-30 11:40:51,663 (thread pool-19-thread-1) DEBUG (256) com.elsten.bliss.bundle (OnlineUpdater.java:83)
2012-08-30 11:40:51,663 (thread pool-19-thread-1) DEBUG (4) com.elsten.bliss.bundle (OnlineUpdater.java:83)
2012-08-30 11:40:51,663 (thread pool-19-thread-1) DEBUG (256) com.elsten.bliss.model (OnlineUpdater.java:83)
2012-08-30 11:40:51,663 (thread pool-19-thread-1) DEBUG (4) com.elsten.bliss.model (OnlineUpdater.java:83)
2012-08-30 11:40:51,664 (thread pool-19-thread-1) DEBUG (256) com.elsten.musicbrainz (OnlineUpdater.java:83)
2012-08-30 11:40:51,664 (thread pool-19-thread-1) DEBUG (4) com.elsten.musicbrainz (OnlineUpdater.java:83)
2012-08-30 11:40:51,762 (thread pool-19-thread-1) DEBUG (64) com.elsten.bliss.model (OnlineUpdater.java:83)
2012-08-30 11:40:51,762 (thread pool-19-thread-1) DEBUG (8) com.elsten.bliss.model (OnlineUpdater.java:83)
2012-08-30 11:40:51,793 (thread pool-19-thread-1) DEBUG (64) com.elsten.bliss.logging (OnlineUpdater.java:83)
2012-08-30 11:40:51,793 (thread pool-19-thread-1) DEBUG (8) com.elsten.bliss.logging (OnlineUpdater.java:83)
2012-08-30 11:40:51,829 (thread pool-19-thread-1) DEBUG (64) com.elsten.musicbrainz (OnlineUpdater.java:83)
2012-08-30 11:40:51,829 (thread pool-19-thread-1) DEBUG (8) com.elsten.musicbrainz (OnlineUpdater.java:83)
2012-08-30 11:40:51,859 (thread pool-19-thread-1) DEBUG (64) com.elsten.util (OnlineUpdater.java:83)
2012-08-30 11:40:51,859 (thread pool-19-thread-1) DEBUG (8) com.elsten.util (OnlineUpdater.java:83)
2012-08-30 11:40:52,010 (thread pool-19-thread-1) DEBUG (64) com.elsten.bliss.platform (OnlineUpdater.java:83)
2012-08-30 11:40:52,010 (thread pool-19-thread-1) DEBUG (8) com.elsten.bliss.platform (OnlineUpdater.java:83)
2012-08-30 11:40:52,050 (thread pool-19-thread-1) DEBUG (64) com.elsten.bliss.bundle (OnlineUpdater.java:83)
2012-08-30 11:40:52,050 (thread pool-19-thread-1) DEBUG (8) com.elsten.bliss.bundle (OnlineUpdater.java:83)
2012-08-30 11:40:52,095 (thread pool-19-thread-1) DEBUG (64) com.elsten.bliss.policy.parsed (OnlineUpdater.java:83)
2012-08-30 11:40:52,095 (thread pool-19-thread-1) DEBUG (8) com.elsten.bliss.policy.parsed (OnlineUpdater.java:83)
2012-08-30 11:40:52,378 (thread pool-19-thread-1) DEBUG (64) com.elsten.bliss.policy.tag.auto (OnlineUpdater.java:83)
2012-08-30 11:40:52,378 (thread pool-19-thread-1) DEBUG (8) com.elsten.bliss.policy.tag.auto (OnlineUpdater.java:83)
2012-08-30 11:40:53,495 (thread pool-19-thread-1) DEBUG (64) com.elsten.bliss.ui (OnlineUpdater.java:83)
2012-08-30 11:40:53,495 (thread pool-19-thread-1) DEBUG (8) com.elsten.bliss.ui (OnlineUpdater.java:83)
2012-08-30 11:40:53,503 (thread FelixFrameworkWiring) DEBUG (256) net.contentobjects.jnotify (OnlineUpdater.java:83)
2012-08-30 11:40:53,503 (thread FelixFrameworkWiring) DEBUG (4) net.contentobjects.jnotify (OnlineUpdater.java:83)
2012-08-30 11:40:53,503 (thread FelixFrameworkWiring) DEBUG (256) log4j (OnlineUpdater.java:83)
2012-08-30 11:40:53,503 (thread FelixFrameworkWiring) DEBUG (4) log4j (OnlineUpdater.java:83)
2012-08-30 11:40:53,504 (thread FelixFrameworkWiring) DEBUG (256) com.elsten.bliss.updater (OnlineUpdater.java:83)
2012-08-30 11:40:53,504 (thread FelixFrameworkWiring) DEBUG (4) com.elsten.bliss.updater (OnlineUpdater.java:83)
2012-08-30 11:40:53,504 (thread FelixFrameworkWiring) DEBUG (256) jdbm-trunk-patched (OnlineUpdater.java:83)
2012-08-30 11:40:53,504 (thread FelixFrameworkWiring) DEBUG (4) jdbm-trunk-patched (OnlineUpdater.java:83)
2012-08-30 11:40:53,507 (thread FelixFrameworkWiring) DEBUG (64) net.contentobjects.jnotify (OnlineUpdater.java:83)
2012-08-30 11:40:53,508 (thread FelixFrameworkWiring) DEBUG (64) log4j (OnlineUpdater.java:83)
2012-08-30 11:40:53,510 (thread FelixFrameworkWiring) DEBUG (64) com.elsten.bliss.updater (OnlineUpdater.java:83)
2012-08-30 11:40:53,513 (thread FelixFrameworkWiring) DEBUG (64) com.elsten.bliss.policy.tag.tagtype (OnlineUpdater.java:83)
2012-08-30 11:40:53,515 (thread FelixFrameworkWiring) DEBUG (64) jdbm-trunk-patched (OnlineUpdater.java:83)
2012-08-30 11:40:53,527 (thread FelixFrameworkWiring) DEBUG (32) jdbm-trunk-patched (OnlineUpdater.java:83)
2012-08-30 11:40:53,527 (thread FelixFrameworkWiring) DEBUG (32) com.elsten.bliss.logging (OnlineUpdater.java:83)
2012-08-30 11:40:53,527 (thread FelixFrameworkWiring) DEBUG (32) log4j (OnlineUpdater.java:83)
2012-08-30 11:40:53,527 (thread FelixFrameworkWiring) DEBUG (32) com.elsten.bliss.logging (OnlineUpdater.java:83)
2012-08-30 11:40:53,527 (thread FelixFrameworkWiring) DEBUG (32) net.contentobjects.jnotify (OnlineUpdater.java:83)
2012-08-30 11:40:53,528 (thread FelixFrameworkWiring) DEBUG (128) net.contentobjects.jnotify (OnlineUpdater.java:83)
2012-08-30 11:40:53,528 (thread FelixFrameworkWiring) DEBUG (2) net.contentobjects.jnotify (OnlineUpdater.java:83)
2012-08-30 11:40:53,528 (thread FelixFrameworkWiring) DEBUG (128) log4j (OnlineUpdater.java:83)
2012-08-30 11:40:53,528 (thread FelixFrameworkWiring) DEBUG (2) log4j (OnlineUpdater.java:83)
2012-08-30 11:40:53,538 (thread FelixFrameworkWiring) DEBUG (32) com.elsten.bliss.model (OnlineUpdater.java:83)
2012-08-30 11:40:53,539 (thread FelixFrameworkWiring) DEBUG (32) com.elsten.util (OnlineUpdater.java:83)
2012-08-30 11:40:53,539 (thread FelixFrameworkWiring) DEBUG (32) com.elsten.bliss.updater (OnlineUpdater.java:83)
2012-08-30 11:40:53,539 (thread FelixFrameworkWiring) DEBUG (128) com.elsten.bliss.updater (OnlineUpdater.java:83)
2012-08-30 11:40:53,545 (thread FelixFrameworkWiring) DEBUG (2) com.elsten.bliss.updater (OnlineUpdater.java:83)
2012-08-30 11:40:53,545 (thread FelixFrameworkWiring) DEBUG (128) jdbm-trunk-patched (OnlineUpdater.java:83)
2012-08-30 11:40:53,545 (thread FelixFrameworkWiring) DEBUG (2) jdbm-trunk-patched (OnlineUpdater.java:83)
2012-08-30 11:40:53,545 (thread pool-19-thread-1) DEBUG (128) com.elsten.util (OnlineUpdater.java:83)
2012-08-30 11:40:53,545 (thread pool-19-thread-1) DEBUG (2) com.elsten.util (OnlineUpdater.java:83)
2012-08-30 11:40:53,563 (thread pool-19-thread-1) DEBUG (32) com.elsten.musicbrainz (OnlineUpdater.java:83)
2012-08-30 11:40:53,563 (thread pool-19-thread-1) DEBUG (32) com.elsten.bliss.platform (OnlineUpdater.java:83)
2012-08-30 11:40:53,563 (thread pool-19-thread-1) DEBUG (32) com.elsten.bliss.policy.parsed (OnlineUpdater.java:83)
2012-08-30 11:40:53,563 (thread pool-19-thread-1) DEBUG (32) com.elsten.bliss.policy.tag.tagtype (OnlineUpdater.java:83)
2012-08-30 11:40:53,563 (thread pool-19-thread-1) DEBUG (32) com.elsten.bliss.policy.tag.auto (OnlineUpdater.java:83)
2012-08-30 11:40:53,564 (thread pool-19-thread-1) DEBUG (128) com.elsten.bliss.platform (OnlineUpdater.java:83)
2012-08-30 11:40:53,573 (thread pool-19-thread-1) DEBUG (2) com.elsten.bliss.platform (OnlineUpdater.java:83)
2012-08-30 11:40:53,574 (thread pool-19-thread-1) ERROR Caught a Throwable (CatchThrowableRunnable.java:25)
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
    at java.util.ArrayList.rangeCheck(ArrayList.java:571)
    at java.util.ArrayList.get(ArrayList.java:349)
    at org.apache.felix.framework.BundleImpl.adapt(BundleImpl.java:1046)
    at com.elsten.bliss.updater.FelixObrUtils.isFragment(FelixObrUtils.java:149)
    at com.elsten.bliss.updater.OnlineUpdater$2.doRun(OnlineUpdater.java:124)
    at com.elsten.util.CatchThrowableRunnable.run(CatchThrowableRunnable.java:23)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    at java.lang.Thread.run(Thread.java:679)
2012-08-30 11:42:45,732 (thread FelixShutdown) DEBUG (256) org.apache.felix.framework (OnlineUpdater.java:83)
2012-08-30 11:42:45,733 (thread FelixStartLevel) DEBUG (256) org.json (OnlineUpdater.java:83)
2012-08-30 11:42:45,734 (thread FelixStartLevel) DEBUG (4) org.json (OnlineUpdater.java:83)
2012-08-30 11:42:45,734 (thread FelixStartLevel) DEBUG (256) org.eclipse.jetty.xml (OnlineUpdater.java:83)
2012-08-30 11:42:45,734 (thread FelixStartLevel) DEBUG (4) org.eclipse.jetty.xml (OnlineUpdater.java:83)
2012-08-30 11:42:45,734 (thread FelixStartLevel) DEBUG (256) org.eclipse.jetty.util (OnlineUpdater.java:83)
2012-08-30 11:42:45,734 (thread FelixStartLevel) DEBUG (4) org.eclipse.jetty.util (OnlineUpdater.java:83)
2012-08-30 11:42:45,735 (thread FelixStartLevel) DEBUG (256) org.apache.commons.logging (OnlineUpdater.java:83)
2012-08-30 11:42:45,735 (thread FelixStartLevel) DEBUG (4) org.apache.commons.logging (OnlineUpdater.java:83)
2012-08-30 11:42:45,735 (thread FelixStartLevel) DEBUG (256) org.apache.commons.codec (OnlineUpdater.java:83)
2012-08-30 11:42:45,735 (thread FelixStartLevel) DEBUG (4) org.apache.commons.codec (OnlineUpdater.java:83)
2012-08-30 11:42:45,735 (thread FelixStartLevel) DEBUG (256) org.eclipse.jetty.webapp (OnlineUpdater.java:83)
2012-08-30 11:42:45,736 (thread FelixStartLevel) DEBUG (4) org.eclipse.jetty.webapp (OnlineUpdater.java:83)
2012-08-30 11:42:45,736 (thread FelixStartLevel) DEBUG (256) com.elsten.bliss.updater (OnlineUpdater.java:83)
2012-08-30 11:42:45,736 (thread FelixStartLevel) DEBUG (4) com.elsten.bliss.updater (OnlineUpdater.java:83)
2012-08-30 11:42:45,736 (thread FelixStartLevel) DEBUG (256) org.eclipse.jetty.continuation (OnlineUpdater.java:83)
2012-08-30 11:42:45,736 (thread FelixStartLevel) DEBUG (4) org.eclipse.jetty.continuation (OnlineUpdater.java:83)
2012-08-30 11:42:45,736 (thread FelixStartLevel) DEBUG (256) com.elsten.bliss.platform (OnlineUpdater.java:83)
2012-08-30 11:42:45,740 (thread FelixStartLevel) DEBUG (4) com.elsten.bliss.platform (OnlineUpdater.java:83)
2012-08-30 11:42:45,740 (thread FelixStartLevel) DEBUG (256) com.google.guava (OnlineUpdater.java:83)
2012-08-30 11:42:45,740 (thread FelixStartLevel) DEBUG (4) com.google.guava (OnlineUpdater.java:83)
2012-08-30 11:42:45,740 (thread FelixStartLevel) DEBUG (256) org.apache.commons.io (OnlineUpdater.java:83)
2012-08-30 11:42:45,740 (thread FelixStartLevel) DEBUG (4) org.apache.commons.io (OnlineUpdater.java:83)
2012-08-30 11:42:45,740 (thread FelixStartLevel) DEBUG (256) org.eclipse.jetty.osgi.boot (OnlineUpdater.java:83)
2012-08-30 11:42:45,741 (thread FelixStartLevel) DEBUG (4) org.eclipse.jetty.osgi.boot (OnlineUpdater.java:83)
2012-08-30 11:42:45,741 (thread FelixStartLevel) DEBUG (256) org.apache.commons.collections (OnlineUpdater.java:83)
2012-08-30 11:42:45,741 (thread FelixStartLevel) DEBUG (4) org.apache.commons.collections (OnlineUpdater.java:83)
2012-08-30 11:42:45,741 (thread FelixStartLevel) DEBUG (256) org.eclipse.jetty.security (OnlineUpdater.java:83)
2012-08-30 11:42:45,742 (thread FelixStartLevel) DEBUG (4) org.eclipse.jetty.security (OnlineUpdater.java:83)
2012-08-30 11:42:45,742 (thread FelixStartLevel) DEBUG (256) log4j (OnlineUpdater.java:83)
2012-08-30 11:42:45,742 (thread FelixStartLevel) DEBUG (4) log4j (OnlineUpdater.java:83)
2012-08-30 11:42:45,742 (thread FelixStartLevel) DEBUG (256) org.jaudiotagger (OnlineUpdater.java:83)
2012-08-30 11:42:45,742 (thread FelixStartLevel) DEBUG (4) org.jaudiotagger (OnlineUpdater.java:83)
2012-08-30 11:42:45,742 (thread FelixStartLevel) DEBUG (256) com.sun.jna (OnlineUpdater.java:83)
2012-08-30 11:42:45,743 (thread FelixStartLevel) DEBUG (4) com.sun.jna (OnlineUpdater.java:83)
2012-08-30 11:42:45,743 (thread FelixStartLevel) DEBUG (256) scala-library (OnlineUpdater.java:83)
2012-08-30 11:42:45,743 (thread FelixStartLevel) DEBUG (4) scala-library (OnlineUpdater.java:83)
2012-08-30 11:42:45,743 (thread FelixStartLevel) DEBUG (256) org.eclipse.jetty.deploy (OnlineUpdater.java:83)
2012-08-30 11:42:45,743 (thread FelixStartLevel) DEBUG (4) org.eclipse.jetty.deploy (OnlineUpdater.java:83)
2012-08-30 11:42:45,743 (thread FelixStartLevel) DEBUG (256) jdbm-trunk-patched (OnlineUpdater.java:83)
2012-08-30 11:42:45,743 (thread FelixStartLevel) DEBUG (4) jdbm-trunk-patched (OnlineUpdater.java:83)
2012-08-30 11:42:45,744 (thread FelixStartLevel) DEBUG (256) javax.servlet (OnlineUpdater.java:83)
2012-08-30 11:42:45,744 (thread FelixStartLevel) DEBUG (4) javax.servlet (OnlineUpdater.java:83)
2012-08-30 11:42:45,744 (thread FelixStartLevel) DEBUG (256) com.springsource.javax.media.jai.core (OnlineUpdater.java:83)
2012-08-30 11:42:45,744 (thread FelixStartLevel) DEBUG (4) com.springsource.javax.media.jai.core (OnlineUpdater.java:83)
2012-08-30 11:42:45,744 (thread FelixStartLevel) DEBUG (256) JGoogleAnalytics_0.3 (OnlineUpdater.java:83)
2012-08-30 11:42:45,744 (thread FelixStartLevel) DEBUG (4) JGoogleAnalytics_0.3 (OnlineUpdater.java:83)
2012-08-30 11:42:45,745 (thread FelixStartLevel) DEBUG (256) osgi.cmpn (OnlineUpdater.java:83)
2012-08-30 11:42:45,745 (thread FelixStartLevel) DEBUG (4) osgi.cmpn (OnlineUpdater.java:83)
2012-08-30 11:42:45,745 (thread FelixStartLevel) DEBUG (256) com.springsource.javax.media.jai.codec (OnlineUpdater.java:83)
2012-08-30 11:42:45,745 (thread FelixStartLevel) DEBUG (4) com.springsource.javax.media.jai.codec (OnlineUpdater.java:83)
2012-08-30 11:42:45,745 (thread FelixStartLevel) DEBUG (256) org.apache.commons.httpclient (OnlineUpdater.java:83)
2012-08-30 11:42:45,745 (thread FelixStartLevel) DEBUG (4) org.apache.commons.httpclient (OnlineUpdater.java:83)
2012-08-30 11:42:45,746 (thread FelixStartLevel) DEBUG (256) com.elsten.util (OnlineUpdater.java:83)
2012-08-30 11:42:45,746 (thread FelixStartLevel) DEBUG (4) com.elsten.util (OnlineUpdater.java:83)
2012-08-30 11:42:45,746 (thread FelixStartLevel) DEBUG (256) org.apache.commons.lang (OnlineUpdater.java:83)
2012-08-30 11:42:45,746 (thread FelixStartLevel) DEBUG (4) org.apache.commons.lang (OnlineUpdater.java:83)
2012-08-30 11:42:45,746 (thread FelixStartLevel) DEBUG (256) com.google.gson (OnlineUpdater.java:83)
2012-08-30 11:42:45,746 (thread FelixStartLevel) DEBUG (4) com.google.gson (OnlineUpdater.java:83)
2012-08-30 11:42:45,747 (thread FelixStartLevel) DEBUG (256) org.eclipse.jetty.servlet (OnlineUpdater.java:83)
2012-08-30 11:42:45,747 (thread FelixStartLevel) DEBUG (4) org.eclipse.jetty.servlet (OnlineUpdater.java:83)
2012-08-30 11:42:45,747 (thread FelixStartLevel) DEBUG (256) org.eclipse.jetty.io (OnlineUpdater.java:83)
2012-08-30 11:42:45,747 (thread FelixStartLevel) DEBUG (4) org.eclipse.jetty.io (OnlineUpdater.java:83)
2012-08-30 11:42:45,747 (thread FelixStartLevel) DEBUG (256) org.eclipse.jetty.server (OnlineUpdater.java:83)
2012-08-30 11:42:45,747 (thread FelixStartLevel) DEBUG (4) org.eclipse.jetty.server (OnlineUpdater.java:83)
2012-08-30 11:42:45,748 (thread FelixStartLevel) DEBUG (256) net.contentobjects.jnotify (OnlineUpdater.java:83)
2012-08-30 11:42:45,748 (thread FelixStartLevel) DEBUG (4) net.contentobjects.jnotify (OnlineUpdater.java:83)
2012-08-30 11:42:45,748 (thread FelixStartLevel) DEBUG (256) org.eclipse.jetty.http (OnlineUpdater.java:83)
2012-08-30 11:42:45,748 (thread FelixStartLevel) DEBUG (4) org.eclipse.jetty.http (OnlineUpdater.java:83)
2012-08-30 11:42:45,748 (thread FelixStartLevel) DEBUG (256) org.apache.felix.bundlerepository (OnlineUpdater.java:83)
2012-08-30 11:42:45,749 (thread FelixStartLevel) DEBUG (4) org.apache.felix.bundlerepository (OnlineUpdater.java:83)
2012-08-30 11:42:45,749 (thread FelixStartLevel) DEBUG (256) com.elsten.bliss.bootstrapbundle (OnlineUpdater.java:83)
2012-08-30 11:42:45,749 (thread FelixStartLevel) DEBUG (4) com.elsten.bliss.bootstrapbundle (OnlineUpdater.java:83)

I included some exceptions thrown by threads which were created by bundles being stopped. Previous experience suggests that threading can cause problems in these scenarios.
                  
> ArrayIndexOutOfBoundsException when trying to adapt() a stopped bundle
> ----------------------------------------------------------------------
>
>                 Key: FELIX-3652
>                 URL: https://issues.apache.org/jira/browse/FELIX-3652
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: framework-4.0.2
>            Reporter: Dan Gravell
>            Priority: Minor
>
> I have the following code block:
> final Iterable<Bundle> startedBundles = [...]
> for (Bundle bundle : startedBundles) {
> 	try {
> 		if(!FelixObrUtils.isFragment(bundle)) sysBundle.getBundleContext().getBundle(bundle.getBundleId()).stop();
> 	} catch (BundleException e) {
> 		LOG.error("Failed to stop " + bundle.getSymbolicName(), e);
> 	}
> }
> resolver.deploy(0);
> blockingRefreshBundles(null, sysBundle.getBundleContext());
> for (Bundle bundle : startedBundles) {
> 	try {
> 		if(!FelixObrUtils.isFragment(bundle)) sysBundle.getBundleContext().getBundle(bundle.getBundleId()).start();
> 	} catch (BundleException e) {
> 		LOG.error("Failed to restart " + bundle.getSymbolicName(), e);
> 	}
> }
> blockingRefreshBundles() blocks until frameworkWiring.refreshBundles has completed using a CountDownLatch and a FrameworkListener.
> Pertinently, FelixObrUtils.isFragment looks like:
> public static boolean isFragment(Bundle bundle) {
> 	return (bundle.adapt(BundleRevision.class).getTypes() & BundleRevision.TYPE_FRAGMENT) != 0;
> }
> Upon the second call to FelixObrUtils.isFragment I get:
> java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
>     	at java.util.ArrayList.rangeCheck(ArrayList.java:571)
>     	at java.util.ArrayList.get(ArrayList.java:349)
>     	at org.apache.felix.framework.BundleImpl.adapt(BundleImpl.java:1046)
>     	at com.elsten.bliss.updater.FelixObrUtils.isFragment(FelixObrUtils.java:149)
>     	at com.elsten.bliss.updater.OnlineUpdater$2.doRun(OnlineUpdater.java:124)
>     	at com.elsten.util.CatchThrowableRunnable.run(CatchThrowableRunnable.java:23)
>     	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
>     	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
>     	at java.lang.Thread.run(Thread.java:679)
> Presumably this is because the bundle has been stopped, possibly updated and refreshed in the meantime.
> Maybe I should not be doing this on a stopped bundle, and I should be getting a fresh view of the bundle, but shouldn't this be handled differently? AIOOBE is not documented as an exception that may be thrown in the OSGi API. Knowing how to handle this requires knowledge of BundleImpl's implementation (m_revisions etc).

--
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

[jira] [Commented] (FELIX-3652) ArrayIndexOutOfBoundsException when trying to adapt() a stopped bundle

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-3652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13447304#comment-13447304 ] 

Richard S. Hall commented on FELIX-3652:
----------------------------------------

Do you know what state the Bundle is in when the adapt is performed? Could you check? It seems like the number of revisions shouldn't be zero unless the bundle has been uninstalled.
                
> ArrayIndexOutOfBoundsException when trying to adapt() a stopped bundle
> ----------------------------------------------------------------------
>
>                 Key: FELIX-3652
>                 URL: https://issues.apache.org/jira/browse/FELIX-3652
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: framework-4.0.2
>            Reporter: Dan Gravell
>            Priority: Minor
>
> I have the following code block:
> final Iterable<Bundle> startedBundles = [...]
> for (Bundle bundle : startedBundles) {
> 	try {
> 		if(!FelixObrUtils.isFragment(bundle)) sysBundle.getBundleContext().getBundle(bundle.getBundleId()).stop();
> 	} catch (BundleException e) {
> 		LOG.error("Failed to stop " + bundle.getSymbolicName(), e);
> 	}
> }
> resolver.deploy(0);
> blockingRefreshBundles(null, sysBundle.getBundleContext());
> for (Bundle bundle : startedBundles) {
> 	try {
> 		if(!FelixObrUtils.isFragment(bundle)) sysBundle.getBundleContext().getBundle(bundle.getBundleId()).start();
> 	} catch (BundleException e) {
> 		LOG.error("Failed to restart " + bundle.getSymbolicName(), e);
> 	}
> }
> blockingRefreshBundles() blocks until frameworkWiring.refreshBundles has completed using a CountDownLatch and a FrameworkListener.
> Pertinently, FelixObrUtils.isFragment looks like:
> public static boolean isFragment(Bundle bundle) {
> 	return (bundle.adapt(BundleRevision.class).getTypes() & BundleRevision.TYPE_FRAGMENT) != 0;
> }
> Upon the second call to FelixObrUtils.isFragment I get:
> java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
>     	at java.util.ArrayList.rangeCheck(ArrayList.java:571)
>     	at java.util.ArrayList.get(ArrayList.java:349)
>     	at org.apache.felix.framework.BundleImpl.adapt(BundleImpl.java:1046)
>     	at com.elsten.bliss.updater.FelixObrUtils.isFragment(FelixObrUtils.java:149)
>     	at com.elsten.bliss.updater.OnlineUpdater$2.doRun(OnlineUpdater.java:124)
>     	at com.elsten.util.CatchThrowableRunnable.run(CatchThrowableRunnable.java:23)
>     	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
>     	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
>     	at java.lang.Thread.run(Thread.java:679)
> Presumably this is because the bundle has been stopped, possibly updated and refreshed in the meantime.
> Maybe I should not be doing this on a stopped bundle, and I should be getting a fresh view of the bundle, but shouldn't this be handled differently? AIOOBE is not documented as an exception that may be thrown in the OSGi API. Knowing how to handle this requires knowledge of BundleImpl's implementation (m_revisions etc).

--
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