You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Freeman Fang <fr...@gmail.com> on 2018/12/01 04:51:12 UTC

Re: Running Karaf 4.2.1 with OpenJDK 11

Hi,

FYI, we have better JDK11 support for the coming Karaf 4.2.2. Could you please try with Karaf 4.2.2-SNAPSHOT for now to see if you still have issue?

Thanks!
-------------
Freeman(Yue) Fang

Red Hat, Inc. 





> On Dec 1, 2018, at 2:51 AM, Javier Delgadillo <jd...@esri.com> wrote:
> 
> Hello everyone,
>  
> We’re in the process of switching our custom Karaf application to OpenJDK from Oracle JRE.  We’ve successfully ported it to OpenJDK 8, but I’m having troubles getting it to run using OpenJDK 11.
>  
> Summary: Building and running with OpenJDK8 works as expected.
>  
> If I build the application with OpenJDK11 and run with OpenJDK11, I see this when running karaf.vat:
> C >.\karaf.bat
> karaf.bat: Enabling Java debug options: -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005
> OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
> Listening for transport dt_socket at address: 5005
> ERROR: Error parsing system bundle export statement: org.osgi.dto;version="1.0",org.osgi.resource;version="1.0",org.osgi.resource.dto;version="1.0";uses:="org.osgi.d
> to",org.osgi.framework;version="1.8",org.osgi.framework.dto;version="1.8";uses:="org.osgi.dto",org.osgi.framework.hooks.bundle;version="1.1";uses:="org.osgi.framewor
> k",org.osgi.framework.hooks.resolver;version="1.0";uses:="org.osgi.framework.wiring",org.osgi.framework.hooks.service;version="1.1";uses:="org.osgi.framework",org.os
> gi.framework.hooks.weaving;version="1.1";uses:="org.osgi.framework.wiring",org.osgi.framework.launch;version="1.2";uses:="org.osgi.framework",org.osgi.framework.name
> space;version="1.1";uses:="org.osgi.resource",org.osgi.framework.startlevel;version="1.0";uses:="org.osgi.framework",org.osgi.framework.startlevel.dto;version="1.0";
> uses:="org.osgi.dto",org.osgi.framework.wiring;version="1.2";uses:="org.osgi.framework,org.osgi.resource",org.osgi.framework.wiring.dto;version="1.2";uses:="org.osgi
> .dto,org.osgi.resource.dto",org.osgi.service.condpermadmin;version="1.1.1";uses:="org.osgi.framework,org.osgi.service.permissionadmin",org.osgi.service.packageadmin;
> version="1.2";uses:="org.osgi.framework",org.osgi.service.permissionadmin;version="1.2",org.osgi.service.resolver;version="1.0";uses:="org.osgi.resource",org.osgi.se <http://org.osgi.se/>
> rvice.startlevel;version="1.1";uses:="org.osgi.framework",org.osgi.service.url;version="1.0",org.osgi.util.tracker;version="1.5.1";uses:="org.osgi.framework",org.apa
> che.karaf.version;version="4.2.1",org.apache.karaf.jaas.boot.principal;uses:=javax.security.auth;version="4.2.1",org.apache.karaf.jaas.boot;uses:="javax.security.aut
> h,javax.security.auth.callback,javax.security.auth.login,javax.security.auth.spi,org.osgi.framework";version="4.2.1",,org.apache.karaf.branding, sun.misc, org.apache
> .karaf.diagnostic.core;uses:=org.osgi.framework;version=4.2.1, org.apache.karaf.diagnostic.core.common;uses:=org.apache.karaf.diagnostic.core;version=4.2.1, org.apac
> he.karaf.jaas.boot;uses:="javax.security.auth,javax.security.auth.callback,javax.security.auth.login,javax.security.auth.spi,org.osgi.framework";version=4.2.1, org.a
> pache.karaf.jaas.boot.principal;uses:=javax.security.auth;version=4.2.1
> org.osgi.framework.BundleException: Exported package names cannot be zero length.
>         at org.apache.felix.framework.util.manifestparser.ManifestParser.normalizeExportClauses(ManifestParser.java:876)
>         at org.apache.felix.framework.util.manifestparser.ManifestParser.<init>(ManifestParser.java:215)
>         at org.apache.felix.framework.ExtensionManager.<init>(ExtensionManager.java:261)
>         at org.apache.felix.framework.Felix.<init>(Felix.java:429)
>         at org.apache.felix.framework.FrameworkFactory.newFramework(FrameworkFactory.java:28)
>         at org.apache.karaf.main.Main.launch(Main.java:256)
>         at org.apache.karaf.main.Main.main(Main.java:178)
> Error installing bundle listed in startup.properties with url: mvn:org.apache.karaf.features/org.apache.karaf.features.extension/4.2.1 and startlevel: 1
>  
> In data/log/karaf.log, I see this:
> Nov 30, 2018 9:16:56 AM org.apache.karaf.main.Main launch
> INFO: Installing and starting initial bundles
> Nov 30, 2018 9:16:56 AM org.apache.karaf.main.Main main
> SEVERE: Could not launch framework
> java.lang.RuntimeException: Error installing bundle listed in startup.properties with url: mvn:org.apache.karaf.features/org.apache.karaf.features.extension/4.2.1 and startlevel: 1
>         at org.apache.karaf.main.Main.installAndStartBundles(Main.java:550)
>         at org.apache.karaf.main.Main.launch(Main.java:273)
>         at org.apache.karaf.main.Main.main(Main.java:178)
> Caused by: org.osgi.framework.BundleException: Could not create bundle object.
>         at org.apache.felix.framework.Felix.installBundle(Felix.java:3095)
>         at org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:167)
>         at org.apache.karaf.main.Main.installAndStartBundles(Main.java:543)
>         ... 2 more
> Caused by: java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
>         at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64)
>         at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70)
>         at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:248)
>         at java.base/java.util.Objects.checkIndex(Objects.java:372)
>         at java.base/java.util.ArrayList.get(ArrayList.java:458)
>         at org.apache.felix.framework.ExtensionManager.addExtensionBundle(ExtensionManager.java:516)
>         at org.apache.felix.framework.Felix.installBundle(Felix.java:3061)
>         ... 4 more
>  
> I see the same error message after removing our new feature from the featuresBoot property in the config etc/org.apache.karaf.features.cfg and when I replace the startup.properties file with the one that ships with the vanilla karaf 4.2.1 distribution.  For what it’s worth, the Export statement in output for karaf.bat belongs to the lib/goot/org.osgi.core-6.0.0.jar.
>  
> What settings can I modify to get more information about the bundle/jar file that’s causing the IndexOutOfBoundsException showing up in the karaf.log?
> -- 
> Javer Delgadillo | Realtime GIS Engineer/ScrumMaster
> Esri | 380 New York St | Redlands, CA 92373 | USA
> T 909 793 2853 x1068 | jdelgadillol@esri.com <ma...@esri.com> | esri.com <http://esri.com/>
>  
> THE
> SCIENCE
> OF
> WHERE™


