Infinispan in OSGi container
ivokolev Sep 1, 2010 1:22 PMHallo,
I downloaded Infinispan 4.0.0 and its dependencies (the jars you'd listed). Then I created BND property files to customize the defaults for impored and exported packages. I installed the "OSGified" bundles in my Maven and build the project which is going to use Infinispan. The bundles run in Apache Felix. All bundles are properly installed and activated, but when creating SCR context for a bundle, an error in Infinispan core bundle appears (trace below).
I decided I can live without JMX for a while and disabled it in the config file. This one gone, but now another class is not accessible.
It seems like class loader issue.
Have anyone succeded to run Infinispan in OSGi?
Cheers, Ivo
P.S. If someone is interested I can share the scripts, though they are not really worthy if Infinispan is not running in the end.
2010-08-31 16:04:19,766 18610 [SCR Component Actor] ERROR org.infinispan.jmx.AbstractJmxRegistration - Could not instantiate MBeanServerLookup('org.infinispan.jmx.PlatformMBeanServerLookup')
java.lang.ClassNotFoundException: org.infinispan.jmx.PlatformMBeanServerLookup
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.infinispan.util.Util.loadClass(Util.java:56)
at org.infinispan.util.Util.getInstance(Util.java:86)
at org.infinispan.jmx.AbstractJmxRegistration.getMBeanServer(AbstractJmxRegistration.java:64)
at org.infinispan.jmx.AbstractJmxRegistration.registerMBeans(AbstractJmxRegistration.java:51)
at org.infinispan.jmx.CacheManagerJmxRegistration.start(CacheManagerJmxRegistration.java:39)
at org.infinispan.manager.DefaultCacheManager.start(DefaultCacheManager.java:515)
at org.infinispan.manager.DefaultCacheManager.<init>(DefaultCacheManager.java:336)
at org.infinispan.manager.DefaultCacheManager.<init>(DefaultCacheManager.java:302)