Thanks for the quick reply! It's always a pleasure to ask for help in this
list :)

On 11 June 2018 at 16:35, Jean-Baptiste Onofré <j...@nanthrax.net> wrote:

> Hi,
>
> I'm gonna help on this one, as I also need this in a personal project ;)
>
> I'm starting a "fixing" branch.
>
> Regards
> JB
>
> On 11/06/2018 16:30, Ignasi Barrera wrote:
> > This thread is cross-posted to the jclouds-dev list.
> >
> > We (jclouds) are trying to move our codebase to Java 8 and are stuck
> > with an issue we've found in our Karaf integration that we are not able
> > to understand.
> >
> > We have our codebase compiled with Java 8, and our Karaf
> > integration (built with Java 8 too) updated to use Karaf 4.2.0. We are
> > able to add the generated jclouds features repo to a vanilla Karaf
> > distribution, but after installing a feature for the first time, all
> > subsequent attempts to install a feature, or even to uninstall a just
> > installed one (?!), we get an error similar to the following one. Here
> > is a complete example with a just downloaded Karaf 4.2.0:
> >
> > karaf@root()> feature:repo-add
> > mvn:org.apache.jclouds.karaf/jclouds-karaf/2.2.0-SNAPSHOT/xml/features
> > Adding feature url
> > mvn:org.apache.jclouds.karaf/jclouds-karaf/2.2.0-SNAPSHOT/xml/features
> >
> > karaf@root()> feature:repo-list
> > Repository                        │ URL
> > ──────────────────────────────────┼─────────────────────────
> ────────────────────────────────────────────────────────────────────
> > enterprise-4.2.0                  │
> > mvn:org.apache.karaf.features/enterprise/4.2.0/xml/features
> > pax-transx-0.2.0                  │
> > mvn:org.ops4j.pax.transx/pax-transx-features/0.2.0/xml/features
> > jclouds-2.2.0-SNAPSHOT            │
> > mvn:org.apache.jclouds.karaf/jclouds-karaf/2.2.0-SNAPSHOT/xml/features
> > framework-4.2.0                   │
> > mvn:org.apache.karaf.features/framework/4.2.0/xml/features
> > org.ops4j.pax.web-7.0.0           │
> > mvn:org.ops4j.pax.web/pax-web-features/7.0.0/xml/features
> > hibernate-validator-osgi-features │
> > mvn:org.hibernate.validator/hibernate-validator-osgi-
> karaf-features/6.0.9.Final/xml/features
> > hibernate-osgi                    │
> > mvn:org.hibernate/hibernate-osgi/5.2.9.Final/xml/karaf
> > pax-jms-0.3.0                     │
> > mvn:org.ops4j.pax.jms/pax-jms-features/0.3.0/xml/features
> > org.ops4j.pax.cdi-1.0.0           │
> > mvn:org.ops4j.pax.cdi/pax-cdi-features/1.0.0/xml/features
> > standard-4.2.0                    │
> > mvn:org.apache.karaf.features/standard/4.2.0/xml/features
> > spring-4.2.0                      │
> > mvn:org.apache.karaf.features/spring/4.2.0/xml/features
> > org.ops4j.pax.jdbc-1.2.0          │
> > mvn:org.ops4j.pax.jdbc/pax-jdbc-features/1.2.0/xml/features
> > aries-jpa-2.6.1                   │
> > mvn:org.apache.aries.jpa/jpa-features/2.6.1/xml/features
> >
> > karaf@root()> feature:install jclouds-digitalocean2
> >
> > karaf@root()> feature:list | grep jclouds | grep Started
> > jclouds-guice                            │ 2.2.0.SNAPSHOT   │          │
> > Started     │ jclouds-2.2.0-SNAPSHOT            │ jclouds - Google Guice
> > jclouds                                  │ 2.2.0.SNAPSHOT   │          │
> > Started     │ jclouds-2.2.0-SNAPSHOT            │ jclouds
> > jclouds-compute                          │ 2.2.0.SNAPSHOT   │          │
> > Started     │ jclouds-2.2.0-SNAPSHOT            │ jclouds - compute
> > jclouds-scriptbuilder                    │ 2.2.0.SNAPSHOT   │          │
> > Started     │ jclouds-2.2.0-SNAPSHOT            │ jclouds - scriptbuilder
> > jclouds-api-oauth                        │ 2.2.0.SNAPSHOT   │          │
> > Started     │ jclouds-2.2.0-SNAPSHOT            │ jclouds - API - OAuth
> > jclouds-digitalocean2                    │ 2.2.0.SNAPSHOT   │ x        │
> > Started     │ jclouds-2.2.0-SNAPSHOT            │ Components to access
> > DigitalOcean v2
> >
> > karaf@root()> feature:uninstall jclouds-digitalocean2
> >
> >
> > org.osgi.service.resolver.ResolutionException: Unable to resolve root:
> > missing requirement [root] osgi.identity; osgi.identity=jaas;
> > type=karaf.feature; version="[4.2.0,4.2.0]";
> > filter:="(&(osgi.identity=jaas)(type=karaf.feature)(
> version>=4.2.0)(version<=4.2.0))"
> > [caused by: Unable to resolve jaas/4.2.0: missing requirement
> > [jaas/4.2.0] osgi.identity; osgi.identity=org.apache.karaf.jaas.modules;
> > type=osgi.bundle; version="[4.2.0,4.2.0]"; resolution:=mandatory [caused
> > by: Unable to resolve org.apache.karaf.jaas.modules/4.2.0: missing
> > requirement [org.apache.karaf.jaas.modules/4.2.0] osgi.wiring.package;
> > filter:="(osgi.wiring.package=javax.net <http://javax.net>)"]]
> > at
> > org.apache.felix.resolver.ResolutionError.toException(
> ResolutionError.java:42)
> > at org.apache.felix.resolver.ResolverImpl.doResolve(
> ResolverImpl.java:391)
> > at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:377)
> > at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:331)
> > at
> > org.apache.karaf.features.internal.region.SubsystemResolver.resolve(
> SubsystemResolver.java:248)
> > at
> > org.apache.karaf.features.internal.service.Deployer.
> deploy(Deployer.java:388)
> > at
> > org.apache.karaf.features.internal.service.FeaturesServiceImpl.
> doProvision(FeaturesServiceImpl.java:1025)
> > at
> > org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$
> doProvisionInThread$13(FeaturesServiceImpl.java:964)
> > at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> > at
> > java.util.concurrent.ThreadPoolExecutor.runWorker(
> ThreadPoolExecutor.java:1142)
> > at
> > java.util.concurrent.ThreadPoolExecutor$Worker.run(
> ThreadPoolExecutor.java:617)
> > at java.lang.Thread.run(Thread.java:745)
> > Error executing command: Unable to resolve root: missing requirement
> > [root] osgi.identity; osgi.identity=jaas; type=karaf.feature;
> > version="[4.2.0,4.2.0]";
> > filter:="(&(osgi.identity=jaas)(type=karaf.feature)(
> version>=4.2.0)(version<=4.2.0))"
> > [caused by: Unable to resolve jaas/4.2.0: missing requirement
> > [jaas/4.2.0] osgi.identity; osgi.identity=org.apache.karaf.jaas.modules;
> > type=osgi.bundle; version="[4.2.0,4.2.0]"; resolution:=mandatory [caused
> > by: Unable to resolve org.apache.karaf.jaas.modules/4.2.0: missing
> > requirement [org.apache.karaf.jaas.modules/4.2.0] osgi.wiring.package;
> > filter:="(osgi.wiring.package=javax.net <http://javax.net>)"]]
> >
> > karaf@root()> feature:install jclouds-aws-ec2
> > org.osgi.service.resolver.ResolutionException: Unable to resolve root:
> > missing requirement [root] osgi.identity; osgi.identity=diagnostic;
> > type=karaf.feature; version="[4.2.0,4.2.0]";
> > filter:="(&(osgi.identity=diagnostic)(type=karaf.
> feature)(version>=4.2.0)(version<=4.2.0))"
> > [caused by: Unable to resolve diagnostic/4.2.0: missing requirement
> > [diagnostic/4.2.0] osgi.identity;
> > osgi.identity=org.apache.karaf.diagnostic.core; type=osgi.bundle;
> > version="[4.2.0,4.2.0]"; resolution:=mandatory [caused by: Unable to
> > resolve org.apache.karaf.diagnostic.core/4.2.0: missing requirement
> > [org.apache.karaf.diagnostic.core/4.2.0] osgi.wiring.package;
> > filter:="(osgi.wiring.package=javax.management)"]]
> > at
> > org.apache.felix.resolver.ResolutionError.toException(
> ResolutionError.java:42)
> > at org.apache.felix.resolver.ResolverImpl.doResolve(
> ResolverImpl.java:391)
> > at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:377)
> > at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:331)
> > at
> > org.apache.karaf.features.internal.region.SubsystemResolver.resolve(
> SubsystemResolver.java:248)
> > at
> > org.apache.karaf.features.internal.service.Deployer.
> deploy(Deployer.java:388)
> > at
> > org.apache.karaf.features.internal.service.FeaturesServiceImpl.
> doProvision(FeaturesServiceImpl.java:1025)
> > at
> > org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$
> doProvisionInThread$13(FeaturesServiceImpl.java:964)
> > at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> > at
> > java.util.concurrent.ThreadPoolExecutor.runWorker(
> ThreadPoolExecutor.java:1142)
> > at
> > java.util.concurrent.ThreadPoolExecutor$Worker.run(
> ThreadPoolExecutor.java:617)
> > at java.lang.Thread.run(Thread.java:745)
> > Error executing command: Unable to resolve root: missing requirement
> > [root] osgi.identity; osgi.identity=diagnostic; type=karaf.feature;
> > version="[4.2.0,4.2.0]";
> > filter:="(&(osgi.identity=diagnostic)(type=karaf.
> feature)(version>=4.2.0)(version<=4.2.0))"
> > [caused by: Unable to resolve diagnostic/4.2.0: missing requirement
> > [diagnostic/4.2.0] osgi.identity;
> > osgi.identity=org.apache.karaf.diagnostic.core; type=osgi.bundle;
> > version="[4.2.0,4.2.0]"; resolution:=mandatory [caused by: Unable to
> > resolve org.apache.karaf.diagnostic.core/4.2.0: missing requirement
> > [org.apache.karaf.diagnostic.core/4.2.0] osgi.wiring.package;
> > filter:="(osgi.wiring.package=javax.management)"]]
> >
> > At this point, it fails to install/uninstall any feature.
> >
> > The relevant changes to the jclouds-karaf project are here:
> > https://github.com/jclouds/jclouds-karaf/pull/108
> > Could the OSGi filter introduced in that PR be the cause of the issue?
> > If it is could be part of the issue, why can are we able to install the
> > feature initially?
> >
> >
> > If you want to reproduce the issue locally you can build the following
> > branches with "mvn clean install -DskipTests":
> > 1. https://github.com/gaul/jclouds/tree/jdk1.8
> > 2. https://github.com/andreaturli/jclouds-labs/tree/java8-guava21
> > 3. https://github.com/andreaturli/jclouds-karaf/tree/java8-guava21
> >
> > After these three repos have been built everything should be in place to
> > install the local jclouds feature repo and reproduce the issue.
> >
> >
> >
> >
> > Your help would be highly appreciated,
> >
> >
> > I.
>
> --
> Jean-Baptiste Onofré
> jbono...@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>

Reply via email to