[ODLPARENT-167] Error during blueprint generation: IllegalArgumentException (without further details) Created: 17/Sep/18  Updated: 11/Feb/20  Due: 25/Sep/18  Resolved: 24/Sep/18

Status: Resolved
Project: odlparent
Component/s: None
Affects Version/s: 4.0.0
Fix Version/s: 4.0.1

Type: Bug Priority: Highest
Reporter: Michael Vorburger Assignee: Michael Vorburger
Resolution: Done Votes: 0
Labels: neon-mri
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Blocks
blocks NEUTRON-197 Neon-MRI: Bump odlparent, yangtools, ... Resolved
blocks ODLPARENT-163 Release odlparent 4.0.1 for Neon-MRI:... Resolved
Relates
relates to ODLPARENT-225 Bump to blueprint-maven-plugin > 1.10.0 Resolved
Priority: Highest

 Description   

While working on the odlparent 4.0.0 bump in NEUTRON-197, I've come across a new problem with the blueprint-maven-plugin, after switching from pax-cdi-api to blueprint-maven-plugin-annotation as per https://wiki.opendaylight.org/view/Neon_platform_upgrade#Blueprint_declarations :

[INFO] --- blueprint-maven-plugin:1.10.0:blueprint-generate (default) @ northbound-api ---
[INFO] Package org.opendaylight will be scanned
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] ODL :: neutron :: project-neutron-parent ........... SUCCESS [  6.772 s]
[INFO] ODL :: neutron :: model ............................ SUCCESS [ 40.548 s]
[INFO] ODL :: neutron :: neutron-spi ...................... SUCCESS [ 16.871 s]
[INFO] ODL :: neutron :: northbound-api ................... FAILURE [  4.718 s]
[INFO] ODL :: neutron :: transcriber ...................... SKIPPED
[INFO] ODL :: neutron :: neutron-logger ................... SKIPPED
[INFO] Neutron Artifacts .................................. SKIPPED
[INFO] OpenDaylight :: Neutron :: Model ................... SKIPPED
[INFO] OpenDaylight :: Neutron :: API ..................... SKIPPED
[INFO] OpenDaylight :: Neutron :: Northbound .............. SKIPPED
[INFO] OpenDaylight :: Neutron :: Service ................. SKIPPED
[INFO] ODL :: neutron :: neutron-hostconfig-utils ......... SKIPPED
[INFO] ODL :: neutron :: neutron-hostconfig-ovs ........... SKIPPED
[INFO] OpenDaylight :: Neutron :: Hostconfig :: OVS ....... SKIPPED
[INFO] ODL :: neutron :: neutron-hostconfig-vpp ........... SKIPPED
[INFO] OpenDaylight :: Neutron :: Hostconfig :: VPP ....... SKIPPED
[INFO] features-neutron-service ........................... SKIPPED
[INFO] OpenDaylight :: Neutron :: Logger .................. SKIPPED
[INFO] features-aggregator ................................ SKIPPED
[INFO] ODL :: neutron :: integration-test-standalone ...... SKIPPED
[INFO] OpenDaylight :: Neutron :: Logger :: Test .......... SKIPPED
[INFO] features-neutron-test .............................. SKIPPED
[INFO] features-test-aggregator ........................... SKIPPED
[INFO] neutron-karaf ...................................... SKIPPED
[INFO] ODL :: neutron :: neutron-hostconfig ............... SKIPPED
[INFO] neutron ............................................ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:15 min
[INFO] Finished at: 2018-09-17T15:05:54+02:00
[INFO] Final Memory: 136M/1256M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.aries.blueprint:blueprint-maven-plugin:1.10.0:blueprint-generate (default) on project northbound-api: Error during blueprint generation: IllegalArgumentException -> [Help 1]

 



 Comments   
Comment by Michael Vorburger [ 17/Sep/18 ]

Running mvn -X clean install gives us more details:

