Hide Forgot
We are porting Red Hat Virtualization 4.1 communication library from java7 to java8. New patch [1] introduces java streams and changes java version. During build process [2] we see following exception: 07:49:19 java.lang.ArrayIndexOutOfBoundsException: 4648 07:49:19 at org.objectweb.asm.ClassReader.readClass(Unknown Source) 07:49:19 at org.objectweb.asm.ClassReader.accept(Unknown Source) 07:49:19 at org.objectweb.asm.ClassReader.accept(Unknown Source) 07:49:19 at org.fedoraproject.maven.installer.impl.DefaultInstaller.usesNativeCode(DefaultInstaller.java:545) 07:49:19 at org.fedoraproject.maven.installer.impl.DefaultInstaller.installArtifact(DefaultInstaller.java:574) 07:49:19 at org.fedoraproject.maven.installer.impl.DefaultInstaller.install(DefaultInstaller.java:758) 07:49:19 at org.fedoraproject.maven.tools.installer.InstallerCli.run(InstallerCli.java:174) 07:49:19 at org.fedoraproject.maven.tools.installer.InstallerCli.main(InstallerCli.java:187) 07:49:19 error: Bad exit status from /var/tmp/rpm-tmp.igcDaI (%install) It works with java7 without any issues. [1] https://gerrit.ovirt.org/#/c/64481/ [2] http://jenkins.ovirt.org/job/vdsm-jsonrpc-java_master_check-patch-el7-x86_64/48/console
Fixed upstream, https://github.com/fedora-java/xmvn/commit/018da3fd2577bfc91efb81508c3194683cc67a45
Created attachment 1207515 [details] Proposed patch
Can we have it included in first zstream of 7.3 or in an async?
Improved upstream fix: https://github.com/fedora-java/xmvn/commit/30fb81d18428a82b895822fac275aa480bcb1f58
Created attachment 1207977 [details] Proposed patch
(In reply to Mikolaj Izdebski from comment #7) > Created attachment 1207977 [details] > Proposed patch Verified working: - built xmvn-1.3.0-5.2.el7 in CentOS Virt SIG candidate repo applying this patch - tested it with jenkins where it previously failed: http://jenkins.ovirt.org/job/vdsm-jsonrpc-java_master_check-patch-el7-x86_64/53/
This issue also affects a bunch of core jboss libraries, which are at the root of a very wide tree of Java libraries and applications. So, this issue seems to significantly affect the larger EL7 ecosystem, preventing a bunch of Java 8 stuffs from being packaged in EPEL7, as well as end-user packages targeting EL7 systems using xmvn as their build tool.
Apparently, this objectweb-asm issue also affects building maven plugins with xmvn in EL7. The maven-plugin-tools-annotations jar seems to use objectweb-asm while executing the descriptor task, and that can fail, even if the plugin itself targets older byte code (I tried to build maven-injector-plugin and saw this). Even if this gets fixed, by catching and ignoring exceptions during %mvn_install macro execution, the underlying ArrayIndexOutOfBounds problem seems likely to continue to block at least some maven plugins from being packaged for EPEL7 with xmvn.