You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by Rajini Sivaram <ra...@googlemail.com> on 2007/11/20 12:42:51 UTC

Wrapping com.ibm.icu.icu4j using maven-bundle-plugin

Hello,

When trying to wrap com.ibm.icu.icu4j (2.6.1) using maven-bundle-plugin, I
get the exception:

java.lang.ArrayIndexOutOfBoundsException
        at aQute.lib.osgi.Clazz.parseClassFile(Clazz.java:131)
        at aQute.lib.osgi.Clazz.<init>(Clazz.java:66)
        at aQute.lib.osgi.Processor.analyzeJar(Processor.java:153)
        at aQute.lib.osgi.Processor.analyzeBundleClasspath(Processor.java
:71)
        at aQute.lib.osgi.Verifier.verify(Verifier.java:354)
        at aQute.lib.osgi.Builder.doVerify(Builder.java:215)
        at aQute.lib.osgi.Builder.build(Builder.java:50)
        at org.apache.felix.bundleplugin.BundlePlugin.execute(
BundlePlugin.java:276)
        at org.apache.felix.bundleplugin.BundlePlugin.execute(
BundlePlugin.java:172)
        at org.apache.felix.bundleplugin.BundlePlugin.execute(
BundlePlugin.java:164)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(
DefaultPluginManager.java:443)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
DefaultLifecycleExecutor.java:539)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle
(DefaultLifecycleExecutor.java:480)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(
DefaultLifecycleExecutor.java:459)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures
(DefaultLifecycleExecutor.java:
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
DefaultLifecycleExecutor.java:278)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(
DefaultLifecycleExecutor.java:143)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:280)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:79)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:618)
        at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java
:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java
:430)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)

followed by:

      [ERROR] Error building bundle
org.apache.tuscany.sca.distribution:com.ibm.icu.icu4j:bundle:2.6.1-001-SNAPSHOT:
Invalid class file:
com/ibm/icu/impl/data/LocaleElements_zh__PINYIN.class
null


Is there some way I can force the plugin to ignore the error and carry on?
Or ignore this class?

Thank you...

Regards,

Rajini

Re: Wrapping com.ibm.icu.icu4j using maven-bundle-plugin

Posted by Rajini Sivaram <ra...@googlemail.com>.
Thank you, Stuart. <_failok> was exactly what I was looking for.

Thank you...

Regards,

Rajini


