You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Marcus Bond <ma...@devasoftware.co.uk> on 2014/10/07 12:46:02 UTC

Custom install cannot resolve wrapped dependency

I am receiving the following error but the system folder includes the
jandex1.1.0.Final jar file

Is there a way to get around this bug?

SEVERE: Could not launch framework
java.lang.RuntimeException: Error installing bundle listed in
startup.properties with url: wrap:mvn:org.jboss/jandex/1.1.0.Final and
startlevel: 30
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:org.jboss/jandex/1.1.0.Final
at
org.apache.karaf.main.util.SimpleMavenResolver.resolve(SimpleMavenResolver.java:59)
at org.apache.karaf.main.Main.installAndStartBundles(Main.java:383)
... 2 more


Regards,
Marcus.

Re: Custom install cannot resolve wrapped dependency

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Marcus,

To move a feature from startup to featuresBoot:
- the features repo has to be in compile scope
- the features should not be in <startupFeatures/> but in 
<bootFeatures/> in the install-kar goal configuration.

Regards
JB

On 10/07/2014 03:44 PM, Marcus Bond wrote:
> Ok so as I'm using the maven-bundle-plugin it should be ok?
>
> Another issue I am having is with getting artifacts from repositories.
>
> The dependencies my custom install uses are as follows..
> <dependency>
> <groupId>org.apache.karaf.features</groupId>
> <artifactId>framework</artifactId>
> <version>3.0.1</version>
> <type>kar</type>
> </dependency>
> <dependency>
> <groupId>org.apache.karaf.features</groupId>
> <artifactId>standard</artifactId>
> <version>3.0.1</version>
> <classifier>features</classifier>
> <type>xml</type>
> </dependency>
> <dependency>
> <groupId>org.apache.karaf.features</groupId>
> <artifactId>enterprise</artifactId>
> <version>3.0.1</version>
> <classifier>features</classifier>
> <type>xml</type>
> </dependency>
> <dependency>
> <groupId>org.apache.karaf.features</groupId>
> <artifactId>spring</artifactId>
> <version>3.0.1</version>
> <classifier>features</classifier>
> <type>xml</type>
> </dependency>
> <dependency>
> <groupId>org.apache.cxf.karaf</groupId>
> <artifactId>apache-cxf</artifactId>
> <version>3.0.1</version>
> <classifier>features</classifier>
> <type>xml</type>
> <!-- scope>runtime</scope-->
> </dependency>
>
>
> So far I have required adding the
> http://repository.springsource.com/maven/bundles/release and
> http://repository.springsource.com/maven/bundles/external repositories
> to my pom but now the build complains about not being able to
> obtain org.eclipse.gemini.blueprint related jars. I also was not
> successful in finding out a repository that serves them.. any ideas?
> M
>
> On Tue, Oct 7, 2014 at 1:25 PM, Jean-Baptiste Onofré <jb@nanthrax.net
> <ma...@nanthrax.net>> wrote:
>
>     Hi Marcus,
>
>     the startup.properties can contain only bundles. So, you can create
>     uber bundles (embedded other bundles) using the maven-shade-plugin,
>     or directly the maven-bundle-plugin.
>
>     Regards
>     JB
>
>     On 10/07/2014 02:17 PM, Marcus Bond wrote:
>
>         Hi, yes that would be great.
>
>         I'm worried now though that we have other OSGi bundles of our
>         own that
>         have embedded dependency libs that are not OSGi bundles and
>         therefore
>         will also require "wrap", is this going to be a problem with
>         startup?
>
>         Regards,
>         Marcus.
>
>         On Tue, Oct 7, 2014 at 12:57 PM, Jean-Baptiste Onofré
>         <jb@nanthrax.net <ma...@nanthrax.net>
>         <mailto:jb@nanthrax.net <ma...@nanthrax.net>>> wrote:
>
>              Hi,
>
>              it's due to the fact that jandex is not an OSGi bundle,
>         that's why
>              it's prefixed with wrap.
>
>              I guess that you don't need jandex in the
>         startup.properties (but
>              more as a featuresBoot). You can tweak the install-kar goal.
>
>              Do you want some help around that ?
>
>              Regards
>              JB
>
>
>              On 10/07/2014 12:46 PM, Marcus Bond wrote:
>
>                  I am receiving the following error but the system folder
>                  includes the
>                  jandex1.1.0.Final jar file
>
>                  Is there a way to get around this bug?
>
>                  SEVERE: Could not launch framework
>                  java.lang.RuntimeException: Error installing bundle
>         listed in
>                  startup.properties with url:
>                  wrap:mvn:org.jboss/jandex/1.1.____0.Final and
>                  startlevel: 30
>                  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:org.jboss/jandex/1.1.____0.Final
>                  at
>
>         org.apache.karaf.main.util.____SimpleMavenResolver.resolve(____SimpleMavenResolver.java:59)
>                  at
>
>         org.apache.karaf.main.Main.____installAndStartBundles(Main.____java:383)
>                  ... 2 more
>
>
>                  Regards,
>                  Marcus.
>
>
>              --
>              Jean-Baptiste Onofré
>         jbonofre@apache.org <ma...@apache.org>
>         <mailto:jbonofre@apache.org <ma...@apache.org>>
>         http://blog.nanthrax.net
>              Talend - http://www.talend.com
>
>
>
>     --
>     Jean-Baptiste Onofré
>     jbonofre@apache.org <ma...@apache.org>
>     http://blog.nanthrax.net
>     Talend - http://www.talend.com
>
>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

