[infinispan-issues] [JBoss JIRA] (ISPN-4679) OsgiClassLoader needs null check when iterating bundles

RH Bugzilla Integration (JIRA) issues at jboss.org
Wed Nov 12 04:04:29 EST 2014


    [ https://issues.jboss.org/browse/ISPN-4679?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13019215#comment-13019215 ] 

RH Bugzilla Integration commented on ISPN-4679:
-----------------------------------------------

Martin Gencur <mgencur at redhat.com> changed the Status of [bug 1161349|https://bugzilla.redhat.com/show_bug.cgi?id=1161349] from ON_QA to VERIFIED

> OsgiClassLoader needs null check when iterating bundles
> -------------------------------------------------------
>
>                 Key: ISPN-4679
>                 URL: https://issues.jboss.org/browse/ISPN-4679
>             Project: Infinispan
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 7.0.0.Beta1
>            Reporter: Niels Bertram
>            Assignee: Dan Berindei
>            Priority: Minor
>             Fix For: 7.0.0.Beta2, 7.0.0.Final
>
>
> {{org.infinispan.commons.util.OsgiClassLoader}} requires a null check when the bundle is retrieved from a WeakReference. 
> {code:java}
> for (WeakReference<Bundle> ref : bundles) {
>    final Bundle bundle = ref.get();
>    // BUG: we may not get a bundle back from the weak reference, eg. if uninstalled or deactivated
>    if (bundle.getState() == Bundle.ACTIVE) {
>       try {
>          final Class clazz = bundle.loadClass(name);
>          if (clazz != null) {
>             classCache.put(name, clazz);
>             return clazz;
>          }
>       } catch (Exception ignore) {
>       }
>    }
> }
> {code}
> I am running 7.0.0.Beta1 on servicemix 5.1.1 and can't load this simple infinispan.xml:
> {code:xml}
> <infinispan xmlns="urn:infinispan:config:7.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> 	xsi:schemaLocation="urn:infinispan:config:7.0 http://infinispan.org/schemas/infinispan-config-7.0.xsd">
> 	<cache-container default-cache="default" name="TestContainer">
> 		<jmx domain="TestDomain" mbean-server-lookup="org.infinispan.jmx.PerThreadMBeanServerLookup" duplicate-domains="true"/>
> 		<!-- definitions of the caches -->
> 		<local-cache name="default" statistics="false">
> 			<locking concurrency-level="100" acquire-timeout="1000"/>
> 			<transaction mode="NONE" complete-timeout="3123" reaper-interval="123"/>
> 		</local-cache>
> 	</cache-container>
> </infinispan>
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.8#6338)


More information about the infinispan-issues mailing list