You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@karaf.apache.org by ntle <nt...@castortech.com> on 2019/02/19 15:44:20 UTC

java.lang.ArrayIndexOutOfBoundsException: 34983 when install war file

Hello,
I'm new karaf and I'm trying to install JavaBridge.war
(http://php-java-bridge.sourceforge.net/pjb/download.php) on karaf runtime
4.2.3 and i got quite some errors. At first, installing the war with the
command:
bundle:install -s
"webbundle:file:///C:/JavaBridge.war?Bundle-SymbolicName=nanospell&Web-ContextPath=/nanospell"
give me this error: "Unable to cache bundle:". Connecting a debugger show me
that the WebBundleConnection cannot retrieve the manifest of the war (Caused
by: java.lang.NullPointerException
		at
org.ops4j.pax.url.war.internal.WebBundleConnection.createBundle(WebBundleConnection.java:64)
		at
org.ops4j.pax.url.war.internal.AbstractConnection.getInputStream(AbstractConnection.java:143)
although the war do have the manifest file in META-INF.
Then i unzip the war and place the folder in karaf's deploy folder and start
the server, this time WebBundleConnection found the manifest and went
further abit. When it's trying to analyze the bundle to convert into wab, it
failed at com.ibm.icu.text.SimpleDateFormat.class with
java.lang.ArrayIndexOutOfBoundsException. A quick google show that this
error was reported back in 2014
(https://dev.felix.apache.narkive.com/FWnADZ4r/jira-created-felix-4556-maven-bundle-plugin-fails-with-arrayindexoutofboundsexception-invalid-class-)
and should be fixed in bndlib 2.4.1. I think karaf 4.2.3 is using
pax-url-war 2.6.1 which uses biz.aQute.bnd.bndlib 2.3.0 which may not have
this bug fixed.  Can someone confirm this bug? Should i build karaf with a
higher version of bndlib?



--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-Dev-f930721.html

Re: java.lang.ArrayIndexOutOfBoundsException: 34983 when install war file

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

I will take a look. We mostly deploy WAB in Karaf. We also have a
example using regular war (the war created from the documentation), let
me check if I did the corresponding itest.

Regards
JB

On 19/02/2019 16:44, ntle wrote:
> Hello,
> I'm new karaf and I'm trying to install JavaBridge.war
> (http://php-java-bridge.sourceforge.net/pjb/download.php) on karaf runtime
> 4.2.3 and i got quite some errors. At first, installing the war with the
> command:
> bundle:install -s
> "webbundle:file:///C:/JavaBridge.war?Bundle-SymbolicName=nanospell&Web-ContextPath=/nanospell"
> give me this error: "Unable to cache bundle:". Connecting a debugger show me
> that the WebBundleConnection cannot retrieve the manifest of the war (Caused
> by: java.lang.NullPointerException
> 		at
> org.ops4j.pax.url.war.internal.WebBundleConnection.createBundle(WebBundleConnection.java:64)
> 		at
> org.ops4j.pax.url.war.internal.AbstractConnection.getInputStream(AbstractConnection.java:143)
> although the war do have the manifest file in META-INF.
> Then i unzip the war and place the folder in karaf's deploy folder and start
> the server, this time WebBundleConnection found the manifest and went
> further abit. When it's trying to analyze the bundle to convert into wab, it
> failed at com.ibm.icu.text.SimpleDateFormat.class with
> java.lang.ArrayIndexOutOfBoundsException. A quick google show that this
> error was reported back in 2014
> (https://dev.felix.apache.narkive.com/FWnADZ4r/jira-created-felix-4556-maven-bundle-plugin-fails-with-arrayindexoutofboundsexception-invalid-class-)
> and should be fixed in bndlib 2.4.1. I think karaf 4.2.3 is using
> pax-url-war 2.6.1 which uses biz.aQute.bnd.bndlib 2.3.0 which may not have
> this bug fixed.  Can someone confirm this bug? Should i build karaf with a
> higher version of bndlib?
> 
> 
> 
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-Dev-f930721.html
> 

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