Hi, the NPE occurs here:
tring location = FrameworkUtil.getBundle(Vfs.class).getBundleContext().getBundle(getBundleIdforResourceScan(url.toExternalForm())).getLocation();
I guess. The point is that NPE can come from different part. I think it's more a SMX bundle issue. When does the problem happen ? When the reflection activator is called ? Thanks, Regards JB On 04/18/2016 09:37 AM, mdo wrote:
Hello, I use Karaf 4.0.4 with org.reflections for which I installed the SMX bundle, version 0.9.10. When my bundle (an existing application module I tried to convert to OSGi lately) creates a Reflections instance (in an Activator, but tried other ways, too) a NPE happens in line 320 of Vfs.java: https://github.com/apache/servicemix-bundles/blob/master/reflections-0.9.10/src/main/java/org/reflections/Vfs.java .getBundle on the BundleContext of the Vfs class returns null while the bundle ID returned by getBundleIdforResourceScan(url.toExternalForm()) seems to be correct. I checked that by comparing the returned ID to the output of bundle:list. Any hint on how that can happen? -- View this message in context: http://karaf.922171.n3.nabble.com/NPE-with-org-reflections-tp4046252.html Sent from the Karaf - User mailing list archive at Nabble.com.
-- Jean-Baptiste Onofré [email protected] http://blog.nanthrax.net Talend - http://www.talend.com
