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

classic Classic list List threaded Threaded
2 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