You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@sling.apache.org by "Roll, Kevin" <Ke...@idexx.com> on 2015/04/16 19:45:55 UTC
Standalone jar archetype
We have created a project using the Maven standalone jar archetype:
mvn archetype:generate sling-launchpad-standalone-archetype
When built and launched this results in the following error:
C:\Projects\Jackrabbit\standalone\target>java -jar standalone-1.0-SNAPSHOT.jar
16.04.2015 12:51:57.714 *INFO* [main] Setting sling.home=sling (default)
16.04.2015 12:51:57.716 *INFO* [main] Starting Sling in sling (C:\Projects\Jackr
abbit\standalone\target\sling)
16.04.2015 12:51:57.734 *INFO* [main] Checking launcher JAR in folder sling
16.04.2015 12:51:57.752 *INFO* [main] Installing new launcher: jar:file:/C:/Proj
ects/Jackrabbit/standalone/target/standalone-1.0-SNAPSHOT.jar!/resources/org.apa
che.sling.launchpad.base.jar, 2.3.0 (org.apache.sling.launchpad.base.jar.1429203
117751)
16.04.2015 12:51:57.764 *INFO* [main] Loading launcher class org.apache.sling.la
unchpad.base.app.MainDelegate from org.apache.sling.launchpad.base.jar.142920311
7751
16.04.2015 12:51:57.782 *INFO* [main] Starting launcher ...
16.04.2015 12:51:57.787 *INFO* [main] HTTP server port: 8080
16.04.2015 12:51:57.845 *ERROR* [main] Failed to Start OSGi framework
org.osgi.framework.BundleException: Uncaught Instantiation Issue: java.lang.Arra
yIndexOutOfBoundsException: -1
at org.apache.sling.launchpad.base.impl.Sling.<init>(Sling.java:245)
at org.apache.sling.launchpad.base.app.MainDelegate$1.<init>(MainDelegat
e.java:159)
at org.apache.sling.launchpad.base.app.MainDelegate.start(MainDelegate.j
ava:159)
at org.apache.sling.launchpad.app.Main.startSling(Main.java:244)
at org.apache.sling.launchpad.app.Main.<init>(Main.java:107)
at org.apache.sling.launchpad.app.Main.main(Main.java:56)
Caused by: java.lang.ArrayIndexOutOfBoundsException: -1
at java.util.ArrayList.elementData(ArrayList.java:371)
at java.util.ArrayList.get(ArrayList.java:384)
at org.apache.felix.framework.BundleImpl.getCurrentModule(BundleImpl.jav
a:1046)
at org.apache.felix.framework.BundleImpl.getSymbolicName(BundleImpl.java
:863)
at org.apache.sling.launchpad.base.impl.SlingFelix.getSymbolicName(Sling
Felix.java:32)
at org.apache.felix.framework.Felix.toString(Felix.java:1012)
at org.apache.felix.framework.Logger.doLog(Logger.java:128)
at org.apache.felix.framework.Logger._log(Logger.java:181)
at org.apache.felix.framework.Logger.log(Logger.java:114)
at org.apache.felix.framework.ExtensionManager.<init>(ExtensionManager.j
ava:201)
at org.apache.felix.framework.Felix.<init>(Felix.java:374)
at org.apache.sling.launchpad.base.impl.SlingFelix.<init>(SlingFelix.jav
a:39)
at org.apache.sling.launchpad.base.impl.Sling.<init>(Sling.java:235)
... 5 more
16.04.2015 12:51:57.941 *ERROR* [main] There was a problem launching Sling
16.04.2015 12:51:57.945 *INFO* [Sling Terminator] Java VM is shutting down
I've traced it a bit and it seems to be a problem parsing the property 'org.osgi.framework.system.packages'. In sling/sling.properties I see:
org.osgi.framework.system.packages=${osgi-core-packages}, ${osgi-compendium-services}, org.apache.sling.launchpad.api;version\=1.0.0, ${jre-${java.specification.version}} ${org.apache.sling.launcher.system.packages}
Any ideas what could be wrong?
Re: Standalone jar archetype
Posted by Carsten Ziegeler <cz...@apache.org>.
Am 17.04.15 um 14:48 schrieb Roll, Kevin:
> Thanks, Carsten. I've created
>
> https://issues.apache.org/jira/browse/SLING-4633
>
> Is there any workaround in the meantime or is this deep inside the archetype?
>
This needs a change in one of the archetype files. If you check out
Sling and change
sling/tooling/maven/archetypes/launchpad-standalone/src/main/resources/archetype-resources/pom.xml.
There is a dependency to launchpad base, pointing it to the latest
release should do the trick
Regards
Carsten
> Thanks again!
>
>
> -----Original Message-----
> From: Carsten Ziegeler [mailto:cziegeler@apache.org]
> Sent: Friday, April 17, 2015 2:03 AM
> To: users@sling.apache.org
> Subject: Re: Standalone jar archetype
>
> I think this is a known bug in the launchpad base, which has been fixed
> in the meantime. So I guess the archetype needs to be update with a
> newer Sling version.
> I think the best would be to create an issue for this.
>
> Thanks
> Carsten
>
> Am 16.04.15 um 19:45 schrieb Roll, Kevin:
>> We have created a project using the Maven standalone jar archetype:
>>
>> mvn archetype:generate sling-launchpad-standalone-archetype
>>
>> When built and launched this results in the following error:
>>
>> C:\Projects\Jackrabbit\standalone\target>java -jar standalone-1.0-SNAPSHOT.jar
>> 16.04.2015 12:51:57.714 *INFO* [main] Setting sling.home=sling (default)
>> 16.04.2015 12:51:57.716 *INFO* [main] Starting Sling in sling (C:\Projects\Jackr
>> abbit\standalone\target\sling)
>> 16.04.2015 12:51:57.734 *INFO* [main] Checking launcher JAR in folder sling
>> 16.04.2015 12:51:57.752 *INFO* [main] Installing new launcher: jar:file:/C:/Proj
>> ects/Jackrabbit/standalone/target/standalone-1.0-SNAPSHOT.jar!/resources/org.apa
>> che.sling.launchpad.base.jar, 2.3.0 (org.apache.sling.launchpad.base.jar.1429203
>> 117751)
>> 16.04.2015 12:51:57.764 *INFO* [main] Loading launcher class org.apache.sling.la
>> unchpad.base.app.MainDelegate from org.apache.sling.launchpad.base.jar.142920311
>> 7751
>> 16.04.2015 12:51:57.782 *INFO* [main] Starting launcher ...
>> 16.04.2015 12:51:57.787 *INFO* [main] HTTP server port: 8080
>> 16.04.2015 12:51:57.845 *ERROR* [main] Failed to Start OSGi framework
>> org.osgi.framework.BundleException: Uncaught Instantiation Issue: java.lang.Arra
>> yIndexOutOfBoundsException: -1
>> at org.apache.sling.launchpad.base.impl.Sling.<init>(Sling.java:245)
>> at org.apache.sling.launchpad.base.app.MainDelegate$1.<init>(MainDelegat
>> e.java:159)
>> at org.apache.sling.launchpad.base.app.MainDelegate.start(MainDelegate.j
>> ava:159)
>> at org.apache.sling.launchpad.app.Main.startSling(Main.java:244)
>> at org.apache.sling.launchpad.app.Main.<init>(Main.java:107)
>> at org.apache.sling.launchpad.app.Main.main(Main.java:56)
>> Caused by: java.lang.ArrayIndexOutOfBoundsException: -1
>> at java.util.ArrayList.elementData(ArrayList.java:371)
>> at java.util.ArrayList.get(ArrayList.java:384)
>> at org.apache.felix.framework.BundleImpl.getCurrentModule(BundleImpl.jav
>> a:1046)
>> at org.apache.felix.framework.BundleImpl.getSymbolicName(BundleImpl.java
>> :863)
>> at org.apache.sling.launchpad.base.impl.SlingFelix.getSymbolicName(Sling
>> Felix.java:32)
>> at org.apache.felix.framework.Felix.toString(Felix.java:1012)
>> at org.apache.felix.framework.Logger.doLog(Logger.java:128)
>> at org.apache.felix.framework.Logger._log(Logger.java:181)
>> at org.apache.felix.framework.Logger.log(Logger.java:114)
>> at org.apache.felix.framework.ExtensionManager.<init>(ExtensionManager.j
>> ava:201)
>> at org.apache.felix.framework.Felix.<init>(Felix.java:374)
>> at org.apache.sling.launchpad.base.impl.SlingFelix.<init>(SlingFelix.jav
>> a:39)
>> at org.apache.sling.launchpad.base.impl.Sling.<init>(Sling.java:235)
>> ... 5 more
>> 16.04.2015 12:51:57.941 *ERROR* [main] There was a problem launching Sling
>> 16.04.2015 12:51:57.945 *INFO* [Sling Terminator] Java VM is shutting down
>>
>> I've traced it a bit and it seems to be a problem parsing the property 'org.osgi.framework.system.packages'. In sling/sling.properties I see:
>>
>> org.osgi.framework.system.packages=${osgi-core-packages}, ${osgi-compendium-services}, org.apache.sling.launchpad.api;version\=1.0.0, ${jre-${java.specification.version}} ${org.apache.sling.launcher.system.packages}
>>
>>
>> Any ideas what could be wrong?
>>
>>
>>
>>
>
>
--
Carsten Ziegeler
Adobe Research Switzerland
cziegeler@apache.org
RE: Standalone jar archetype
Posted by "Roll, Kevin" <Ke...@idexx.com>.
Thanks, Carsten. I've created
https://issues.apache.org/jira/browse/SLING-4633
Is there any workaround in the meantime or is this deep inside the archetype?
Thanks again!
-----Original Message-----
From: Carsten Ziegeler [mailto:cziegeler@apache.org]
Sent: Friday, April 17, 2015 2:03 AM
To: users@sling.apache.org
Subject: Re: Standalone jar archetype
I think this is a known bug in the launchpad base, which has been fixed
in the meantime. So I guess the archetype needs to be update with a
newer Sling version.
I think the best would be to create an issue for this.
Thanks
Carsten
Am 16.04.15 um 19:45 schrieb Roll, Kevin:
> We have created a project using the Maven standalone jar archetype:
>
> mvn archetype:generate sling-launchpad-standalone-archetype
>
> When built and launched this results in the following error:
>
> C:\Projects\Jackrabbit\standalone\target>java -jar standalone-1.0-SNAPSHOT.jar
> 16.04.2015 12:51:57.714 *INFO* [main] Setting sling.home=sling (default)
> 16.04.2015 12:51:57.716 *INFO* [main] Starting Sling in sling (C:\Projects\Jackr
> abbit\standalone\target\sling)
> 16.04.2015 12:51:57.734 *INFO* [main] Checking launcher JAR in folder sling
> 16.04.2015 12:51:57.752 *INFO* [main] Installing new launcher: jar:file:/C:/Proj
> ects/Jackrabbit/standalone/target/standalone-1.0-SNAPSHOT.jar!/resources/org.apa
> che.sling.launchpad.base.jar, 2.3.0 (org.apache.sling.launchpad.base.jar.1429203
> 117751)
> 16.04.2015 12:51:57.764 *INFO* [main] Loading launcher class org.apache.sling.la
> unchpad.base.app.MainDelegate from org.apache.sling.launchpad.base.jar.142920311
> 7751
> 16.04.2015 12:51:57.782 *INFO* [main] Starting launcher ...
> 16.04.2015 12:51:57.787 *INFO* [main] HTTP server port: 8080
> 16.04.2015 12:51:57.845 *ERROR* [main] Failed to Start OSGi framework
> org.osgi.framework.BundleException: Uncaught Instantiation Issue: java.lang.Arra
> yIndexOutOfBoundsException: -1
> at org.apache.sling.launchpad.base.impl.Sling.<init>(Sling.java:245)
> at org.apache.sling.launchpad.base.app.MainDelegate$1.<init>(MainDelegat
> e.java:159)
> at org.apache.sling.launchpad.base.app.MainDelegate.start(MainDelegate.j
> ava:159)
> at org.apache.sling.launchpad.app.Main.startSling(Main.java:244)
> at org.apache.sling.launchpad.app.Main.<init>(Main.java:107)
> at org.apache.sling.launchpad.app.Main.main(Main.java:56)
> Caused by: java.lang.ArrayIndexOutOfBoundsException: -1
> at java.util.ArrayList.elementData(ArrayList.java:371)
> at java.util.ArrayList.get(ArrayList.java:384)
> at org.apache.felix.framework.BundleImpl.getCurrentModule(BundleImpl.jav
> a:1046)
> at org.apache.felix.framework.BundleImpl.getSymbolicName(BundleImpl.java
> :863)
> at org.apache.sling.launchpad.base.impl.SlingFelix.getSymbolicName(Sling
> Felix.java:32)
> at org.apache.felix.framework.Felix.toString(Felix.java:1012)
> at org.apache.felix.framework.Logger.doLog(Logger.java:128)
> at org.apache.felix.framework.Logger._log(Logger.java:181)
> at org.apache.felix.framework.Logger.log(Logger.java:114)
> at org.apache.felix.framework.ExtensionManager.<init>(ExtensionManager.j
> ava:201)
> at org.apache.felix.framework.Felix.<init>(Felix.java:374)
> at org.apache.sling.launchpad.base.impl.SlingFelix.<init>(SlingFelix.jav
> a:39)
> at org.apache.sling.launchpad.base.impl.Sling.<init>(Sling.java:235)
> ... 5 more
> 16.04.2015 12:51:57.941 *ERROR* [main] There was a problem launching Sling
> 16.04.2015 12:51:57.945 *INFO* [Sling Terminator] Java VM is shutting down
>
> I've traced it a bit and it seems to be a problem parsing the property 'org.osgi.framework.system.packages'. In sling/sling.properties I see:
>
> org.osgi.framework.system.packages=${osgi-core-packages}, ${osgi-compendium-services}, org.apache.sling.launchpad.api;version\=1.0.0, ${jre-${java.specification.version}} ${org.apache.sling.launcher.system.packages}
>
>
> Any ideas what could be wrong?
>
>
>
>
--
Carsten Ziegeler
Adobe Research Switzerland
cziegeler@apache.org
Re: Standalone jar archetype
Posted by Carsten Ziegeler <cz...@apache.org>.
I think this is a known bug in the launchpad base, which has been fixed
in the meantime. So I guess the archetype needs to be update with a
newer Sling version.
I think the best would be to create an issue for this.
Thanks
Carsten
Am 16.04.15 um 19:45 schrieb Roll, Kevin:
> We have created a project using the Maven standalone jar archetype:
>
> mvn archetype:generate sling-launchpad-standalone-archetype
>
> When built and launched this results in the following error:
>
> C:\Projects\Jackrabbit\standalone\target>java -jar standalone-1.0-SNAPSHOT.jar
> 16.04.2015 12:51:57.714 *INFO* [main] Setting sling.home=sling (default)
> 16.04.2015 12:51:57.716 *INFO* [main] Starting Sling in sling (C:\Projects\Jackr
> abbit\standalone\target\sling)
> 16.04.2015 12:51:57.734 *INFO* [main] Checking launcher JAR in folder sling
> 16.04.2015 12:51:57.752 *INFO* [main] Installing new launcher: jar:file:/C:/Proj
> ects/Jackrabbit/standalone/target/standalone-1.0-SNAPSHOT.jar!/resources/org.apa
> che.sling.launchpad.base.jar, 2.3.0 (org.apache.sling.launchpad.base.jar.1429203
> 117751)
> 16.04.2015 12:51:57.764 *INFO* [main] Loading launcher class org.apache.sling.la
> unchpad.base.app.MainDelegate from org.apache.sling.launchpad.base.jar.142920311
> 7751
> 16.04.2015 12:51:57.782 *INFO* [main] Starting launcher ...
> 16.04.2015 12:51:57.787 *INFO* [main] HTTP server port: 8080
> 16.04.2015 12:51:57.845 *ERROR* [main] Failed to Start OSGi framework
> org.osgi.framework.BundleException: Uncaught Instantiation Issue: java.lang.Arra
> yIndexOutOfBoundsException: -1
> at org.apache.sling.launchpad.base.impl.Sling.<init>(Sling.java:245)
> at org.apache.sling.launchpad.base.app.MainDelegate$1.<init>(MainDelegat
> e.java:159)
> at org.apache.sling.launchpad.base.app.MainDelegate.start(MainDelegate.j
> ava:159)
> at org.apache.sling.launchpad.app.Main.startSling(Main.java:244)
> at org.apache.sling.launchpad.app.Main.<init>(Main.java:107)
> at org.apache.sling.launchpad.app.Main.main(Main.java:56)
> Caused by: java.lang.ArrayIndexOutOfBoundsException: -1
> at java.util.ArrayList.elementData(ArrayList.java:371)
> at java.util.ArrayList.get(ArrayList.java:384)
> at org.apache.felix.framework.BundleImpl.getCurrentModule(BundleImpl.jav
> a:1046)
> at org.apache.felix.framework.BundleImpl.getSymbolicName(BundleImpl.java
> :863)
> at org.apache.sling.launchpad.base.impl.SlingFelix.getSymbolicName(Sling
> Felix.java:32)
> at org.apache.felix.framework.Felix.toString(Felix.java:1012)
> at org.apache.felix.framework.Logger.doLog(Logger.java:128)
> at org.apache.felix.framework.Logger._log(Logger.java:181)
> at org.apache.felix.framework.Logger.log(Logger.java:114)
> at org.apache.felix.framework.ExtensionManager.<init>(ExtensionManager.j
> ava:201)
> at org.apache.felix.framework.Felix.<init>(Felix.java:374)
> at org.apache.sling.launchpad.base.impl.SlingFelix.<init>(SlingFelix.jav
> a:39)
> at org.apache.sling.launchpad.base.impl.Sling.<init>(Sling.java:235)
> ... 5 more
> 16.04.2015 12:51:57.941 *ERROR* [main] There was a problem launching Sling
> 16.04.2015 12:51:57.945 *INFO* [Sling Terminator] Java VM is shutting down
>
> I've traced it a bit and it seems to be a problem parsing the property 'org.osgi.framework.system.packages'. In sling/sling.properties I see:
>
> org.osgi.framework.system.packages=${osgi-core-packages}, ${osgi-compendium-services}, org.apache.sling.launchpad.api;version\=1.0.0, ${jre-${java.specification.version}} ${org.apache.sling.launcher.system.packages}
>
>
> Any ideas what could be wrong?
>
>
>
>
--
Carsten Ziegeler
Adobe Research Switzerland
cziegeler@apache.org