karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (KARAF-5695) Starting Karaf Container 4.2.0 in Ubuntu 17.10 with OpenJDK 9 fails
Date Wed, 11 Apr 2018 13:01:00 GMT

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

ASF subversion and git services commented on KARAF-5695:
--------------------------------------------------------

Commit 1c2b4eb19a884874e9d20ced42078164c8aac579 in karaf's branch refs/heads/master from [~ffang]
[ https://gitbox.apache.org/repos/asf?p=karaf.git;h=1c2b4eb ]

[KARAF-5695]Starting Karaf Container 4.2.0 in Ubuntu 17.10 with OpenJDK 9 fails


> Starting Karaf Container 4.2.0 in Ubuntu 17.10 with OpenJDK 9 fails
> -------------------------------------------------------------------
>
>                 Key: KARAF-5695
>                 URL: https://issues.apache.org/jira/browse/KARAF-5695
>             Project: Karaf
>          Issue Type: Bug
>    Affects Versions: 4.2.0
>         Environment: Ubuntu 17.10
> OpenJDK 9 (build 9-Ubuntu+0-9b181-4)
>            Reporter: Shahin Mameghani
>            Assignee: Freeman Fang
>            Priority: Major
>             Fix For: 4.2.1
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> In earlier versions of Java, executing {{java -version}} in a terminal will return for
instance {{1.8.0_162}} but in Ubuntu 17.10 with Java 9 it returns {{9-Ubuntu}}. Because of
this, when executing {{./bin/karaf}}, the following error output is given.
> {code:java}
> /home/shahin/tools/apache-karaf-4.2.0/bin/karaf: 212: [: Illegal number: 9-Ubuntu
> /home/shahin/tools/apache-karaf-4.2.0/bin/karaf: 274: [: Illegal number: 9-Ubuntu
> -Djava.endorsed.dirs=/usr/lib/jvm/java-9-openjdk-amd64/jre/lib/endorsed:/usr/lib/jvm/java-9-openjdk-amd64/lib/endorsed:/home/shahin/tools/apache-karaf-4.2.0/lib/endorsed
is not supported. Endorsed standards and standalone APIs
> in modular form will be supported via the concept of upgradeable modules.
> Error: Could not create the Java Virtual Machine.
> Error: A fatal exception has occurred. Program will exit.
> {code}
> Starting Karaf with Java 8 however works just fine.
> A workaround for this was to modify the {{sed}} expression at line 211 in the function
{{checkJvmVersion()}} in {{./bin/inc}} from
> {code:java}
> sed -e 's/_.*//g; s/^1\.//g ; s/\..*//g;'{code}
> to
> {code:java}
> sed -e 's/_.*//g; s/^1\.//g ; s/\..*//g; s/-.*//g;'
> {code}
> After this Karaf boots properly with Java 9.



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

Mime
View raw message