You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Jonathan Vila Lopez <jo...@gmail.com> on 2014/11/16 09:07:12 UTC
Getting an NPE when adding features in Karaf 3.0.2
Hello
I have a features file and installed it without problems in Karaf 3.0.1 but
when switching to Karaf 3.0.2 I get this Exception :
2014-11-16 08:56:29,539 | WARN | h for user karaf | FeatureValidationUtil
| 20 - org.apache.karaf.features.core - 3.0.2 | Old style
feature file without namespace found (URI:
mvn:org.apache.camel.karaf/apache-camel/2.12.2/xml/features). This format
is deprecated and support for it will soon be removed
2014-11-16 08:56:29,632 | ERROR | h for user karaf | ShellUtil
| 25 - org.apache.karaf.shell.console - 3.0.2 | Exception caught
while executing command
java.lang.NullPointerException
at
java.util.concurrent.ConcurrentHashMap.putVal(ConcurrentHashMap.java:1011)[:1.8.0_25]
at
java.util.concurrent.ConcurrentHashMap.put(ConcurrentHashMap.java:1006)[:1.8.0_25]
at
org.apache.karaf.features.internal.FeaturesServiceImpl.restoreRepository(FeaturesServiceImpl.java:292)
at
org.apache.karaf.features.internal.FeaturesServiceImpl.refreshRepository(FeaturesServiceImpl.java:220)
at
org.apache.karaf.features.internal.FeaturesServiceImpl.addRepository(FeaturesServiceImpl.java:192)
at Proxye06cd173_0d0c_4293_8c29_1e47e37f998e.addRepository(Unknown
Source)
at Proxye24e1926_0420_4485_bb7d_45eeb7fc2ae4.addRepository(Unknown
Source)
at
org.apache.karaf.features.command.RepoAddCommand.doExecute(RepoAddCommand.java:56)
at
org.apache.karaf.shell.console.AbstractAction.execute(AbstractAction.java:33)[25:org.apache.karaf.shell.console:3.0.2]
at
org.apache.karaf.shell.commands.basic.AbstractCommand.execute(AbstractCommand.java:33)[25:org.apache.karaf.shell.console:3.0.2]
at Proxybab45cb6_3af0_4c02_8561_fdaffebc8b7b.execute(Unknown
Source)[:]
This is my feature file :
<?xml version="1.0" encoding="UTF-8"?>
<features name="Tesipro" xmlns="
http://karaf.apache.org/xmlns/features/v1.2.0">
<repository>mvn:org.apache.camel.karaf/apache-camel/2.12.2/xml/features</repository>
<repository>mvn:org.apache.cxf.karaf/apache-cxf/2.7.7/xml/features</repository>
<feature name="tesipro-requisites" resolver="(obr)" start-level="60">
<!-- Container dependencies -->
<feature>transaction</feature>
<feature >jdbc</feature>
<feature >openjpa</feature>
<feature>jndi</feature>
<feature version="3.2.4.RELEASE">spring</feature>
<bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.quartz/1.8.6_1</bundle>
<bundle>wrap:mvn:com.google.code.liquidform/liquidform.jpa/1.0.0</bundle>
<bundle>wrap:mvn:org.projectlombok/lombok/1.12.6</bundle>
<bundle>mvn:com.h2database/h2/1.3.167</bundle>
<bundle>mvn:com.sun.mail/javax.mail/1.5.0</bundle>
<!-- database drivers -->
<bundle>wrap:mvn:net.sourceforge.jtds/jtds/1.3.1</bundle>
<!-- depending camel features -->
<feature version="2.12.2">camel-blueprint</feature>
<feature version="2.12.2">camel-jdbc</feature>
<feature version="2.12.2">camel-cxf</feature>
<feature version="2.12.2">camel-quartz</feature>
<feature version="2.12.2">camel-stream</feature>
<feature version="2.12.2">camel-http</feature>
</feature>
</features>
And I try to add the features :
feature:repo-add -i mvn:com.tesipro/Api/2.0/xml/features
By the way , I'm using Java8.
Thank you
[image: Inline image 2]
* Jonathan Vila ** <https://www.twitter.com/jonathan_vila>
<http://www.linkedin.com/in/jonathanvila>*
* jonathan.vila@gmail.com <jo...@gmail.com>*