RE: Custom install cannot resolve wrapped dependency

Posted by Benjamin Debeerst <Be...@younicos.com>.
Hi Marcus,

I have no idea about the repos, but as an addition to the startup: Instead of specifying the bundles in the startup.properties, the org.apache.karaf.features.cfg can contain startup features, and features can contain wrap: URLs. So if you don’t need to start up your lib bundles at a very early stage for any reason (which should be an exceptional case anyways), you could work around the problem by pre-installing those lib bundles via pre-installing a feature.

Regards,
Benjamin

From: Marcus Bond [mailto:marcus@devasoftware.co.uk]
Sent: Dienstag, 7. Oktober 2014 15:45
To: user@karaf.apache.org
Subject: Re: Custom install cannot resolve wrapped dependency

Ok so as I'm using the maven-bundle-plugin it should be ok?

Another issue I am having is with getting artifacts from repositories.

The dependencies my custom install uses are as follows..
                        <dependency>
                                    <groupId>org.apache.karaf.features</groupId>
                                    <artifactId>framework</artifactId>
                                    <version>3.0.1</version>
                                    <type>kar</type>
                        </dependency>
                        <dependency>
                                    <groupId>org.apache.karaf.features</groupId>
                                    <artifactId>standard</artifactId>
                                    <version>3.0.1</version>
                                    <classifier>features</classifier>
                                    <type>xml</type>
                        </dependency>
                        <dependency>
                                    <groupId>org.apache.karaf.features</groupId>
                                    <artifactId>enterprise</artifactId>
                                    <version>3.0.1</version>
                                    <classifier>features</classifier>
                                    <type>xml</type>
                        </dependency>
                        <dependency>
                                    <groupId>org.apache.karaf.features</groupId>
                                    <artifactId>spring</artifactId>
                                    <version>3.0.1</version>
                                    <classifier>features</classifier>
                                    <type>xml</type>
                        </dependency>
                        <dependency>
                                    <groupId>org.apache.cxf.karaf</groupId>
                                    <artifactId>apache-cxf</artifactId>
                                    <version>3.0.1</version>
                                    <classifier>features</classifier>
                                    <type>xml</type>
                                    <!-- scope>runtime</scope-->
                        </dependency>


So far I have required adding the http://repository.springsource.com/maven/bundles/release and http://repository.springsource.com/maven/bundles/external repositories to my pom but now the build complains about not being able to obtain org.eclipse.gemini.blueprint related jars. I also was not successful in finding out a repository that serves them.. any ideas?
M

On Tue, Oct 7, 2014 at 1:25 PM, Jean-Baptiste Onofré <jb...@nanthrax.net>> wrote:
Hi Marcus,

the startup.properties can contain only bundles. So, you can create uber bundles (embedded other bundles) using the maven-shade-plugin, or directly the maven-bundle-plugin.

Regards
JB

On 10/07/2014 02:17 PM, Marcus Bond wrote:
Hi, yes that would be great.

I'm worried now though that we have other OSGi bundles of our own that
have embedded dependency libs that are not OSGi bundles and therefore
will also require "wrap", is this going to be a problem with startup?