Re: Running Karaf 4.2.1 with OpenJDK 11

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Javier,

4.2.2 is plan to vote for next week end. So we can expect a release on
dist and Maven Central for beginning of next week.

Regarding your question, if it works from Karaf vanilla, there's no
reason it doesn't work in a custom distribution.

Regards
JB

On 03/12/2018 17:46, Javier Delgadillo wrote:
> Is there a schedule for releasing 4.2.2?  We need to release something
> sooner rather than later, so we’ll stick with running on OpenJDK 8
> unless a release of 4.2.2 is imminent.  Then we’ll upgrade to 4.2.2 on
> our next release after 4.2.2 comes out.
> 
>  
> 
> What’s puzzling to me is that if I download vanilla 4.2.1 and manually
> install our repo and features, everything comes up just fine.  It’s only
> when I run our build to create the customizations for the distribution
> that I see the errors.
> 
>  
> 
> -Javier
> 
>  
> 
> *From: *Freeman Fang <fr...@gmail.com>
> *Reply-To: *"user@karaf.apache.org" <us...@karaf.apache.org>
> *Date: *Friday, November 30, 2018 at 8:51 PM
> *To: *"user@karaf.apache.org" <us...@karaf.apache.org>
> *Subject: *Re: Running Karaf 4.2.1 with OpenJDK 11
> 
>  
> 
> Hi,
> 
>  
> 
> FYI, we have better JDK11 support for the coming Karaf 4.2.2. Could you
> please try with Karaf 4.2.2-SNAPSHOT for now to see if you still have issue?
> 
>  
> 
> Thanks!
> 
> -------------
> 
> Freeman(Yue) Fang
> 
> 
> Red Hat, Inc. 
> 
>  
> 
>  
> 
>  
> 
>     On Dec 1, 2018, at 2:51 AM, Javier Delgadillo <jdelgadillo@esri.com
>     <ma...@esri.com>> wrote:
> 
>      
> 
>     Hello everyone,
> 
>      
> 
>     We’re in the process of switching our custom Karaf application to
>     OpenJDK from Oracle JRE.  We’ve successfully ported it to OpenJDK 8,
>     but I’m having troubles getting it to run using OpenJDK 11.
> 
>      
> 
>     Summary: Building and running with OpenJDK8 works as expected.
> 
>      
> 
>     If I build the application with OpenJDK11 and run with OpenJDK11, I
>     see this when running karaf.vat:
> 
>     C >.\karaf.bat
> 
>     karaf.bat: Enabling Java debug options:
>     -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005
> 
>     OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was
>     deprecated in version 9.0 and will likely be removed in a future
>     release.
> 
>     Listening for transport dt_socket at address: 5005
> 
>     ERROR: Error parsing system bundle export statement:
>     org.osgi.dto;version="1.0",org.osgi.resource;version="1.0",org.osgi.resource.dto;version="1.0";uses:="org.osgi.d
> 
>     to",org.osgi.framework;version="1.8",org.osgi.framework.dto;version="1.8";uses:="org.osgi.dto",org.osgi.framework.hooks.bundle;version="1.1";uses:="org.osgi.framewor
> 
>     k",org.osgi.framework.hooks.resolver;version="1.0";uses:="org.osgi.framework.wiring",org.osgi.framework.hooks.service;version="1.1";uses:="org.osgi.framework",org.os
> 
>     gi.framework.hooks.weaving;version="1.1";uses:="org.osgi.framework.wiring",org.osgi.framework.launch;version="1.2";uses:="org.osgi.framework",org.osgi.framework.name
> 
>     space;version="1.1";uses:="org.osgi.resource",org.osgi.framework.startlevel;version="1.0";uses:="org.osgi.framework",org.osgi.framework.startlevel.dto;version="1.0";
> 
>     uses:="org.osgi.dto",org.osgi.framework.wiring;version="1.2";uses:="org.osgi.framework,org.osgi.resource",org.osgi.framework.wiring.dto;version="1.2";uses:="org.osgi
> 
>     .dto,org.osgi.resource.dto",org.osgi.service.condpermadmin;version="1.1.1";uses:="org.osgi.framework,org.osgi.service.permissionadmin",org.osgi.service.packageadmin;
> 
>     version="1.2";uses:="org.osgi.framework",org.osgi.service.permissionadmin;version="1.2",org.osgi.service.resolver;version="1.0";uses:="org.osgi.resource",org.osgi.se
>     <https://urldefense.proofpoint.com/v2/url?u=http-3A__org.osgi.se_&d=DwMFaQ&c=n6-cguzQvX_tUIrZOS_4Og&r=JSIxy5AMmEsGoHVm1_3NNX9HNUZaD3GUl-6qX0oX41E&m=-VUD3XoU-eHECQ5XiE7Rljf9T6WWzYWMHQ7rB8KXeCQ&s=ID3PLhs8GJFvkOs0fQMaepJFNBAXiBkheLeChlLGsCI&e=>
> 
>     rvice.startlevel;version="1.1";uses:="org.osgi.framework",org.osgi.service.url;version="1.0",org.osgi.util.tracker;version="1.5.1";uses:="org.osgi.framework",org.apa
> 
>     che.karaf.version;version="4.2.1",org.apache.karaf.jaas.boot.principal;uses:=javax.security.auth;version="4.2.1",org.apache.karaf.jaas.boot;uses:="javax.security.aut
> 
>     h,javax.security.auth.callback,javax.security.auth.login,javax.security.auth.spi,org.osgi.framework";version="4.2.1",,org.apache.karaf.branding,
>     sun.misc, org.apache
> 
>     .karaf.diagnostic.core;uses:=org.osgi.framework;version=4.2.1,
>     org.apache.karaf.diagnostic.core.common;uses:=org.apache.karaf.diagnostic.core;version=4.2.1,
>     org.apac
> 
>     he.karaf.jaas.boot;uses:="javax.security.auth,javax.security.auth.callback,javax.security.auth.login,javax.security.auth.spi,org.osgi.framework";version=4.2.1,
>     org.a
> 
>     pache.karaf.jaas.boot.principal;uses:=javax.security.auth;version=4.2.1
> 
>     org.osgi.framework.BundleException: Exported package names cannot be
>     zero length.
> 
>             at
>     org.apache.felix.framework.util.manifestparser.ManifestParser.normalizeExportClauses(ManifestParser.java:876)
> 
>             at
>     org.apache.felix.framework.util.manifestparser.ManifestParser.<init>(ManifestParser.java:215)
> 
>             at
>     org.apache.felix.framework.ExtensionManager.<init>(ExtensionManager.java:261)
> 
>             at org.apache.felix.framework.Felix.<init>(Felix.java:429)
> 
>             at
>     org.apache.felix.framework.FrameworkFactory.newFramework(FrameworkFactory.java:28)
> 
>             at org.apache.karaf.main.Main.launch(Main.java:256)
> 
>             at org.apache.karaf.main.Main.main(Main.java:178)
> 
>     Error installing bundle listed in startup.properties with url:
>     mvn:org.apache.karaf.features/org.apache.karaf.features.extension/4.2.1
>     and startlevel: 1
> 
>      
> 
>     In data/log/karaf.log, I see this:
> 
>     Nov 30, 2018 9:16:56 AM org.apache.karaf.main.Main launch
> 
>     INFO: Installing and starting initial bundles
> 
>     Nov 30, 2018 9:16:56 AM org.apache.karaf.main.Main main
> 
>     SEVERE: Could not launch framework
> 
>     java.lang.RuntimeException: Error installing bundle listed in
>     startup.properties with url:
>     mvn:org.apache.karaf.features/org.apache.karaf.features.extension/4.2.1
>     and startlevel: 1
> 
>             at
>     org.apache.karaf.main.Main.installAndStartBundles(Main.java:550)
> 
>             at org.apache.karaf.main.Main.launch(Main.java:273)
> 
>             at org.apache.karaf.main.Main.main(Main.java:178)
> 
>     Caused by: org.osgi.framework.BundleException: Could not create
>     bundle object.
> 
>             at
>     org.apache.felix.framework.Felix.installBundle(Felix.java:3095)
> 
>             at
>     org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:167)
> 
>             at
>     org.apache.karaf.main.Main.installAndStartBundles(Main.java:543)
> 
>             ... 2 more
> 
>     Caused by: java.lang.IndexOutOfBoundsException: Index 0 out of
>     bounds for length 0
> 
>             at
>     java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64)
> 
>             at
>     java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70)
> 
>             at
>     java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:248)
> 
>             at java.base/java.util.Objects.checkIndex(Objects.java:372)
> 
>             at java.base/java.util.ArrayList.get(ArrayList.java:458)
> 
>             at
>     org.apache.felix.framework.ExtensionManager.addExtensionBundle(ExtensionManager.java:516)
> 
>             at
>     org.apache.felix.framework.Felix.installBundle(Felix.java:3061)
> 
>             ... 4 more
> 
>      
> 
>     I see the same error message after removing our new feature from the
>     featuresBoot property in the config
>     etc/org.apache.karaf.features.cfg and when I replace the
>     startup.properties file with the one that ships with the vanilla
>     karaf 4.2.1 distribution.  For what it’s worth, the Export statement
>     in output for karaf.bat belongs to the lib/goot/org.osgi.core-6.0.0.jar.
> 
>      
> 
>     What settings can I modify to get more information about the
>     bundle/jar file that’s causing the IndexOutOfBoundsException showing
>     up in the karaf.log?
> 
>     -- 
> 
>     *Javer Delgadillo* | Realtime GIS Engineer/ScrumMaster
> 
>     *Esri* | 380 New York St | Redlands, CA 92373 | USA
> 
>     T 909 793 2853 x1068 | jdelgadillol@esri.com
>     <ma...@esri.com> | esri.com <http://esri.com/>
> 
>      
> 
>     */THE/*
> 
>     */SCIENCE/*
> 
>     */OF/*
> 
>     */WHERE™/*
> 
>  
> 

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: Running Karaf 4.2.1 with OpenJDK 11

Posted by Javier Delgadillo <jd...@esri.com>.
Is there a schedule for releasing 4.2.2?  We need to release something sooner rather than later, so we’ll stick with running on OpenJDK 8 unless a release of 4.2.2 is imminent.  Then we’ll upgrade to 4.2.2 on our next release after 4.2.2 comes out.

What’s puzzling to me is that if I download vanilla 4.2.1 and manually install our repo and features, everything comes up just fine.  It’s only when I run our build to create the customizations for the distribution that I see the errors.

-Javier

From: Freeman Fang <fr...@gmail.com>
Reply-To: "user@karaf.apache.org" <us...@karaf.apache.org>
Date: Friday, November 30, 2018 at 8:51 PM
To: "user@karaf.apache.org" <us...@karaf.apache.org>
Subject: Re: Running Karaf 4.2.1 with OpenJDK 11

Hi,

FYI, we have better JDK11 support for the coming Karaf 4.2.2. Could you please try with Karaf 4.2.2-SNAPSHOT for now to see if you still have issue?

Thanks!
-------------
Freeman(Yue) Fang

Red Hat, Inc.



On Dec 1, 2018, at 2:51 AM, Javier Delgadillo <jd...@esri.com>> wrote:

Hello everyone,

We’re in the process of switching our custom Karaf application to OpenJDK from Oracle JRE.  We’ve successfully ported it to OpenJDK 8, but I’m having troubles getting it to run using OpenJDK 11.

Summary: Building and running with OpenJDK8 works as expected.

If I build the application with OpenJDK11 and run with OpenJDK11, I see this when running karaf.vat:
C >.\karaf.bat
karaf.bat: Enabling Java debug options: -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
Listening for transport dt_socket at address: 5005
ERROR: Error parsing system bundle export statement: org.osgi.dto;version="1.0",org.osgi.resource;version="1.0",org.osgi.resource.dto;version="1.0";uses:="org.osgi.d
to",org.osgi.framework;version="1.8",org.osgi.framework.dto;version="1.8";uses:="org.osgi.dto",org.osgi.framework.hooks.bundle;version="1.1";uses:="org.osgi.framewor
k",org.osgi.framework.hooks.resolver;version="1.0";uses:="org.osgi.framework.wiring",org.osgi.framework.hooks.service;version="1.1";uses:="org.osgi.framework",org.os
gi.framework.hooks.weaving;version="1.1";uses:="org.osgi.framework.wiring",org.osgi.framework.launch;version="1.2";uses:="org.osgi.framework",org.osgi.framework.name
space;version="1.1";uses:="org.osgi.resource",org.osgi.framework.startlevel;version="1.0";uses:="org.osgi.framework",org.osgi.framework.startlevel.dto;version="1.0";
uses:="org.osgi.dto",org.osgi.framework.wiring;version="1.2";uses:="org.osgi.framework,org.osgi.resource",org.osgi.framework.wiring.dto;version="1.2";uses:="org.osgi
.dto,org.osgi.resource.dto",org.osgi.service.condpermadmin;version="1.1.1";uses:="org.osgi.framework,org.osgi.service.permissionadmin",org.osgi.service.packageadmin;
version="1.2";uses:="org.osgi.framework",org.osgi.service.permissionadmin;version="1.2",org.osgi.service.resolver;version="1.0";uses:="org.osgi.resource",org.osgi.se<https://urldefense.proofpoint.com/v2/url?u=http-3A__org.osgi.se_&d=DwMFaQ&c=n6-cguzQvX_tUIrZOS_4Og&r=JSIxy5AMmEsGoHVm1_3NNX9HNUZaD3GUl-6qX0oX41E&m=-VUD3XoU-eHECQ5XiE7Rljf9T6WWzYWMHQ7rB8KXeCQ&s=ID3PLhs8GJFvkOs0fQMaepJFNBAXiBkheLeChlLGsCI&e=>
rvice.startlevel;version="1.1";uses:="org.osgi.framework",org.osgi.service.url;version="1.0",org.osgi.util.tracker;version="1.5.1";uses:="org.osgi.framework",org.apa
che.karaf.version;version="4.2.1",org.apache.karaf.jaas.boot.principal;uses:=javax.security.auth;version="4.2.1",org.apache.karaf.jaas.boot;uses:="javax.security.aut
h,javax.security.auth.callback,javax.security.auth.login,javax.security.auth.spi,org.osgi.framework";version="4.2.1",,org.apache.karaf.branding, sun.misc, org.apache
.karaf.diagnostic.core;uses:=org.osgi.framework;version=4.2.1, org.apache.karaf.diagnostic.core.common;uses:=org.apache.karaf.diagnostic.core;version=4.2.1, org.apac
he.karaf.jaas.boot;uses:="javax.security.auth,javax.security.auth.callback,javax.security.auth.login,javax.security.auth.spi,org.osgi.framework";version=4.2.1, org.a
pache.karaf.jaas.boot.principal;uses:=javax.security.auth;version=4.2.1
org.osgi.framework.BundleException: Exported package names cannot be zero length.
        at org.apache.felix.framework.util.manifestparser.ManifestParser.normalizeExportClauses(ManifestParser.java:876)
        at org.apache.felix.framework.util.manifestparser.ManifestParser.<init>(ManifestParser.java:215)
        at org.apache.felix.framework.ExtensionManager.<init>(ExtensionManager.java:261)
        at org.apache.felix.framework.Felix.<init>(Felix.java:429)
        at org.apache.felix.framework.FrameworkFactory.newFramework(FrameworkFactory.java:28)
        at org.apache.karaf.main.Main.launch(Main.java:256)
        at org.apache.karaf.main.Main.main(Main.java:178)
Error installing bundle listed in startup.properties with url: mvn:org.apache.karaf.features/org.apache.karaf.features.extension/4.2.1 and startlevel: 1

In data/log/karaf.log, I see this:
Nov 30, 2018 9:16:56 AM org.apache.karaf.main.Main launch
INFO: Installing and starting initial bundles
Nov 30, 2018 9:16:56 AM org.apache.karaf.main.Main main
SEVERE: Could not launch framework
java.lang.RuntimeException: Error installing bundle listed in startup.properties with url: mvn:org.apache.karaf.features/org.apache.karaf.features.extension/4.2.1 and startlevel: 1
        at org.apache.karaf.main.Main.installAndStartBundles(Main.java:550)
        at org.apache.karaf.main.Main.launch(Main.java:273)
        at org.apache.karaf.main.Main.main(Main.java:178)
Caused by: org.osgi.framework.BundleException: Could not create bundle object.
        at org.apache.felix.framework.Felix.installBundle(Felix.java:3095)
        at org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:167)
        at org.apache.karaf.main.Main.installAndStartBundles(Main.java:543)
        ... 2 more
Caused by: java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
        at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64)
        at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70)
        at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:248)
        at java.base/java.util.Objects.checkIndex(Objects.java:372)
        at java.base/java.util.ArrayList.get(ArrayList.java:458)
        at org.apache.felix.framework.ExtensionManager.addExtensionBundle(ExtensionManager.java:516)
        at org.apache.felix.framework.Felix.installBundle(Felix.java:3061)
        ... 4 more

I see the same error message after removing our new feature from the featuresBoot property in the config etc/org.apache.karaf.features.cfg and when I replace the startup.properties file with the one that ships with the vanilla karaf 4.2.1 distribution.  For what it’s worth, the Export statement in output for karaf.bat belongs to the lib/goot/org.osgi.core-6.0.0.jar.

What settings can I modify to get more information about the bundle/jar file that’s causing the IndexOutOfBoundsException showing up in the karaf.log?
--
Javer Delgadillo | Realtime GIS Engineer/ScrumMaster
Esri | 380 New York St | Redlands, CA 92373 | USA
T 909 793 2853 x1068 | jdelgadillol@esri.com<ma...@esri.com> | esri.com<http://esri.com/>

THE
SCIENCE
OF
WHERE™


Re: Running Karaf 4.2.1 with OpenJDK 11

Posted by Ryan Moquin <fr...@gmail.com>.
Hi JB,

Gotcha, I must not have hit those spots luckily.  Looking forward to
4.2.2.  Always get excited for another release.  I noticed a thread about
the issues with output in various terminals.  I am hitting that in Windows
10, maybe that's one of them, though I thought that was more of an ssh lib
issues (the name of the lib escapes me at the moment.)

Ryan

On Mon, Dec 3, 2018, 8:24 AM Jean-Baptiste Onofré <jb@nanthrax.net wrote:

> Hi Ryan,
>
> all depends what part of Karaf you are using ;)
>
> Karaf 4.2.2 will be better in term of Java 11 support.
>
> Regards
> JB
>
> On 03/12/2018 14:08, Ryan Moquin wrote:
> > FWIW, I was surprised that I didn't run into any trouble with OpenJDK 11
> > and 4.2.1.. maybe there is still something strange going in some cases.
> >
> > Thanks for all the great work the Karaf team does.
> >
> > Ryan
> >
> > On Fri, Nov 30, 2018, 11:51 PM Freeman Fang <freeman.fang@gmail.com
> > <ma...@gmail.com> wrote:
> >
> >     Hi,
> >
> >     FYI, we have better JDK11 support for the coming Karaf 4.2.2. Could
> >     you please try with Karaf 4.2.2-SNAPSHOT for now to see if you still
> >     have issue?
> >
> >     Thanks!
> >     -------------
> >     Freeman(Yue) Fang
> >
> >     Red Hat, Inc.
> >
> >
> >
> >
> >
> >>     On Dec 1, 2018, at 2:51 AM, Javier Delgadillo
> >>     <jdelgadillo@esri.com <ma...@esri.com>> wrote:
> >>
> >>     Hello everyone,____
> >>
> >>     We’re in the process of switching our custom Karaf application to
> >>     OpenJDK from Oracle JRE.  We’ve successfully ported it to OpenJDK
> >>     8, but I’m having troubles getting it to run using OpenJDK 11.____
> >>
> >>     Summary: Building and running with OpenJDK8 works as expected.____
> >>
> >>     If I build the application with OpenJDK11 and run with OpenJDK11,
> >>     I see this when running karaf.vat:____
> >>     C >.\karaf.bat____
> >>     karaf.bat: Enabling Java debug options:
> >>
>  -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005____
> >>     OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was
> >>     deprecated in version 9.0 and will likely be removed in a future
> >>     release.____
> >>     Listening for transport dt_socket at address: 5005____
> >>     ERROR: Error parsing system bundle export statement:
> >>
>  org.osgi.dto;version="1.0",org.osgi.resource;version="1.0",org.osgi.resource.dto;version="1.0";uses:="org.osgi.d____
> >>
>  to",org.osgi.framework;version="1.8",org.osgi.framework.dto;version="1.8";uses:="org.osgi.dto",org.osgi.framework.hooks.bundle;version="1.1";uses:="org.osgi.framewor____
> >>
>  k",org.osgi.framework.hooks.resolver;version="1.0";uses:="org.osgi.framework.wiring",org.osgi.framework.hooks.service;version="1.1";uses:="org.osgi.framework",org.os____
> >>
>  gi.framework.hooks.weaving;version="1.1";uses:="org.osgi.framework.wiring",org.osgi.framework.launch;version="1.2";uses:="org.osgi.framework",
> org.osgi.framework.name
> >>     <http://org.osgi.framework.name>____
> >>
>  space;version="1.1";uses:="org.osgi.resource",org.osgi.framework.startlevel;version="1.0";uses:="org.osgi.framework",org.osgi.framework.startlevel.dto;version="1.0";____
> >>
>  uses:="org.osgi.dto",org.osgi.framework.wiring;version="1.2";uses:="org.osgi.framework,org.osgi.resource",org.osgi.framework.wiring.dto;version="1.2";uses:="org.osgi____
> >>
>  .dto,org.osgi.resource.dto",org.osgi.service.condpermadmin;version="1.1.1";uses:="org.osgi.framework,org.osgi.service.permissionadmin",org.osgi.service.packageadmin;____
> >>
>  version="1.2";uses:="org.osgi.framework",org.osgi.service.permissionadmin;version="1.2",org.osgi.service.resolver;version="1.0";uses:="org.osgi.resource",
> org.osgi.se
> >>     <http://org.osgi.se/>____
> >>
>  rvice.startlevel;version="1.1";uses:="org.osgi.framework",org.osgi.service.url;version="1.0",org.osgi.util.tracker;version="1.5.1";uses:="org.osgi.framework",org.apa____
> >>
>  che.karaf.version;version="4.2.1",org.apache.karaf.jaas.boot.principal;uses:=javax.security.auth;version="4.2.1",org.apache.karaf.jaas.boot;uses:="javax.security.aut____
> >>
>  h,javax.security.auth.callback,javax.security.auth.login,javax.security.auth.spi,org.osgi.framework";version="4.2.1",,org.apache.karaf.branding,
> >>     sun.misc, org.apache____
> >>     .karaf.diagnostic.core;uses:=org.osgi.framework;version=4.2.1,
> >>
>  org.apache.karaf.diagnostic.core.common;uses:=org.apache.karaf.diagnostic.core;version=4.2.1,
> >>     org.apac____
> >>
>  he.karaf.jaas.boot;uses:="javax.security.auth,javax.security.auth.callback,javax.security.auth.login,javax.security.auth.spi,org.osgi.framework";version=4.2.1,
> >>     org.a____
> >>
>  pache.karaf.jaas.boot.principal;uses:=javax.security.auth;version=4.2.1____
> >>     org.osgi.framework.BundleException: Exported package names cannot
> >>     be zero length.____
> >>             at
> >>
>  org.apache.felix.framework.util.manifestparser.ManifestParser.normalizeExportClauses(ManifestParser.java:876)____
> >>             at
> >>
>  org.apache.felix.framework.util.manifestparser.ManifestParser.<init>(ManifestParser.java:215)____
> >>             at
> >>
>  org.apache.felix.framework.ExtensionManager.<init>(ExtensionManager.java:261)____
> >>             at
> org.apache.felix.framework.Felix.<init>(Felix.java:429)____
> >>             at
> >>
>  org.apache.felix.framework.FrameworkFactory.newFramework(FrameworkFactory.java:28)____
> >>             at org.apache.karaf.main.Main.launch(Main.java:256)____
> >>             at org.apache.karaf.main.Main.main(Main.java:178)____
> >>     Error installing bundle listed in startup.properties with url:
> >>
>  mvn:org.apache.karaf.features/org.apache.karaf.features.extension/4.2.1
> >>     and startlevel: 1____
> >>
> >>     In data/log/karaf.log, I see this:____
> >>     Nov 30, 2018 9:16:56 AM org.apache.karaf.main.Main launch____
> >>     INFO: Installing and starting initial bundles____
> >>     Nov 30, 2018 9:16:56 AM org.apache.karaf.main.Main main____
> >>     SEVERE: Could not launch framework____
> >>     java.lang.RuntimeException: Error installing bundle listed in
> >>     startup.properties with url:
> >>
>  mvn:org.apache.karaf.features/org.apache.karaf.features.extension/4.2.1
> >>     and startlevel: 1____
> >>             at
> >>     org.apache.karaf.main.Main.installAndStartBundles(Main.java:550)____
> >>             at org.apache.karaf.main.Main.launch(Main.java:273)____
> >>             at org.apache.karaf.main.Main.main(Main.java:178)____
> >>     Caused by: org.osgi.framework.BundleException: Could not create
> >>     bundle object.____
> >>             at
> >>     org.apache.felix.framework.Felix.installBundle(Felix.java:3095)____
> >>             at
> >>
>  org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:167)____
> >>             at
> >>     org.apache.karaf.main.Main.installAndStartBundles(Main.java:543)____
> >>             ... 2 more____
> >>     Caused by: java.lang.IndexOutOfBoundsException: Index 0 out of
> >>     bounds for length 0____
> >>             at
> >>
>  java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64)____
> >>             at
> >>
>  java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70)____
> >>             at
> >>
>  java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:248)____
> >>             at
> >>     java.base/java.util.Objects.checkIndex(Objects.java:372)____
> >>             at java.base/java.util.ArrayList.get(ArrayList.java:458)____
> >>             at
> >>
>  org.apache.felix.framework.ExtensionManager.addExtensionBundle(ExtensionManager.java:516)____
> >>             at
> >>     org.apache.felix.framework.Felix.installBundle(Felix.java:3061)____
> >>             ... 4 more____
> >>
> >>     I see the same error message after removing our new feature from
> >>     the featuresBoot property in the config
> >>     etc/org.apache.karaf.features.cfg and when I replace the
> >>     startup.properties file with the one that ships with the vanilla
> >>     karaf 4.2.1 distribution.  For what it’s worth, the Export
> >>     statement in output for karaf.bat belongs to the
> >>     lib/goot/org.osgi.core-6.0.0.jar.____
> >>
> >>     What settings can I modify to get more information about the
> >>     bundle/jar file that’s causing the IndexOutOfBoundsException
> >>     showing up in the karaf.log?____
> >>     -- ____
> >>     *Javer Delgadillo* | Realtime GIS Engineer/ScrumMaster____
> >>     *Esri* | 380 New York St | Redlands, CA 92373 | USA____
> >>     T 909 793 2853 x1068 | jdelgadillol@esri.com
> >>     <ma...@esri.com> | esri.com <http://esri.com/>____
> >>      ____
> >>     */THE/*____
> >>     */SCIENCE/*____
> >>     */OF/*____
> >>     */WHERE™/*
> >
>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>

Re: Running Karaf 4.2.1 with OpenJDK 11

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Ryan,

all depends what part of Karaf you are using ;)

Karaf 4.2.2 will be better in term of Java 11 support.

Regards
JB

On 03/12/2018 14:08, Ryan Moquin wrote:
> FWIW, I was surprised that I didn't run into any trouble with OpenJDK 11
> and 4.2.1.. maybe there is still something strange going in some cases.
> 
> Thanks for all the great work the Karaf team does.
> 
> Ryan
> 
> On Fri, Nov 30, 2018, 11:51 PM Freeman Fang <freeman.fang@gmail.com
> <ma...@gmail.com> wrote:
> 
>     Hi,
> 
>     FYI, we have better JDK11 support for the coming Karaf 4.2.2. Could
>     you please try with Karaf 4.2.2-SNAPSHOT for now to see if you still
>     have issue?
> 
>     Thanks!
>     -------------
>     Freeman(Yue) Fang
> 
>     Red Hat, Inc. 
> 
> 
> 
> 
> 
>>     On Dec 1, 2018, at 2:51 AM, Javier Delgadillo
>>     <jdelgadillo@esri.com <ma...@esri.com>> wrote:
>>
>>     Hello everyone,____
>>      
>>     We’re in the process of switching our custom Karaf application to
>>     OpenJDK from Oracle JRE.  We’ve successfully ported it to OpenJDK
>>     8, but I’m having troubles getting it to run using OpenJDK 11.____
>>      
>>     Summary: Building and running with OpenJDK8 works as expected.____
>>      
>>     If I build the application with OpenJDK11 and run with OpenJDK11,
>>     I see this when running karaf.vat:____
>>     C >.\karaf.bat____
>>     karaf.bat: Enabling Java debug options:
>>     -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005____
>>     OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was
>>     deprecated in version 9.0 and will likely be removed in a future
>>     release.____
>>     Listening for transport dt_socket at address: 5005____
>>     ERROR: Error parsing system bundle export statement:
>>     org.osgi.dto;version="1.0",org.osgi.resource;version="1.0",org.osgi.resource.dto;version="1.0";uses:="org.osgi.d____
>>     to",org.osgi.framework;version="1.8",org.osgi.framework.dto;version="1.8";uses:="org.osgi.dto",org.osgi.framework.hooks.bundle;version="1.1";uses:="org.osgi.framewor____
>>     k",org.osgi.framework.hooks.resolver;version="1.0";uses:="org.osgi.framework.wiring",org.osgi.framework.hooks.service;version="1.1";uses:="org.osgi.framework",org.os____
>>     gi.framework.hooks.weaving;version="1.1";uses:="org.osgi.framework.wiring",org.osgi.framework.launch;version="1.2";uses:="org.osgi.framework",org.osgi.framework.name
>>     <http://org.osgi.framework.name>____
>>     space;version="1.1";uses:="org.osgi.resource",org.osgi.framework.startlevel;version="1.0";uses:="org.osgi.framework",org.osgi.framework.startlevel.dto;version="1.0";____
>>     uses:="org.osgi.dto",org.osgi.framework.wiring;version="1.2";uses:="org.osgi.framework,org.osgi.resource",org.osgi.framework.wiring.dto;version="1.2";uses:="org.osgi____
>>     .dto,org.osgi.resource.dto",org.osgi.service.condpermadmin;version="1.1.1";uses:="org.osgi.framework,org.osgi.service.permissionadmin",org.osgi.service.packageadmin;____
>>     version="1.2";uses:="org.osgi.framework",org.osgi.service.permissionadmin;version="1.2",org.osgi.service.resolver;version="1.0";uses:="org.osgi.resource",org.osgi.se
>>     <http://org.osgi.se/>____
>>     rvice.startlevel;version="1.1";uses:="org.osgi.framework",org.osgi.service.url;version="1.0",org.osgi.util.tracker;version="1.5.1";uses:="org.osgi.framework",org.apa____
>>     che.karaf.version;version="4.2.1",org.apache.karaf.jaas.boot.principal;uses:=javax.security.auth;version="4.2.1",org.apache.karaf.jaas.boot;uses:="javax.security.aut____
>>     h,javax.security.auth.callback,javax.security.auth.login,javax.security.auth.spi,org.osgi.framework";version="4.2.1",,org.apache.karaf.branding,
>>     sun.misc, org.apache____
>>     .karaf.diagnostic.core;uses:=org.osgi.framework;version=4.2.1,
>>     org.apache.karaf.diagnostic.core.common;uses:=org.apache.karaf.diagnostic.core;version=4.2.1,
>>     org.apac____
>>     he.karaf.jaas.boot;uses:="javax.security.auth,javax.security.auth.callback,javax.security.auth.login,javax.security.auth.spi,org.osgi.framework";version=4.2.1,
>>     org.a____
>>     pache.karaf.jaas.boot.principal;uses:=javax.security.auth;version=4.2.1____
>>     org.osgi.framework.BundleException: Exported package names cannot
>>     be zero length.____
>>             at
>>     org.apache.felix.framework.util.manifestparser.ManifestParser.normalizeExportClauses(ManifestParser.java:876)____
>>             at
>>     org.apache.felix.framework.util.manifestparser.ManifestParser.<init>(ManifestParser.java:215)____
>>             at
>>     org.apache.felix.framework.ExtensionManager.<init>(ExtensionManager.java:261)____
>>             at org.apache.felix.framework.Felix.<init>(Felix.java:429)____
>>             at
>>     org.apache.felix.framework.FrameworkFactory.newFramework(FrameworkFactory.java:28)____
>>             at org.apache.karaf.main.Main.launch(Main.java:256)____
>>             at org.apache.karaf.main.Main.main(Main.java:178)____
>>     Error installing bundle listed in startup.properties with url:
>>     mvn:org.apache.karaf.features/org.apache.karaf.features.extension/4.2.1
>>     and startlevel: 1____
>>      
>>     In data/log/karaf.log, I see this:____
>>     Nov 30, 2018 9:16:56 AM org.apache.karaf.main.Main launch____
>>     INFO: Installing and starting initial bundles____
>>     Nov 30, 2018 9:16:56 AM org.apache.karaf.main.Main main____
>>     SEVERE: Could not launch framework____
>>     java.lang.RuntimeException: Error installing bundle listed in
>>     startup.properties with url:
>>     mvn:org.apache.karaf.features/org.apache.karaf.features.extension/4.2.1
>>     and startlevel: 1____
>>             at
>>     org.apache.karaf.main.Main.installAndStartBundles(Main.java:550)____
>>             at org.apache.karaf.main.Main.launch(Main.java:273)____
>>             at org.apache.karaf.main.Main.main(Main.java:178)____
>>     Caused by: org.osgi.framework.BundleException: Could not create
>>     bundle object.____
>>             at
>>     org.apache.felix.framework.Felix.installBundle(Felix.java:3095)____
>>             at
>>     org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:167)____
>>             at
>>     org.apache.karaf.main.Main.installAndStartBundles(Main.java:543)____
>>             ... 2 more____
>>     Caused by: java.lang.IndexOutOfBoundsException: Index 0 out of
>>     bounds for length 0____
>>             at
>>     java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64)____
>>             at
>>     java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70)____
>>             at
>>     java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:248)____
>>             at
>>     java.base/java.util.Objects.checkIndex(Objects.java:372)____
>>             at java.base/java.util.ArrayList.get(ArrayList.java:458)____
>>             at
>>     org.apache.felix.framework.ExtensionManager.addExtensionBundle(ExtensionManager.java:516)____
>>             at
>>     org.apache.felix.framework.Felix.installBundle(Felix.java:3061)____
>>             ... 4 more____
>>      
>>     I see the same error message after removing our new feature from
>>     the featuresBoot property in the config
>>     etc/org.apache.karaf.features.cfg and when I replace the
>>     startup.properties file with the one that ships with the vanilla
>>     karaf 4.2.1 distribution.  For what it’s worth, the Export
>>     statement in output for karaf.bat belongs to the
>>     lib/goot/org.osgi.core-6.0.0.jar.____
>>      
>>     What settings can I modify to get more information about the
>>     bundle/jar file that’s causing the IndexOutOfBoundsException
>>     showing up in the karaf.log?____
>>     -- ____
>>     *Javer Delgadillo* | Realtime GIS Engineer/ScrumMaster____
>>     *Esri* | 380 New York St | Redlands, CA 92373 | USA____
>>     T 909 793 2853 x1068 | jdelgadillol@esri.com
>>     <ma...@esri.com> | esri.com <http://esri.com/>____
>>      ____
>>     */THE/*____
>>     */SCIENCE/*____
>>     */OF/*____
>>     */WHERE™/*
> 

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: Running Karaf 4.2.1 with OpenJDK 11

Posted by Ryan Moquin <fr...@gmail.com>.
FWIW, I was surprised that I didn't run into any trouble with OpenJDK 11
and 4.2.1.. maybe there is still something strange going in some cases.

Thanks for all the great work the Karaf team does.

Ryan

On Fri, Nov 30, 2018, 11:51 PM Freeman Fang <freeman.fang@gmail.com wrote:

> Hi,
>
> FYI, we have better JDK11 support for the coming Karaf 4.2.2. Could you
> please try with Karaf 4.2.2-SNAPSHOT for now to see if you still have issue?
>
> Thanks!
> -------------
> Freeman(Yue) Fang
>
> Red Hat, Inc.
>
>
>
>
>
> On Dec 1, 2018, at 2:51 AM, Javier Delgadillo <jd...@esri.com>
> wrote:
>
> Hello everyone,
>
> We’re in the process of switching our custom Karaf application to OpenJDK
> from Oracle JRE.  We’ve successfully ported it to OpenJDK 8, but I’m having
> troubles getting it to run using OpenJDK 11.
>
> Summary: Building and running with OpenJDK8 works as expected.
>
> If I build the application with OpenJDK11 and run with OpenJDK11, I see
> this when running karaf.vat:
> C >.\karaf.bat
> karaf.bat: Enabling Java debug options:
> -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005
> OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated
> in version 9.0 and will likely be removed in a future release.
> Listening for transport dt_socket at address: 5005
> ERROR: Error parsing system bundle export statement:
> org.osgi.dto;version="1.0",org.osgi.resource;version="1.0",org.osgi.resource.dto;version="1.0";uses:="org.osgi.d
>
> to",org.osgi.framework;version="1.8",org.osgi.framework.dto;version="1.8";uses:="org.osgi.dto",org.osgi.framework.hooks.bundle;version="1.1";uses:="org.osgi.framewor
>
> k",org.osgi.framework.hooks.resolver;version="1.0";uses:="org.osgi.framework.wiring",org.osgi.framework.hooks.service;version="1.1";uses:="org.osgi.framework",org.os
>
> gi.framework.hooks.weaving;version="1.1";uses:="org.osgi.framework.wiring",org.osgi.framework.launch;version="1.2";uses:="org.osgi.framework",
> org.osgi.framework.name
>
> space;version="1.1";uses:="org.osgi.resource",org.osgi.framework.startlevel;version="1.0";uses:="org.osgi.framework",org.osgi.framework.startlevel.dto;version="1.0";
>
> uses:="org.osgi.dto",org.osgi.framework.wiring;version="1.2";uses:="org.osgi.framework,org.osgi.resource",org.osgi.framework.wiring.dto;version="1.2";uses:="org.osgi
>
> .dto,org.osgi.resource.dto",org.osgi.service.condpermadmin;version="1.1.1";uses:="org.osgi.framework,org.osgi.service.permissionadmin",org.osgi.service.packageadmin;
>
> version="1.2";uses:="org.osgi.framework",org.osgi.service.permissionadmin;version="1.2",org.osgi.service.resolver;version="1.0";uses:="org.osgi.resource",
> org.osgi.se
>
> rvice.startlevel;version="1.1";uses:="org.osgi.framework",org.osgi.service.url;version="1.0",org.osgi.util.tracker;version="1.5.1";uses:="org.osgi.framework",org.apa
>
> che.karaf.version;version="4.2.1",org.apache.karaf.jaas.boot.principal;uses:=javax.security.auth;version="4.2.1",org.apache.karaf.jaas.boot;uses:="javax.security.aut
> h,javax.security.auth.callback,javax.security.auth.login,javax.security.auth.spi,org.osgi.framework";version="4.2.1",,org.apache.karaf.branding,
> sun.misc, org.apache
> .karaf.diagnostic.core;uses:=org.osgi.framework;version=4.2.1,
> org.apache.karaf.diagnostic.core.common;uses:=org.apache.karaf.diagnostic.core;version=4.2.1,
> org.apac
> he.karaf.jaas.boot;uses:="javax.security.auth,javax.security.auth.callback,javax.security.auth.login,javax.security.auth.spi,org.osgi.framework";version=4.2.1,
> org.a
> pache.karaf.jaas.boot.principal;uses:=javax.security.auth;version=4.2.1
> org.osgi.framework.BundleException: Exported package names cannot be zero
> length.
>         at
> org.apache.felix.framework.util.manifestparser.ManifestParser.normalizeExportClauses(ManifestParser.java:876)
>         at
> org.apache.felix.framework.util.manifestparser.ManifestParser.<init>(ManifestParser.java:215)
>         at
> org.apache.felix.framework.ExtensionManager.<init>(ExtensionManager.java:261)
>         at org.apache.felix.framework.Felix.<init>(Felix.java:429)
>         at
> org.apache.felix.framework.FrameworkFactory.newFramework(FrameworkFactory.java:28)
>         at org.apache.karaf.main.Main.launch(Main.java:256)
>         at org.apache.karaf.main.Main.main(Main.java:178)
> Error installing bundle listed in startup.properties with url:
> mvn:org.apache.karaf.features/org.apache.karaf.features.extension/4.2.1 and
> startlevel: 1
>
> In data/log/karaf.log, I see this:
> Nov 30, 2018 9:16:56 AM org.apache.karaf.main.Main launch
> INFO: Installing and starting initial bundles
> Nov 30, 2018 9:16:56 AM org.apache.karaf.main.Main main
> SEVERE: Could not launch framework
> java.lang.RuntimeException: Error installing bundle listed in
> startup.properties with url:
> mvn:org.apache.karaf.features/org.apache.karaf.features.extension/4.2.1 and
> startlevel: 1
>         at org.apache.karaf.main.Main.installAndStartBundles(Main.java:550)
>         at org.apache.karaf.main.Main.launch(Main.java:273)
>         at org.apache.karaf.main.Main.main(Main.java:178)
> Caused by: org.osgi.framework.BundleException: Could not create bundle
> object.
>         at org.apache.felix.framework.Felix.installBundle(Felix.java:3095)
>         at
> org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:167)
>         at org.apache.karaf.main.Main.installAndStartBundles(Main.java:543)
>         ... 2 more
> Caused by: java.lang.IndexOutOfBoundsException: Index 0 out of bounds for
> length 0
>         at
> java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64)
>         at
> java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70)
>         at
> java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:248)
>         at java.base/java.util.Objects.checkIndex(Objects.java:372)
>         at java.base/java.util.ArrayList.get(ArrayList.java:458)
>         at
> org.apache.felix.framework.ExtensionManager.addExtensionBundle(ExtensionManager.java:516)
>         at org.apache.felix.framework.Felix.installBundle(Felix.java:3061)
>         ... 4 more
>
> I see the same error message after removing our new feature from the
> featuresBoot property in the config etc/org.apache.karaf.features.cfg and
> when I replace the startup.properties file with the one that ships with the
> vanilla karaf 4.2.1 distribution.  For what it’s worth, the Export
> statement in output for karaf.bat belongs to the
> lib/goot/org.osgi.core-6.0.0.jar.
>
> What settings can I modify to get more information about the bundle/jar
> file that’s causing the IndexOutOfBoundsException showing up in the
> karaf.log?
> --
> *Javer Delgadillo* | Realtime GIS Engineer/ScrumMaster
> *Esri* | 380 New York St | Redlands, CA 92373 | USA
> T 909 793 2853 x1068 | jdelgadillol@esri.com | esri.com
>
> *THE*
> *SCIENCE*
> *OF*
> *WHERE™*
>
>
>