"Bundle was not resolved because of a uses contraint violation" when deploying a feature/bundle

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

"Bundle was not resolved because of a uses contraint violation" when deploying a feature/bundle

Loko
Hi

We face an issue deploying kar files (Camel routes developped with Talend OS
ESB 6.3), see error below.

The bundle status is "resolved", but starting it manually runs into this
error again. It always happens with the first bundle deployed in Karaf.
Sometimes, deploying a 2nd or a third bundle makes all of them start
sucessfully. Sometimes it doesn't, then we have to restart Karaf and all
bundles start successfully.

It happens either copying the kar file in /deploy, or unzipping it and using
feature:install.

We don''t know how to avoid this and have the bundle deploy correctly from
first try.

Thanks
Arnaud

Error executing command: Error executing command on bundles:
        Error starting bundle 277: Could not resolve module:
gfc.R_BROKER_LOGS [277]
  Unresolved requirement: Import-Package: com.ibm.icu.text;
resolution:="optional"
  Unresolved requirement: Import-Package: com.sun.security.auth.module;
resolution:="optional"
  Unresolved requirement: Import-Package: oracle.aurora.rdbms;
resolution:="optional"
  Unresolved requirement: Import-Package: oracle.i18n.text;
resolution:="optional"
  Unresolved requirement: Import-Package: oracle.i18n.text.converter;
resolution:="optional"
  Unresolved requirement: Import-Package: oracle.ons; resolution:="optional"
  Unresolved requirement: Import-Package: oracle.security.pki;
resolution:="optional"
  Unresolved requirement: Import-Package: oracle.xml.binxml;
resolution:="optional"
  Unresolved requirement: Import-Package: oracle.xml.parser.v2;
resolution:="optional"
  Unresolved requirement: Import-Package: oracle.xml.scalable;
resolution:="optional"
  Unresolved requirement: Import-Package: sun.security.action;
resolution:="optional"
  Unresolved requirement: Import-Package: sun.security.util;
resolution:="optional"
  Bundle was not resolved because of a uses contraint violation.
  org.osgi.service.resolver.ResolutionException: Uses constraint violation.
Unable to resolve resource gfc.R_BROKER_LOGS [osgi.identity;
osgi.identity="gfc.R_BROKER_LOGS"; type="osgi.bundle";
version:Version="0.3.0"] because it is exposed to package
'javax.transaction.xa' from resources org.apache.aries.transaction.manager
[osgi.identity; osgi.identity="org.apache.aries.transaction.manager";
type="osgi.bundle"; version:Version="1.1.1"] and
org.apache.geronimo.specs.geronimo-jta_1.1_spec [osgi.identity;
osgi.identity="org.apache.geronimo.specs.geronimo-jta_1.1_spec";
type="osgi.bundle"; version:Version="1.1.1"] via two dependency chains.

Chain 1:
  gfc.R_BROKER_LOGS [osgi.identity; osgi.identity="gfc.R_BROKER_LOGS";
type="osgi.bundle"; version:Version="0.3.0"]
    import: (osgi.wiring.package=javax.transaction.xa)
     |
    export: osgi.wiring.package: javax.transaction.xa
  org.apache.aries.transaction.manager [osgi.identity;
osgi.identity="org.apache.aries.transaction.manager"; type="osgi.bundle";
version:Version="1.1.1"]

Chain 2:
  gfc.R_BROKER_LOGS [osgi.identity; osgi.identity="gfc.R_BROKER_LOGS";
type="osgi.bundle"; version:Version="0.3.0"]
    import: (osgi.wiring.package=javax.jms)
     |
    export: osgi.wiring.package=javax.jms; uses:=javax.transaction.xa
  org.apache.geronimo.specs.geronimo-jms_1.1_spec [osgi.identity;
osgi.identity="org.apache.geronimo.specs.geronimo-jms_1.1_spec";
type="osgi.bundle"; version:Version="1.1.1"]
    import: (osgi.wiring.package=javax.transaction.xa)
     |
    export: osgi.wiring.package: javax.transaction.xa
  org.apache.geronimo.specs.geronimo-jta_1.1_spec [osgi.identity;
osgi.identity="org.apache.geronimo.specs.geronimo-jta_1.1_spec";
type="osgi.bundle"; version:Version="1.1.1"]





--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
Reply | Threaded
Open this post in threaded view
|

Re: "Bundle was not resolved because of a uses contraint violation" when deploying a feature/bundle

jbonofre
Hi,

after the installation, you can perform a refresh to resolve the chains.

It happens because you have two bundles providing the same package (aries
transaction manager and geronimo jta).

What are the features installed in your runtime ?

Regards
JB

On 12/13/2017 12:06 PM, Loko wrote:

