So I was working on OpenDaylight, and the below error was blocking me from building the messaging4transport project locally with maven successfully.
[INFO] Processing feature: odl-messaging4transport
Sep 27, 2015 2:26:12 AM org.apache.bsf.BSFManager eval
SEVERE: Exception:
java.security.PrivilegedActionException: org.apache.bsf.BSFException: exception from Groovy: java.lang.ArrayIndexOutOfBoundsException: 2
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.bsf.BSFManager.eval(BSFManager.java:442)
at com.alexecollins.maven.plugin.ExecuteMojo.execute2(ExecuteMojo.java:119)
at com.alexecollins.maven.plugin.ExecuteMojo.execute(ExecuteMojo.java:52)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:317)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
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)
Caused by: org.apache.bsf.BSFException: exception from Groovy: java.lang.ArrayIndexOutOfBoundsException: 2
at org.codehaus.groovy.bsf.GroovyEngine.eval(GroovyEngine.java:98)
at org.apache.bsf.BSFManager$5.run(BSFManager.java:445)
... 25 more
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] messaging4transport-api ........................... SUCCESS [11.182s]
[INFO] messaging4transport-impl .......................... SUCCESS [11.951s]
[INFO] messaging4transport-features ...................... FAILURE [2.738s]
[INFO] messaging4transport-karaf ......................... SKIPPED
[INFO] messaging4transport-artifacts ..................... SKIPPED
[INFO] messaging4transport ............................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 27.619s
[INFO] Finished at: Sun Sep 27 02:26:12 WEST 2015
[INFO] Final Memory: 110M/771M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.alexecollins.maven.plugin:script-maven-plugin:1.0.0:execute (add-version-to-features) on project messaging4transport-features: exception from Groovy: java.lang.ArrayIndexOutOfBoundsException: 2 -> [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
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn -rf :messaging4transport-features
Since this does not give much clue, I built again with -X flag.
[DEBUG] -- end configuration --
[INFO] executing groovy script
[INFO] Updating repository declarations
[INFO] Processing feature: odl-messaging4transport-api
[INFO] Processing feature: odl-messaging4transport
Sep 27, 2015 12:13:14 PM org.apache.bsf.BSFManager eval
SEVERE: Exception:
java.security.PrivilegedActionException: org.apache.bsf.BSFException: exception from Groovy: java.lang.ArrayIndexOutOfBoundsException: 2
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.bsf.BSFManager.eval(BSFManager.java:442)
at com.alexecollins.maven.plugin.ExecuteMojo.execute2(ExecuteMojo.java:119)
at com.alexecollins.maven.plugin.ExecuteMojo.execute(ExecuteMojo.java:52)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:317)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
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)
Caused by: org.apache.bsf.BSFException: exception from Groovy: java.lang.ArrayIndexOutOfBoundsException: 2
at org.codehaus.groovy.bsf.GroovyEngine.eval(GroovyEngine.java:98)
at org.apache.bsf.BSFManager$5.run(BSFManager.java:445)
... 25 more
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] messaging4transport-api ........................... SUCCESS [11.099s]
[INFO] messaging4transport-impl .......................... SUCCESS [13.164s]
[INFO] messaging4transport-features ...................... FAILURE [3.496s]
[INFO] messaging4transport-karaf ......................... SKIPPED
[INFO] messaging4transport-artifacts ..................... SKIPPED
[INFO] messaging4transport ............................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 29.693s
[INFO] Finished at: Sun Sep 27 12:13:14 WEST 2015
[INFO] Final Memory: 109M/762M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.alexecollins.maven.plugin:script-maven-plugin:1.0.0:execute (add-version-to-features) on project messaging4transport-features: exception from Groovy: java.lang.ArrayIndexOutOfBoundsException: 2 -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.alexecollins.maven.plugin:script-maven-plugin:1.0.0:execute (add-version-to-features) on project messaging4transport-features: exception from Groovy: java.lang.ArrayIndexOutOfBoundsException: 2
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:317)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
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)
Caused by: org.apache.maven.plugin.MojoExecutionException: exception from Groovy: java.lang.ArrayIndexOutOfBoundsException: 2
at com.alexecollins.maven.plugin.ExecuteMojo.execute(ExecuteMojo.java:56)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 19 more
Caused by: org.apache.bsf.BSFException: exception from Groovy: java.lang.ArrayIndexOutOfBoundsException: 2
at org.codehaus.groovy.bsf.GroovyEngine.eval(GroovyEngine.java:98)
at org.apache.bsf.BSFManager$5.run(BSFManager.java:445)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.bsf.BSFManager.eval(BSFManager.java:442)
at com.alexecollins.maven.plugin.ExecuteMojo.execute2(ExecuteMojo.java:119)
at com.alexecollins.maven.plugin.ExecuteMojo.execute(ExecuteMojo.java:52)
... 21 more
[ERROR]
[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
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn -rf :messaging4transport-features
This gave me some clue on what went wrong. It is the features.xml entry.
I found the wrong entry in my code-
wrap:mvn:org.opendaylight.controller.config.api/{{VERSION}}
I fixed it as below.
wrap:mvn:org.opendaylight.controller/config-api/{{VERSION}}
It was of course a careless mistake. But the error log was crazy and interesting. :-)
No comments:
Post a Comment
You are welcome to provide your opinions in the comments. Spam comments and comments with random links will be deleted.