[ 
https://issues.apache.org/jira/browse/FELIX-6120?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16833981#comment-16833981
 ] 

Matthias Wegner commented on FELIX-6120:
----------------------------------------

Ok. Close the issue. v4.1.0 works fine.

> java.lang.ArrayIndexOutOfBoundsException: Index 18 out of bounds for length 13
> ------------------------------------------------------------------------------
>
>                 Key: FELIX-6120
>                 URL: https://issues.apache.org/jira/browse/FELIX-6120
>             Project: Felix
>          Issue Type: Bug
>          Components: Maven Bundle Plugin
>    Affects Versions: framework-6.0.3
>         Environment: Description:     Ubuntu 18.04.2 LTS
> Release:      18.04
> Codename:     bionic
> Eclipse Version: Photon Release (4.8.0)
> Build id: 20180619-1200
>            Reporter: Matthias Wegner
>            Priority: Critical
>
>  
> I create a simple Framework with Felix.
> See Framework at 
> [https://gitlab.com/gebetshausfreiburg/circlead.application.core]
> and first extension at 
> [https://gitlab.com/gebetshausfreiburg/circlead.extension.one]
>  
> When i compile the extension with "mvn install" then following error occurs 
> in maven
>  
> {code:java}
> [INFO] Scanning for projects...
> [INFO]
> [INFO] -----------------< org.rogatio:circlead.extension.one 
> >-----------------
> [INFO] Building circlead.extension.one 0.0.1-SNAPSHOT
> [INFO] -------------------------------[ bundle 
> ]-------------------------------
> [INFO]
> [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ 
> circlead.extension.one ---
> [INFO] Deleting 
> /home/matthias/Programming/eclipse-workspace/circlead.extension.one/target
> [INFO]
> [INFO] --- maven-resources-plugin:3.0.2:resources (default-resources) @ 
> circlead.extension.one ---
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] Copying 1 resource
> [INFO]
> [INFO] --- maven-compiler-plugin:3.6.1:compile (default-compile) @ 
> circlead.extension.one ---
> [INFO] Changes detected - recompiling the module!
> [INFO] Compiling 1 source file to 
> /home/matthias/Programming/eclipse-workspace/circlead.extension.one/target/classes
> [INFO]
> [INFO] --- maven-resources-plugin:3.0.2:testResources (default-testResources) 
> @ circlead.extension.one ---
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] skip non existing resourceDirectory 
> /home/matthias/Programming/eclipse-workspace/circlead.extension.one/src/test/resources
> [INFO]
> [INFO] --- maven-compiler-plugin:3.6.1:testCompile (default-testCompile) @ 
> circlead.extension.one ---
> [INFO] Nothing to compile - all classes are up to date
> [INFO]
> [INFO] --- maven-surefire-plugin:3.0.0-M3:test (default-test) @ 
> circlead.extension.one ---
> [INFO] No tests to run.
> [INFO]
> [INFO] --- maven-bundle-plugin:1.4.0:bundle (default-bundle) @ 
> circlead.extension.one ---
> java.lang.ArrayIndexOutOfBoundsException: Index 18 out of bounds for length 13
>     at aQute.lib.osgi.Clazz.parseClassFile(Clazz.java:130)
>     at aQute.lib.osgi.Clazz.<init>(Clazz.java:65)
>     at aQute.lib.osgi.Processor.analyzeJar(Processor.java:159)
>     at aQute.lib.osgi.Processor.analyzeBundleClasspath(Processor.java:77)
>     at aQute.lib.osgi.Analyzer.analyze(Analyzer.java:194)
>     at aQute.lib.osgi.Builder.analyze(Builder.java:93)
>     at aQute.lib.osgi.Analyzer.calcManifest(Analyzer.java:280)
>     at aQute.lib.osgi.Builder.build(Builder.java:43)
>     at 
> org.apache.felix.bundleplugin.BundlePlugin.buildOSGiBundle(BundlePlugin.java:382)
>     at 
> org.apache.felix.bundleplugin.BundlePlugin.execute(BundlePlugin.java:272)
>     at 
> org.apache.felix.bundleplugin.BundlePlugin.execute(BundlePlugin.java:226)
>     at 
> org.apache.felix.bundleplugin.BundlePlugin.execute(BundlePlugin.java:217)
>     at 
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
>     at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
>     at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
>     at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
>     at 
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
>     at 
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
>     at 
> org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
>     at 
> org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
>     at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
>     at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
>     at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
>     at org.apache.maven.cli.MavenCli.execute(MavenCli.java:956)
>     at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
>     at org.apache.maven.cli.MavenCli.main(MavenCli.java:192)
>     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native 
> Method)
>     at 
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>     at 
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>     at java.base/java.lang.reflect.Method.invoke(Method.java:566)
>     at 
> org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
>     at 
> org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
>     at 
> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
>     at 
> org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
> java.lang.ArrayIndexOutOfBoundsException: Index 18 out of bounds for length 13
>     at aQute.lib.osgi.Clazz.parseClassFile(Clazz.java:130)
>     at aQute.lib.osgi.Clazz.<init>(Clazz.java:65)
>     at aQute.lib.osgi.Processor.analyzeJar(Processor.java:159)
>     at aQute.lib.osgi.Processor.analyzeBundleClasspath(Processor.java:77)
>     at aQute.lib.osgi.Verifier.verify(Verifier.java:351)
>     at aQute.lib.osgi.Builder.doVerify(Builder.java:213)
>     at aQute.lib.osgi.Builder.build(Builder.java:50)
>     at 
> org.apache.felix.bundleplugin.BundlePlugin.buildOSGiBundle(BundlePlugin.java:382)
>     at 
> org.apache.felix.bundleplugin.BundlePlugin.execute(BundlePlugin.java:272)
>     at 
> org.apache.felix.bundleplugin.BundlePlugin.execute(BundlePlugin.java:226)
>     at 
> org.apache.felix.bundleplugin.BundlePlugin.execute(BundlePlugin.java:217)
>     at 
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
>     at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
>     at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
>     at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
>     at 
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
>     at 
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
>     at 
> org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
>     at 
> org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
>     at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
>     at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
>     at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
>     at org.apache.maven.cli.MavenCli.execute(MavenCli.java:956)
>     at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
>     at org.apache.maven.cli.MavenCli.main(MavenCli.java:192)
>     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native 
> Method)
>     at 
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>     at 
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>     at java.base/java.lang.reflect.Method.invoke(Method.java:566)
>     at 
> org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
>     at 
> org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
>     at 
> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
>     at 
> org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
> [WARNING] Warning building bundle 
> org.rogatio:circlead.extension.one:bundle:0.0.1-SNAPSHOT : Did not find 
> matching referal for *
> [ERROR] Error building bundle 
> org.rogatio:circlead.extension.one:bundle:0.0.1-SNAPSHOT : Invalid class 
> file: org/rogatio/circlead/sunray/extension/one/FirstExtension.class Index 18 
> out of bounds for length 13
> [ERROR] Error building bundle 
> org.rogatio:circlead.extension.one:bundle:0.0.1-SNAPSHOT : Invalid class 
> file: org/rogatio/circlead/sunray/extension/one/FirstExtension.class Index 18 
> out of bounds for length 13
> [ERROR] Error(s) found in bundle configuration
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Total time:  2.203 s
> [INFO] Finished at: 2019-05-05T21:39:49+02:00
> [INFO] 
> ------------------------------------------------------------------------
> [ERROR] Failed to execute goal 
> org.apache.felix:maven-bundle-plugin:1.4.0:bundle (default-bundle) on project 
> circlead.extension.one: Error(s) found in bundle configuration -> [Help 1]
> [ERROR]
> [ERROR] To see the full stack trace of the errors, re-run Maven with the -e 
> switch.
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> [ERROR]
> [ERROR] For more information about the errors and possible solutions, please 
> read the following articles:
> [ERROR] [Help 1] 
> http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
> {code}
> I only can fix this "bug", when i change the comment line in the class 
> [https://gitlab.com/gebetshausfreiburg/circlead.extension.one/blob/master/src/main/java/org/rogatio/circlead/sunray/extension/one/FirstExtension.java]
>  . After rerun maven it works "once". Then i have to change the commentline 
> again and it works again - bad behaviour.
> When i try to change in the pom the maven-bundle-plugin from v1.4.0 (used 
> from code-example with shapes) to v2.x.x then i get the error
> {code:java}
> [INFO] Scanning for projects...
> [INFO]
> [INFO] -----------------< org.rogatio:circlead.extension.one 
> >-----------------
> [INFO] Building circlead.extension.one 0.0.1-SNAPSHOT
> [INFO] -------------------------------[ bundle 
> ]-------------------------------
> [INFO]
> [INFO] --- maven-resources-plugin:3.0.2:resources (default-resources) @ 
> circlead.extension.one ---
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] Copying 1 resource
> [INFO]
> [INFO] --- maven-compiler-plugin:3.6.1:compile (default-compile) @ 
> circlead.extension.one ---
> [INFO] Changes detected - recompiling the module!
> [INFO] Compiling 1 source file to 
> /home/matthias/Programming/git-repository/circlead.extension.one/target/classes
> [INFO]
> [INFO] --- maven-resources-plugin:3.0.2:testResources (default-testResources) 
> @ circlead.extension.one ---
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] skip non existing resourceDirectory 
> /home/matthias/Programming/git-repository/circlead.extension.one/src/test/resources
> [INFO]
> [INFO] --- maven-compiler-plugin:3.6.1:testCompile (default-testCompile) @ 
> circlead.extension.one ---
> [INFO] Nothing to compile - all classes are up to date
> [INFO]
> [INFO] --- maven-surefire-plugin:3.0.0-M3:test (default-test) @ 
> circlead.extension.one ---
> [INFO]
> [INFO] >>> maven-bundle-plugin:2.5.4:bundle (default-bundle) > package @ 
> circlead.extension.one >>>
> [INFO]
> [INFO] --- maven-resources-plugin:3.0.2:resources (default-resources) @ 
> circlead.extension.one ---
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] Copying 1 resource
> [INFO]
> [INFO] --- maven-compiler-plugin:3.6.1:compile (default-compile) @ 
> circlead.extension.one ---
> [INFO] Nothing to compile - all classes are up to date
> [INFO]
> [INFO] --- maven-resources-plugin:3.0.2:testResources (default-testResources) 
> @ circlead.extension.one ---
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] skip non existing resourceDirectory 
> /home/matthias/Programming/git-repository/circlead.extension.one/src/test/resources
> [INFO]
> [INFO] --- maven-compiler-plugin:3.6.1:testCompile (default-testCompile) @ 
> circlead.extension.one ---
> [INFO] Nothing to compile - all classes are up to date
> [INFO]
> [INFO] --- maven-surefire-plugin:3.0.0-M3:test (default-test) @ 
> circlead.extension.one ---
> [INFO] Skipping execution of surefire because it has already been run for 
> this configuration
> [INFO]
> [INFO] <<< maven-bundle-plugin:2.5.4:bundle (default-bundle) < package @ 
> circlead.extension.one <<<
> [INFO]
> [INFO]
> [INFO] --- maven-bundle-plugin:2.5.4:bundle (default-bundle) @ 
> circlead.extension.one ---
> java.lang.NullPointerException
>     at aQute.bnd.osgi.Processor.quote(Processor.java:1322)
>     at aQute.bnd.header.Attrs.append(Attrs.java:404)
>     at aQute.bnd.header.Parameters.append(Parameters.java:172)
>     at aQute.bnd.header.Parameters.toString(Parameters.java:161)
>     at aQute.bnd.osgi.Analyzer.calcManifest(Analyzer.java:719)
>     at aQute.bnd.osgi.Builder.build(Builder.java:81)
>     at 
> org.apache.felix.bundleplugin.BundlePlugin.buildOSGiBundle(BundlePlugin.java:632)
>     at 
> org.apache.felix.bundleplugin.BundlePlugin.execute(BundlePlugin.java:351)
>     at 
> org.apache.felix.bundleplugin.BundlePlugin.execute(BundlePlugin.java:268)
>     at 
> org.apache.felix.bundleplugin.BundlePlugin.execute(BundlePlugin.java:259)
>     at 
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
>     at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
>     at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)
>     at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)
>     at 
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
>     at 
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
>     at 
> org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
>     at 
> org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
>     at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
>     at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
>     at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
>     at org.apache.maven.cli.MavenCli.execute(MavenCli.java:956)
>     at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:290)
>     at org.apache.maven.cli.MavenCli.main(MavenCli.java:194)
>     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native 
> Method)
>     at 
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>     at 
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>     at java.base/java.lang.reflect.Method.invoke(Method.java:566)
>     at 
> org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
>     at 
> org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
>     at 
> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
>     at 
> org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
> [ERROR] An internal error occurred
> java.lang.IllegalArgumentException: Null query
>     at aQute.lib.filter.Filter.<init>(Filter.java:269)
>     at aQute.bnd.osgi.Verifier.verifyRequirements(Verifier.java:693)
>     at aQute.bnd.osgi.Verifier.verify(Verifier.java:519)
>     at aQute.bnd.osgi.Builder.doVerify(Builder.java:488)
>     at aQute.bnd.osgi.Builder.build(Builder.java:125)
>     at 
> org.apache.felix.bundleplugin.BundlePlugin.buildOSGiBundle(BundlePlugin.java:632)
>     at 
> org.apache.felix.bundleplugin.BundlePlugin.execute(BundlePlugin.java:351)
>     at 
> org.apache.felix.bundleplugin.BundlePlugin.execute(BundlePlugin.java:268)
>     at 
> org.apache.felix.bundleplugin.BundlePlugin.execute(BundlePlugin.java:259)
>     at 
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
>     at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
>     at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)
>     at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)
>     at 
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
>     at 
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
>     at 
> org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
>     at 
> org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
>     at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
>     at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
>     at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
>     at org.apache.maven.cli.MavenCli.execute(MavenCli.java:956)
>     at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:290)
>     at org.apache.maven.cli.MavenCli.main(MavenCli.java:194)
>     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native 
> Method)
>     at 
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>     at 
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>     at java.base/java.lang.reflect.Method.invoke(Method.java:566)
>     at 
> org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
>     at 
> org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
>     at 
> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
>     at 
> org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Total time: 3.459 s
> [INFO] Finished at: 2019-05-05T22:45:07+02:00
> [INFO] 
> ------------------------------------------------------------------------
> [ERROR] Failed to execute goal 
> org.apache.felix:maven-bundle-plugin:2.5.4:bundle (default-bundle) on project 
> circlead.extension.one: Internal error in maven-bundle-plugin: Null query -> 
> [Help 1]
> [ERROR]
> [ERROR] To see the full stack trace of the errors, re-run Maven with the -e 
> switch.
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> [ERROR]
> [ERROR] For more information about the errors and possible solutions, please 
> read the following articles:
> [ERROR] [Help 1] 
> http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
> {code}
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to