> Hi
>
> We face an issue deploying kar files (Camel routes developped with Talend OS
> ESB 6.3), see error below.
>
> The bundle status is "resolved", but starting it manually runs into this
> error again. It always happens with the first bundle deployed in Karaf.
> Sometimes, deploying a 2nd or a third bundle makes all of them start
> sucessfully. Sometimes it doesn't, then we have to restart Karaf and all
> bundles start successfully.
>
> It happens either copying the kar file in /deploy, or unzipping it and using
> feature:install.
>
> We don''t know how to avoid this and have the bundle deploy correctly from
> first try.
>
> Thanks
> Arnaud
>
> Error executing command: Error executing command on bundles:
>          Error starting bundle 277: Could not resolve module:
> gfc.R_BROKER_LOGS [277]
>    Unresolved requirement: Import-Package: com.ibm.icu.text;
> resolution:="optional"
>    Unresolved requirement: Import-Package: com.sun.security.auth.module;
> resolution:="optional"
>    Unresolved requirement: Import-Package: oracle.aurora.rdbms;
> resolution:="optional"
>    Unresolved requirement: Import-Package: oracle.i18n.text;
> resolution:="optional"
>    Unresolved requirement: Import-Package: oracle.i18n.text.converter;
> resolution:="optional"
>    Unresolved requirement: Import-Package: oracle.ons; resolution:="optional"
>    Unresolved requirement: Import-Package: oracle.security.pki;
> resolution:="optional"
>    Unresolved requirement: Import-Package: oracle.xml.binxml;
> resolution:="optional"
>    Unresolved requirement: Import-Package: oracle.xml.parser.v2;
> resolution:="optional"
>    Unresolved requirement: Import-Package: oracle.xml.scalable;
> resolution:="optional"
>    Unresolved requirement: Import-Package: sun.security.action;
> resolution:="optional"
>    Unresolved requirement: Import-Package: sun.security.util;
> resolution:="optional"
>    Bundle was not resolved because of a uses contraint violation.
>    org.osgi.service.resolver.ResolutionException: Uses constraint violation.
> Unable to resolve resource gfc.R_BROKER_LOGS [osgi.identity;
> osgi.identity="gfc.R_BROKER_LOGS"; type="osgi.bundle";
> version:Version="0.3.0"] because it is exposed to package
> 'javax.transaction.xa' from resources org.apache.aries.transaction.manager
> [osgi.identity; osgi.identity="org.apache.aries.transaction.manager";
> type="osgi.bundle"; version:Version="1.1.1"] and
> org.apache.geronimo.specs.geronimo-jta_1.1_spec [osgi.identity;
> osgi.identity="org.apache.geronimo.specs.geronimo-jta_1.1_spec";
> type="osgi.bundle"; version:Version="1.1.1"] via two dependency chains.
>
> Chain 1:
>    gfc.R_BROKER_LOGS [osgi.identity; osgi.identity="gfc.R_BROKER_LOGS";
> type="osgi.bundle"; version:Version="0.3.0"]
>      import: (osgi.wiring.package=javax.transaction.xa)
>       |
>      export: osgi.wiring.package: javax.transaction.xa
>    org.apache.aries.transaction.manager [osgi.identity;
> osgi.identity="org.apache.aries.transaction.manager"; type="osgi.bundle";
> version:Version="1.1.1"]
>
> Chain 2:
>    gfc.R_BROKER_LOGS [osgi.identity; osgi.identity="gfc.R_BROKER_LOGS";
> type="osgi.bundle"; version:Version="0.3.0"]
>      import: (osgi.wiring.package=javax.jms)
>       |
>      export: osgi.wiring.package=javax.jms; uses:=javax.transaction.xa
>    org.apache.geronimo.specs.geronimo-jms_1.1_spec [osgi.identity;
> osgi.identity="org.apache.geronimo.specs.geronimo-jms_1.1_spec";
> type="osgi.bundle"; version:Version="1.1.1"]
>      import: (osgi.wiring.package=javax.transaction.xa)
>       |
>      export: osgi.wiring.package: javax.transaction.xa
>    org.apache.geronimo.specs.geronimo-jta_1.1_spec [osgi.identity;
> osgi.identity="org.apache.geronimo.specs.geronimo-jta_1.1_spec";
> type="osgi.bundle"; version:Version="1.1.1"]
>
>
>
>
>
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
>

--
Jean-Baptiste Onofré
[hidden email]
http://blog.nanthrax.net
Talend - http://www.talend.com
Reply | Threaded
Open this post in threaded view
|

Re: "Bundle was not resolved because of a uses contraint violation" when deploying a feature/bundle

Loko
Hi JB

Thanks for your answer.

The problem is it also happens for the very first feature/bundle deployed.
And refreshing the bundle does not solve the issue, there is no error during
refresh but the bundle status is still "installed" and starting it again
give the same error.

The first feature/bundle is a Talend-made Camel route, it happens with
anyone we try to install, and it is the only existing feature in Karaf
except, of course, the ones seeded with Karaf itself.

Regards
Arnaud



--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
Reply | Threaded
Open this post in threaded view
|

Re: "Bundle was not resolved because of a uses contraint violation" when deploying a feature/bundle

jbonofre
Hi,

I guess you are deploying the Talend Camel route using a kar right ?

So the kar contains a feature.xml that can trigger installation (probably
without the dependency flag).

I also guess that you are using Talend Runtime, so a custom Karaf distribution
that add some boot features.

Correct ?

I can help you to tweak your Talend runtime to avoid this. Let's talk privately.

Regards
JB

On 01/24/2018 10:04 AM, Loko wrote:

> Hi JB
>
> Thanks for your answer.
>
> The problem is it also happens for the very first feature/bundle deployed.
> And refreshing the bundle does not solve the issue, there is no error during
> refresh but the bundle status is still "installed" and starting it again
> give the same error.
>
> The first feature/bundle is a Talend-made Camel route, it happens with
> anyone we try to install, and it is the only existing feature in Karaf
> except, of course, the ones seeded with Karaf itself.
>
> Regards
> Arnaud
>
>
>
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
>

--
Jean-Baptiste Onofré
[hidden email]
http://blog.nanthrax.net
Talend - http://www.talend.com
Reply | Threaded
Open this post in threaded view
|

Re: "Bundle was not resolved because of a uses contraint violation" when deploying a feature/bundle

Loko
That's it, a kar file and the Talend custom Karaf distribution.

Thanks in advance for your help, and OK to talk about this privately.



--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html