You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by nibblenabbler <pa...@gmail.com> on 2014/09/03 19:28:01 UTC

Karaf 3.0.1 Wrap Bundle Inside Feature

I've created a GIT repo with some example Karaf recipes.  The repo contains
an example of a REST service, UI bundle, KAR and even a custom distro that
ties everything together.  Everything seemed to work fine except until tried
putting a wrapped bundle inside a feature inside my KAR.  I get a
NullPointerException on STDOUT and a RuntimeException in the log file. I
can't seem to put any bundles inside my features file with the wrap
protocol.  I looked at the SimpleMavenResolver code (where the exception
occurs) and my first guess is that it can't handle the wrap protocol?  But
I'm not sure.  Any ideas?

The line that causes the problem is the following addition in my
features.xml file inside my KAR.  The whole project is available on GitHub
for reference (https://github.com/samster/karaf-recipes)

File in question:
https://github.com/samster/karaf-recipes/blob/master/app/src/main/resources/features.xml
-----------------
<feature name="karaf-app-thirdparty-libs">
        <bundle
start-level='90'>wrap:mvn:com.wordnik/swagger-jersey2-jaxrs_2.10/1.3.7</bundle>
</feature>

STDOUT ERROR:
------------------
Error installing bundle listed in startup.properties with url:
wrap:mvn:com.wordnik/swagger-jersey2-jaxrs_2.10/1.3.7 and startlevel: 90
Exception in thread "main" java.lang.NullPointerException
        at org.apache.karaf.main.Main.destroy(Main.java:515)
        at org.apache.karaf.main.Main.main(Main.java:177)

ERROR IN LOG FILE
-----------------------
SEVERE: Could not launch framework
java.lang.RuntimeException: Error installing bundle listed in
startup.properties with url:
wrap:mvn:com.wordnik/swagger-jersey2-jaxrs_2.10/1.3.7 and startlevel: 90
        at org.apache.karaf.main.Main.installAndStartBundles(Main.java:390)
        at org.apache.karaf.main.Main.launch(Main.java:250)
        at org.apache.karaf.main.Main.main(Main.java:171)
Caused by: java.lang.RuntimeException: Could not resolve
wrap:mvn:com.wordnik/swagger-jersey2-jaxrs_2.10/1.3.7
        at
org.apache.karaf.main.util.SimpleMavenResolver.resolve(SimpleMavenResolver.java:59)
        at org.apache.karaf.main.Main.installAndStartBundles(Main.java:383)
        ... 2 more





--
View this message in context: http://karaf.922171.n3.nabble.com/Karaf-3-0-1-Wrap-Bundle-Inside-Feature-tp4035044.html
Sent from the Karaf - User mailing list archive at Nabble.com.