[ERROR] Failed to execute goal org.apache.aries.blueprint:blueprint-maven-plugin:1.10.0:blueprint-generate (default) on project northbound-api: Error during blueprint generation: IllegalArgumentException -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.aries.blueprint:blueprint-maven-plugin:1.10.0:blueprint-generate (default) on project northbound-api: Error during blueprint generation
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:213)
    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:51)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:309)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:955)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:498)
    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: Error during blueprint generation
    at org.apache.aries.blueprint.plugin.GenerateMojo.execute (GenerateMojo.java:149)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:134)
    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:51)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:309)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:955)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:498)
    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: java.lang.IllegalArgumentException
    at org.apache.xbean.asm5.ClassReader.<init> (Unknown Source)
    at org.apache.xbean.asm5.ClassReader.<init> (Unknown Source)
    at org.apache.xbean.asm5.ClassReader.<init> (Unknown Source)
    at org.apache.xbean.finder.AbstractFinder.readClassDef (AbstractFinder.java:580)
    at org.apache.xbean.finder.AbstractFinder.readClassDef (AbstractFinder.java:576)
    at org.apache.xbean.finder.AbstractFinder.readClassDef (AbstractFinder.java:562)
    at org.apache.xbean.finder.ClassFinder.<init> (ClassFinder.java:122)
    at org.apache.aries.blueprint.plugin.GenerateMojo.createProjectScopeFinder (GenerateMojo.java:220)
    at org.apache.aries.blueprint.plugin.GenerateMojo.generateBlueprint (GenerateMojo.java:155)
    at org.apache.aries.blueprint.plugin.GenerateMojo.execute (GenerateMojo.java:145)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:134)
    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:51)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:309)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:955)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:498)
    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)
Comment by Michael Vorburger [ 17/Sep/18 ]

Researching this a bit, there reports (such as this or this or this) pointing to this possibly being a Java 9 related issue... 

I'm obviously using Java 8 localy (openjdk version "1.8.0_181", OpenJDK Runtime Environment (build 1.8.0_181-b15), but from what I understand from glancing over these linked issues, the ASM 5 used by blueprint-maven-plugin:1.10.0 is not Java 9 compliant, and so perhaps the mere presence of a Java 9 classfile in any JAR which blueprint-maven-plugin scans could cause it to trip over like this?

rovarga do you know if we, or a 3rd-party we use, already have Java 9 only compiled classes (even if only in a META-INF/versions/9/module-info.class) which could be causing this? skitt FYI.

Best next step? Perhaps to attach a debugger, or patch ASM or blueprint-maven-plugin, to provide details which class it's actually tripping over. I'm going to time out on this for today, and will try to get back to this tomorrow or day after. Raising priority and setting fix version to 4.0.1 as this really is blocking NEUTRON-197 now.

Comment by Michael Vorburger [ 17/Sep/18 ]

see https://jira.apache.org/jira/browse/ARIES-1826 ...

Comment by Michael Vorburger [ 18/Sep/18 ]

It just occured to me that instead of waiting for a new blueprint-maven-plugin release, we can, obviously, already locally apply my fix from https://jira.apache.org/jira/browse/ARIES-1826, quite easily as in c/76089/3..4/northbound-api/pom.xml (tested it, that works), therefore so proposed in c/76231 (not really re-tested, but should work; why wouldn't it).

Comment by Michael Vorburger [ 19/Sep/18 ]

FTR: This problem does not affect all usages of the blueprint-maven-plugin, but only projects with dependencies on certain artifacts which already contain Java 9+ class files (I do not know exactly which ones). For example in neutron, northbound-api and transcriber hit this, but neutron-logger & neutron-hostconfig/ovs (which both also use the blueprint-maven-plugin) did not hit this.

Comment by Vishal Thapar [ 24/Sep/18 ]

Just hit this issue in genius/mdsalutil-impl

Comment by Michael Vorburger [ 24/Sep/18 ]

thapar use odlparent 4.0.1 instead of 4.0.0 and it will work! (Grab me if not.)

Comment by Robert Varga [ 03/Oct/18 ]

Yeah, I suspect it's module-info.class – asm-6.0+ has it at the very least.

Comment by Michael Vorburger [ 04/Oct/18 ]

This is starting to affect anything which wants to use any recent library - e.g. just hit me in INFRAUTILS-52. As we are hopefully about to do the MRI move next week, it's all good; otherwise I would have been tempted to propose back-porting this from 4.0.1 for a 3.1.x ...

Generated at Wed Feb 07 20:27:49 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.