[ 
https://issues.apache.org/jira/browse/BROOKLYN-595?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16523535#comment-16523535
 ] 

Aled Sage commented on BROOKLYN-595:
------------------------------------

Upgrading to karaf 4.2 would not simply be a case of changing the version 
number. Karaf boot features fail to start because {{asm}} has been upgraded to 
6.x in karaf 4.2:
{noformat}
11:09:17.735 [main] INFO  o.o.p.e.r.c.RemoteBundleContextClient - Waiting for 
remote bundle context.. on 21000 name: d5ffdf99-e0eb-4780-9a08-7c29948a8c63 
timout: [ RelativeTimeout value = 180000 ]
org.osgi.service.resolver.ResolutionException: Unable to resolve root: missing 
requirement [root] osgi.identity; osgi.identity=brooklyn-headless; 
type=karaf.feature; version=0; 
filter:="(&(osgi.identity=brooklyn-headless)(type=karaf.feature)(version>=0.0.0))"
 [caused by: Unable to resolve brooklyn-headless/1.0.0.SNAPSHOT: missing 
requirement [brooklyn-headless/1.0.0.SNAPSHOT] osgi.identity; 
osgi.identity=brooklyn-locations-jclouds; type=karaf.feature [caused by: Unable 
to resolve brooklyn-locations-jclouds/1.0.0.SNAPSHOT: missing requirement 
[brooklyn-locations-jclouds/1.0.0.SNAPSHOT] osgi.identity; 
osgi.identity=brooklyn-software-winrm; type=karaf.feature [caused by: Unable to 
resolve brooklyn-software-winrm/1.0.0.SNAPSHOT: missing requirement 
[brooklyn-software-winrm/1.0.0.SNAPSHOT] osgi.identity; 
osgi.identity=org.apache.brooklyn.software-winrm; type=osgi.bundle; 
version="[1.0.0.SNAPSHOT,1.0.0.SNAPSHOT]"; resolution:=mandatory [caused by: 
Unable to resolve org.apache.brooklyn.software-winrm/1.0.0.SNAPSHOT: missing 
requirement [org.apache.brooklyn.software-winrm/1.0.0.SNAPSHOT] 
osgi.wiring.package; 
filter:="(&(osgi.wiring.package=org.apache.brooklyn.util.core.task)(version>=1.0.0)(!(version>=2.0.0)))"
 [caused by: Unable to resolve org.apache.brooklyn.core/1.0.0.SNAPSHOT: missing 
requirement [org.apache.brooklyn.core/1.0.0.SNAPSHOT] osgi.wiring.package; 
filter:="(&(osgi.wiring.package=com.jayway.jsonpath)(version>=2.4.0)(!(version>=3.0.0)))"
 [caused by: Unable to resolve com.jayway.jsonpath.json-path/2.4.0: missing 
requirement [com.jayway.jsonpath.json-path/2.4.0] osgi.wiring.package; 
filter:="(&(osgi.wiring.package=net.minidev.json.writer)(version>=2.3.0)(!(version>=3.0.0)))"
 [caused by: Unable to resolve net.minidev.json-smart/2.3.0: missing 
requirement [net.minidev.json-smart/2.3.0] osgi.wiring.package; 
filter:="(&(osgi.wiring.package=net.minidev.asm)(version>=1.2.0)(!(version>=2.0.0)))"
 [caused by: Unable to resolve net.minidev.accessors-smart/1.2.0: missing 
requirement [net.minidev.accessors-smart/1.2.0] osgi.wiring.package; 
filter:="(&(osgi.wiring.package=org.objectweb.asm)(version>=5.0.0)(!(version>=6.0.0)))"]]]]]]]]
        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.Deployer.handlePrerequisites(Deployer.java:1074)
        at 
org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:383)
        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:1149)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
{noformat}

It looks like our transitive dependencies (e.g. 
{{net.minidev.accessors-smart}}) depend on asm 5.x. There is not a newer 
version of {{net.minidev.*}} available. Nor is there a newer version of 
{{com.jayway.jsonpath}} (2.4.0 is the latest, since July 2017).

> Brooklyn karaf fails with Java 9
> --------------------------------
>
>                 Key: BROOKLYN-595
>                 URL: https://issues.apache.org/jira/browse/BROOKLYN-595
>             Project: Brooklyn
>          Issue Type: Bug
>            Reporter: Aled Sage
>            Priority: Major
>
> Running on OS X, Brooklyn karaf fails to start:
> {{./bin/start}} gives no output, exit code 0, but the process isn't running! 
> Tweaking the script to add {{-x}}, I see the last thing it did was:
> {noformat}
> exec 
> /Users/aledsage/repos/apache/brooklyn/brooklyn-dist/karaf/apache-brooklyn/target/assembly/bin/karaf
>  server
> {noformat}
> {{./bin/karaf}} gives the error:
> {noformat}
> karaf: JVM must be greater than 1.8
> {noformat}
> Digging into this further, {{java -version}} gives:
> {noformat}
> java version "9.0.4"
> Java(TM) SE Runtime Environment (build 9.0.4+11)
> Java HotSpot(TM) 64-Bit Server VM (build 9.0.4+11, mixed mode)
> {noformat}
> Running {{./bin/karaf}} with {{-x}} shows:
> {noformat}
> + detectJVM
> + /Library/Java/JavaVirtualMachines/jdk-9.0.4.jdk/Contents/Home//bin/java 
> -version
> + grep '^IBM'
> + false
> + JVM_VENDOR=SUN
> + checkJvmVersion
> ++ /Library/Java/JavaVirtualMachines/jdk-9.0.4.jdk/Contents/Home//bin/java 
> -version
> ++ egrep '"([0-9].[0-9]\..*[0-9]).*"'
> ++ awk '{print substr($3,2,length($3)-2)}'
> ++ awk '{print substr($1, 3, 3)}'
> ++ sed -e 's;\.;;g'
> + VERSION=04
> + '[' x04 = x ']'
> + '[' 04 -lt 80 ']'
> + die 'JVM must be greater than 1.8'
> + warn 'JVM must be greater than 1.8'
> + echo 'karaf: JVM must be greater than 1.8'
> karaf: JVM must be greater than 1.8
> + exit 1
> {noformat}
> This looks very similar to 
> https://jira.opendaylight.org/browse/ODLPARENT-73?page=com.atlassian.jira.plugin.system.issuetabpanels%3Aall-tabpanel



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to