Regards,
Marcus.

On Tue, Oct 7, 2014 at 12:57 PM, Jean-Baptiste Onofré <jb...@nanthrax.net>
<ma...@nanthrax.net>>> wrote:

    Hi,

    it's due to the fact that jandex is not an OSGi bundle, that's why
    it's prefixed with wrap.

    I guess that you don't need jandex in the startup.properties (but
    more as a featuresBoot). You can tweak the install-kar goal.

    Do you want some help around that ?

    Regards
    JB


    On 10/07/2014 12:46 PM, Marcus Bond wrote:

        I am receiving the following error but the system folder
        includes the
        jandex1.1.0.Final jar file

        Is there a way to get around this bug?

        SEVERE: Could not launch framework
        java.lang.RuntimeException: Error installing bundle listed in
        startup.properties with url:
        wrap:mvn:org.jboss/jandex/1.1.__0.Final and
        startlevel: 30
        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:org.jboss/jandex/1.1.__0.Final
        at
        org.apache.karaf.main.util.__SimpleMavenResolver.resolve(__SimpleMavenResolver.java:59)
        at
        org.apache.karaf.main.Main.__installAndStartBundles(Main.__java:383)
        ... 2 more


        Regards,
        Marcus.


    --
    Jean-Baptiste Onofré
    jbonofre@apache.org<ma...@apache.org> <ma...@apache.org>>
    http://blog.nanthrax.net
    Talend - http://www.talend.com


--
Jean-Baptiste Onofré
jbonofre@apache.org<ma...@apache.org>
http://blog.nanthrax.net
Talend - http://www.talend.com


Re: Custom install cannot resolve wrapped dependency

Posted by Marcus Bond <ma...@devasoftware.co.uk>.
Ok so as I'm using the maven-bundle-plugin it should be ok?

Another issue I am having is with getting artifacts from repositories.

The dependencies my custom install uses are as follows..
<dependency>
<groupId>org.apache.karaf.features</groupId>
<artifactId>framework</artifactId>
<version>3.0.1</version>
<type>kar</type>
</dependency>
<dependency>
<groupId>org.apache.karaf.features</groupId>
<artifactId>standard</artifactId>
<version>3.0.1</version>
<classifier>features</classifier>
<type>xml</type>
</dependency>
<dependency>
<groupId>org.apache.karaf.features</groupId>
<artifactId>enterprise</artifactId>
<version>3.0.1</version>
<classifier>features</classifier>
<type>xml</type>
</dependency>
<dependency>
<groupId>org.apache.karaf.features</groupId>
<artifactId>spring</artifactId>
<version>3.0.1</version>
<classifier>features</classifier>
<type>xml</type>
</dependency>
<dependency>
<groupId>org.apache.cxf.karaf</groupId>
<artifactId>apache-cxf</artifactId>
<version>3.0.1</version>
<classifier>features</classifier>
<type>xml</type>
<!-- scope>runtime</scope-->
</dependency>


So far I have required adding the
http://repository.springsource.com/maven/bundles/release and
http://repository.springsource.com/maven/bundles/external repositories to
my pom but now the build complains about not being able to
obtain org.eclipse.gemini.blueprint related jars. I also was not successful
in finding out a repository that serves them.. any ideas?
M

On Tue, Oct 7, 2014 at 1:25 PM, Jean-Baptiste Onofré <jb...@nanthrax.net>
wrote:

> Hi Marcus,
>
> the startup.properties can contain only bundles. So, you can create uber
> bundles (embedded other bundles) using the maven-shade-plugin, or directly
> the maven-bundle-plugin.
>
> Regards
> JB
>
> On 10/07/2014 02:17 PM, Marcus Bond wrote:
>
>> Hi, yes that would be great.
>>
>> I'm worried now though that we have other OSGi bundles of our own that
>> have embedded dependency libs that are not OSGi bundles and therefore
>> will also require "wrap", is this going to be a problem with startup?
>>
>> Regards,
>> Marcus.
>>
>> On Tue, Oct 7, 2014 at 12:57 PM, Jean-Baptiste Onofré <jb@nanthrax.net
>> <ma...@nanthrax.net>> wrote:
>>
>>     Hi,
>>
>>     it's due to the fact that jandex is not an OSGi bundle, that's why
>>     it's prefixed with wrap.
>>
>>     I guess that you don't need jandex in the startup.properties (but
>>     more as a featuresBoot). You can tweak the install-kar goal.
>>
>>     Do you want some help around that ?
>>
>>     Regards
>>     JB
>>
>>
>>     On 10/07/2014 12:46 PM, Marcus Bond wrote:
>>
>>         I am receiving the following error but the system folder
>>         includes the
>>         jandex1.1.0.Final jar file
>>
>>         Is there a way to get around this bug?
>>
>>         SEVERE: Could not launch framework
>>         java.lang.RuntimeException: Error installing bundle listed in
>>         startup.properties with url:
>>         wrap:mvn:org.jboss/jandex/1.1.__0.Final and
>>         startlevel: 30
>>         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:org.jboss/jandex/1.1.__0.Final
>>         at
>>         org.apache.karaf.main.util.__SimpleMavenResolver.resolve(__
>> SimpleMavenResolver.java:59)
>>         at
>>         org.apache.karaf.main.Main.__installAndStartBundles(Main.__
>> java:383)
>>         ... 2 more
>>
>>
>>         Regards,
>>         Marcus.
>>
>>
>>     --
>>     Jean-Baptiste Onofré
>>     jbonofre@apache.org <ma...@apache.org>
>>     http://blog.nanthrax.net
>>     Talend - http://www.talend.com
>>
>>
>>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>

Re: Custom install cannot resolve wrapped dependency

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Marcus,

the startup.properties can contain only bundles. So, you can create uber 
bundles (embedded other bundles) using the maven-shade-plugin, or 
directly the maven-bundle-plugin.

Regards
JB

On 10/07/2014 02:17 PM, Marcus Bond wrote:
> Hi, yes that would be great.
>
> I'm worried now though that we have other OSGi bundles of our own that
> have embedded dependency libs that are not OSGi bundles and therefore
> will also require "wrap", is this going to be a problem with startup?
>
> Regards,
> Marcus.
>
> On Tue, Oct 7, 2014 at 12:57 PM, Jean-Baptiste Onofré <jb@nanthrax.net
> <ma...@nanthrax.net>> wrote:
>
>     Hi,
>
>     it's due to the fact that jandex is not an OSGi bundle, that's why
>     it's prefixed with wrap.
>
>     I guess that you don't need jandex in the startup.properties (but
>     more as a featuresBoot). You can tweak the install-kar goal.
>
>     Do you want some help around that ?
>
>     Regards
>     JB
>
>
>     On 10/07/2014 12:46 PM, Marcus Bond wrote:
>
>         I am receiving the following error but the system folder
>         includes the
>         jandex1.1.0.Final jar file
>
>         Is there a way to get around this bug?
>
>         SEVERE: Could not launch framework
>         java.lang.RuntimeException: Error installing bundle listed in
>         startup.properties with url:
>         wrap:mvn:org.jboss/jandex/1.1.__0.Final and
>         startlevel: 30
>         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:org.jboss/jandex/1.1.__0.Final
>         at
>         org.apache.karaf.main.util.__SimpleMavenResolver.resolve(__SimpleMavenResolver.java:59)
>         at
>         org.apache.karaf.main.Main.__installAndStartBundles(Main.__java:383)
>         ... 2 more
>
>
>         Regards,
>         Marcus.
>
>
>     --
>     Jean-Baptiste Onofré
>     jbonofre@apache.org <ma...@apache.org>
>     http://blog.nanthrax.net
>     Talend - http://www.talend.com
>
>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: Custom install cannot resolve wrapped dependency

Posted by Achim Nierbeck <bc...@googlemail.com>.
Hi Marcus,

if those "embedded" libs are embedded inside your bundle, this isn't an
issue.
If you have the as external bundles, make sure you wrap those either,
before deployment by shading those  (as servicemix does it)
Or by changing the maven coordinate slightly by adding the wrap:
url-handler before that.

regards, Achim

2014-10-07 14:17 GMT+02:00 Marcus Bond <ma...@devasoftware.co.uk>:

