[infinispan-issues] [JBoss JIRA] (ISPN-4679) OsgiClassLoader needs null check when iterating bundles
Niels Bertram (JIRA)
issues at jboss.org
Sun Aug 31 10:31:59 EDT 2014
Niels Bertram created ISPN-4679:
-----------------------------------
Summary: OsgiClassLoader needs null check when iterating bundles
Key: ISPN-4679
URL: https://issues.jboss.org/browse/ISPN-4679
Project: Infinispan
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Core
Affects Versions: 7.0.0.Beta1
Reporter: Niels Bertram
Assignee: Dan Berindei
Priority: Minor
{{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.1#6329)
More information about the infinispan-issues
mailing list