<feature name="hornetq-mgmt" version="1.0.0">
<bundle>mvn:org.hornetq/hornetq-core/2.2.2.Final</bundle>
<bundle>mvn:ebento.emb/hornetq-mgmt/1.0.0</bundle>
</feature>
The mgmt bundle is one I build and the core bundle is a dependency that
maven sucked in. The naming all looks right according to the layout of the
maven repository. I get a null pointer when installing the feature.
Experimentation shows it is happening only on the "core" bundle. The only
difference I can see between the two bundles is that the one I built adds an
resource entry in maven's .m2/repository/repository.xml. The downloaded
bundle has no such entry. Is that what is causing this? If so, how can I
get karaf to load dependency bundles that I did not build?
DETAILS BELOW
java.lang.NullPointerException
at
org.apache.karaf.features.internal.FeaturesServiceImpl.installBundleIfNeeded(FeaturesServiceImpl.java:660)
at
org.apache.karaf.features.internal.FeaturesServiceImpl.doInstallFeature(FeaturesServiceImpl.java:474)
at
org.apache.karaf.features.internal.FeaturesServiceImpl.installFeatures(FeaturesServiceImpl.java:292)
at
org.apache.karaf.features.internal.FeaturesServiceImpl.installFeature(FeaturesServiceImpl.java:280)
at
org.apache.karaf.features.internal.FeaturesServiceImpl.installFeature(FeaturesServiceImpl.java:276)
at
org.apache.karaf.features.command.InstallFeatureCommand.doExecute(InstallFeatureCommand.java:62)
at
org.apache.karaf.features.command.FeaturesCommandSupport.doExecute(FeaturesCommandSupport.java:39)
at
org.apache.karaf.shell.console.OsgiCommandSupport.execute(OsgiCommandSupport.java:38)
...
SOURCE CODE
655 protected Bundle installBundleIfNeeded(InstallationState state,
BundleInfo bundleInfo, int defaultStartLevel, boolean verbose) throws
IOException, BundleException {
656 InputStream is;
657 String bundleLocation = bundleInfo.getLocation();
658 LOGGER.debug("Checking " + bundleLocation);
659 try {
660 is = new BufferedInputStream(new
URL(bundleLocation).openStream());
661 } catch (RuntimeException e) {
Line numbers are probably slightly off from the code I am actually running.
Best bet for a null pointer to me in this code and what follows after 661
looks like bundleInfo.getLocation() on line 657.
--
View this message in context:
http://karaf.922171.n3.nabble.com/feature-bundle-loading-issue-tp3146786p3146786.html
Sent from the Karaf - User mailing list archive at Nabble.com.