> Hi, yes that would be great.
>
> I'm worried now though that we have other OSGi bundles of our own that
> have embedded dependency libs that are not OSGi bundles and therefore will
> also require "wrap", is this going to be a problem with startup?
>
> Regards,
> Marcus.
>
> On Tue, Oct 7, 2014 at 12:57 PM, Jean-Baptiste Onofré <jb...@nanthrax.net>
> wrote:
>
>> Hi,
>>
>> it's due to the fact that jandex is not an OSGi bundle, that's why it's
>> prefixed with wrap.
>>
>> I guess that you don't need jandex in the startup.properties (but more as
>> a featuresBoot). You can tweak the install-kar goal.
>>
>> Do you want some help around that ?
>>
>> Regards
>> JB
>>
>>
>> On 10/07/2014 12:46 PM, Marcus Bond wrote:
>>
>>> I am receiving the following error but the system folder includes the
>>> jandex1.1.0.Final jar file
>>>
>>> Is there a way to get around this bug?
>>>
>>> SEVERE: Could not launch framework
>>> java.lang.RuntimeException: Error installing bundle listed in
>>> startup.properties with url: wrap:mvn:org.jboss/jandex/1.1.0.Final and
>>> startlevel: 30
>>> 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:org.jboss/jandex/1.1.0.Final
>>> at
>>> org.apache.karaf.main.util.SimpleMavenResolver.resolve(
>>> SimpleMavenResolver.java:59)
>>> at org.apache.karaf.main.Main.installAndStartBundles(Main.java:383)
>>> ... 2 more
>>>
>>>
>>> Regards,
>>> Marcus.
>>>
>>
>> --
>> Jean-Baptiste Onofré
>> jbonofre@apache.org
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com
>>
>
>


-- 

Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>

Software Architect / Project Manager / Scrum Master

Re: Custom install cannot resolve wrapped dependency

Posted by Marcus Bond <ma...@devasoftware.co.uk>.
Hi, yes that would be great.

I'm worried now though that we have other OSGi bundles of our own that have
embedded dependency libs that are not OSGi bundles and therefore will also
require "wrap", is this going to be a problem with startup?

Regards,
Marcus.

On Tue, Oct 7, 2014 at 12:57 PM, Jean-Baptiste Onofré <jb...@nanthrax.net>
wrote:

> Hi,
>
> it's due to the fact that jandex is not an OSGi bundle, that's why it's
> prefixed with wrap.
>
> I guess that you don't need jandex in the startup.properties (but more as
> a featuresBoot). You can tweak the install-kar goal.
>
> Do you want some help around that ?
>
> Regards
> JB
>
>
> On 10/07/2014 12:46 PM, Marcus Bond wrote:
>
>> I am receiving the following error but the system folder includes the
>> jandex1.1.0.Final jar file
>>
>> Is there a way to get around this bug?
>>
>> SEVERE: Could not launch framework
>> java.lang.RuntimeException: Error installing bundle listed in
>> startup.properties with url: wrap:mvn:org.jboss/jandex/1.1.0.Final and
>> startlevel: 30
>> 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:org.jboss/jandex/1.1.0.Final
>> at
>> org.apache.karaf.main.util.SimpleMavenResolver.resolve(
>> SimpleMavenResolver.java:59)
>> at org.apache.karaf.main.Main.installAndStartBundles(Main.java:383)
>> ... 2 more
>>
>>
>> Regards,
>> Marcus.
>>
>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>

Re: Custom install cannot resolve wrapped dependency

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi,

it's due to the fact that jandex is not an OSGi bundle, that's why it's 
prefixed with wrap.

I guess that you don't need jandex in the startup.properties (but more 
as a featuresBoot). You can tweak the install-kar goal.

Do you want some help around that ?

Regards
JB

On 10/07/2014 12:46 PM, Marcus Bond wrote:
> I am receiving the following error but the system folder includes the
> jandex1.1.0.Final jar file
>
> Is there a way to get around this bug?
>
> SEVERE: Could not launch framework
> java.lang.RuntimeException: Error installing bundle listed in
> startup.properties with url: wrap:mvn:org.jboss/jandex/1.1.0.Final and
> startlevel: 30
> 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:org.jboss/jandex/1.1.0.Final
> at
> org.apache.karaf.main.util.SimpleMavenResolver.resolve(SimpleMavenResolver.java:59)
> at org.apache.karaf.main.Main.installAndStartBundles(Main.java:383)
> ... 2 more
>
>
> Regards,
> Marcus.

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com