On 11/20/07, Stuart McCulloch <st...@jayway.net> wrote:
>
> On 20/11/2007, Rajini Sivaram <ra...@googlemail.com> wrote:
> >
> > Hello,
> >
> > When trying to wrap com.ibm.icu.icu4j (2.6.1) using maven-bundle-plugin,
> I
> > get the exception:
> >
> > java.lang.ArrayIndexOutOfBoundsException
> >         at aQute.lib.osgi.Clazz.parseClassFile(Clazz.java:131)
> >         at aQute.lib.osgi.Clazz.<init>(Clazz.java:66)
> >         at aQute.lib.osgi.Processor.analyzeJar(Processor.java:153)
> >         at aQute.lib.osgi.Processor.analyzeBundleClasspath(
> Processor.java
> > :71)
> >         at aQute.lib.osgi.Verifier.verify(Verifier.java:354)
> >         at aQute.lib.osgi.Builder.doVerify(Builder.java:215)
> >         at aQute.lib.osgi.Builder.build(Builder.java:50)
> >         at org.apache.felix.bundleplugin.BundlePlugin.execute(
> > BundlePlugin.java:276)
> >         at org.apache.felix.bundleplugin.BundlePlugin.execute(
> > BundlePlugin.java:172)
> >         at org.apache.felix.bundleplugin.BundlePlugin.execute(
> > BundlePlugin.java:164)
> >         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(
> > DefaultPluginManager.java:443)
> >         at
> > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
> > DefaultLifecycleExecutor.java:539)
> >         at
> >
> >
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle
> > (DefaultLifecycleExecutor.java:480)
> >         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal
> > (
> > DefaultLifecycleExecutor.java:459)
> >         at
> >
> >
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures
> > (DefaultLifecycleExecutor.java:
> >         at
> > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
> > DefaultLifecycleExecutor.java:278)
> >         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(
> > DefaultLifecycleExecutor.java:143)
> >         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java
> :334)
> >         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
> >         at org.apache.maven.cli.MavenCli.main(MavenCli.java:280)
> >         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >         at sun.reflect.NativeMethodAccessorImpl.invoke(
> > NativeMethodAccessorImpl.java:79)
> >         at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> > DelegatingMethodAccessorImpl.java:43)
> >         at java.lang.reflect.Method.invoke(Method.java:618)
> >         at org.codehaus.classworlds.Launcher.launchEnhanced(
> Launcher.java
> > :315)
> >         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> >         at org.codehaus.classworlds.Launcher.mainWithExitCode(
> > Launcher.java
> > :430)
> >         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> >
> > followed by:
> >
> >       [ERROR] Error building bundle
> >
> >
> org.apache.tuscany.sca.distribution:com.ibm.icu.icu4j:bundle:2.6.1-001-SNAPSHOT:
> > Invalid class file:
> > com/ibm/icu/impl/data/LocaleElements_zh__PINYIN.class
> > null
> >
> >
> > Is there some way I can force the plugin to ignore the error and carry
> on?
> > Or ignore this class?
>
>
> you can add:
>
>   <_failok/>
>
> to your Bnd instructions in the POM to get Bnd to ignore errors during
> bundling.
> ( see '-failok' directive described in
> http://www.aqute.biz/Code/Bnd#directives )
> note the use of '_' instead of '-' because XML doesn't allow tags starting
> with '-'
>
> BTW, more recent versions of icu4j (ie. 3.4.4) don't appear to have this
> problem
>
> Thank you...
> >
> > Regards,
> >
> > Rajini
> >
>
>
>
> --
> Cheers, Stuart
>

Re: Wrapping com.ibm.icu.icu4j using maven-bundle-plugin

Posted by Stuart McCulloch <st...@jayway.net>.
On 20/11/2007, Rajini Sivaram <ra...@googlemail.com> wrote:
>
> Hello,
>
> When trying to wrap com.ibm.icu.icu4j (2.6.1) using maven-bundle-plugin, I
> get the exception:
>
> java.lang.ArrayIndexOutOfBoundsException
>         at aQute.lib.osgi.Clazz.parseClassFile(Clazz.java:131)
>         at aQute.lib.osgi.Clazz.<init>(Clazz.java:66)
>         at aQute.lib.osgi.Processor.analyzeJar(Processor.java:153)
>         at aQute.lib.osgi.Processor.analyzeBundleClasspath(Processor.java
> :71)
>         at aQute.lib.osgi.Verifier.verify(Verifier.java:354)
>         at aQute.lib.osgi.Builder.doVerify(Builder.java:215)
>         at aQute.lib.osgi.Builder.build(Builder.java:50)
>         at org.apache.felix.bundleplugin.BundlePlugin.execute(
> BundlePlugin.java:276)
>         at org.apache.felix.bundleplugin.BundlePlugin.execute(
> BundlePlugin.java:172)
>         at org.apache.felix.bundleplugin.BundlePlugin.execute(
> BundlePlugin.java:164)
>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(
> DefaultPluginManager.java:443)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
> DefaultLifecycleExecutor.java:539)
>         at
>
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle
> (DefaultLifecycleExecutor.java:480)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal
> (
> DefaultLifecycleExecutor.java:459)
>         at
>
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures
> (DefaultLifecycleExecutor.java:
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
> DefaultLifecycleExecutor.java:278)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(
> DefaultLifecycleExecutor.java:143)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:280)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java:79)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:618)
>         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java
> :315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at org.codehaus.classworlds.Launcher.mainWithExitCode(
> Launcher.java
> :430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
>
> followed by:
>
>       [ERROR] Error building bundle
>
> org.apache.tuscany.sca.distribution:com.ibm.icu.icu4j:bundle:2.6.1-001-SNAPSHOT:
> Invalid class file:
> com/ibm/icu/impl/data/LocaleElements_zh__PINYIN.class
> null
>
>
> Is there some way I can force the plugin to ignore the error and carry on?
> Or ignore this class?


you can add:

   <_failok/>

to your Bnd instructions in the POM to get Bnd to ignore errors during
bundling.
( see '-failok' directive described in
http://www.aqute.biz/Code/Bnd#directives )
note the use of '_' instead of '-' because XML doesn't allow tags starting
with '-'

BTW, more recent versions of icu4j (ie. 3.4.4) don't appear to have this
problem

Thank you...
>
> Regards,
>
> Rajini
>



-- 
Cheers, Stuart