-
1. Re: Infinispan 5.0.0.CR7 and OSGi
craigching Jul 8, 2011 11:19 AM (in response to craigching)This:
// Modules must be on the same classloader as Infinispan
// TODO revise this assumption
protected static List<ModuleLifecycle> moduleLifecycles = ModuleProperties.resolveModuleLifecycles(null);
Appears to be my immediate problem (number 2 above), Infinispan isn't loading the query module. I'm not sure how to resolve this, I'm not even sure yet if a bundle fragment will allow me to inject the classes into infinispan-core since it appears to use the System class loader. Am I wrong about that? Back to digging ...
-
2. Re: Infinispan 5.0.0.CR7 and OSGi
craigching Jul 8, 2011 11:47 AM (in response to craigching)Also as an FYI, this code in ModuleProperties.loadModuleProperties():
Collection<URL> resources = new FileLookup().lookupFileLocations(MODULE_PROPERTIES_FILENAME, cl);
if (resources == null)
throw new IOException("Could not find " + MODULE_PROPERTIES_FILENAME
+ " files on classpath for module " + moduleName);
The if (resources == null) condition will never be true because of:
Collection<URL> urls = new HashSet<URL>();
...
return urls;
in FileLookup.getAsURLsFromClassLoader(). If it had, it might have been easier to figure out what was going wrong.
-
3. Re: Infinispan 5.0.0.CR7 and OSGi
pmuir Jul 12, 2011 3:59 PM (in response to craigching)Infinispan uses the system classloader and the Infinispan classloader to try to load modules. Looks like this assumption is wrong in OSGi, please file a JIRA issue for this, we can try to unravel it a bit more ;-)
Please include the details you have dug up on this thread.
-
4. Re: Infinispan 5.0.0.CR7 and OSGi
craigching Jul 12, 2011 5:37 PM (in response to pmuir)Thanks for the response Pete. I've opened:
https://issues.jboss.org/browse/ISPN-1232
Let me know if I can be of any assistance, though I don't really know where to begin ;-)