karaf-issues mailing list archives

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

     [ https://issues.apache.org/jira/browse/KARAF-5695?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Shahin Mameghani updated KARAF-5695:
------------------------------------
    Summary: Starting Karaf Container 4.2.0 in Ubuntu 17.10 with OpenJDK 9 fails  (was: Starting
Karaf 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
>            Priority: Major
>   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 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 works 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