Bug 1316994 - java.lang.RuntimeException: java.util.zip.ZipException: duplicate entry: when building kxml
Summary: java.lang.RuntimeException: java.util.zip.ZipException: duplicate entry: when...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Software Collections
Classification: Red Hat
Component: xmvn
Version: rh-maven35
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: alpha
: 3.0
Assignee: Mikolaj Izdebski
QA Contact: Jan Kepler
URL:
Whiteboard:
Depends On:
Blocks: 1448496
TreeView+ depends on / blocked
 
Reported: 2016-03-11 16:34 UTC by Severin Gehwolf
Modified: 2017-10-24 09:53 UTC (History)
2 users (show)

Fixed In Version: rh-maven35-xmvn-3.0.0-5.2.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-10-24 09:53:38 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
kxml2 compat package spec with failing %mvn_install macro (6.87 KB, text/x-matlab)
2016-03-11 16:34 UTC, Severin Gehwolf
no flags Details
Reproducer (1.30 KB, application/zip)
2017-10-05 09:20 UTC, Mikolaj Izdebski
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2017:3022 0 normal SHIPPED_LIVE new packages: rh-maven35 2017-10-24 13:25:34 UTC

Description Severin Gehwolf 2016-03-11 16:34:06 UTC
Created attachment 1135303 [details]
kxml2 compat package spec with failing %mvn_install macro

Description of problem:
When attempting to build kxml as a compat package, xmvn fails in the install phase with:

DEBUG] Assigning installer for each installable artifact
[DEBUG] Installing artifacts
[DEBUG] Installing net.sf.kxml:kxml2:pom:2.3.0 using org.fedoraproject.xmvn.tools.install.impl.DefaultArtifactInstaller
[TRACE] Native code not found inside /builddir/build/SOURCES/kxml2-2.3.0.pom
[TRACE] Trying to inject manifest to net.sf.kxml:kxml2:pom:2.3.0
[TRACE] Manifest injection skipped: no pre-existing manifest found to update
[INFO] Installing artifact net.sf.kxml:kxml2:pom:2.3.0
[DEBUG] Installing net.sf.kxml:kxml2:jar:2.3.0 using org.fedoraproject.xmvn.tools.install.impl.DefaultArtifactInstaller
[TRACE] Native code not found inside /builddir/build/BUILD/kxml-2.3.0/dist/kxml2-2.3.0.jar
[TRACE] Trying to inject manifest to net.sf.kxml:kxml2:jar:2.3.0
[TRACE] Injected field JavaPackages-GroupId: net.sf.kxml
[TRACE] Injected field JavaPackages-ArtifactId: kxml2
[TRACE] Not injecting field JavaPackages-Extension (it has default value "jar")
[TRACE] Not injecting field JavaPackages-Classifier (it has default value "")
[TRACE] Injected field JavaPackages-Version: 2.3.0
Unhandled exception
java.lang.RuntimeException: java.util.zip.ZipException: duplicate entry: META-INF/services/org.xmlpull.v1.XmlPullParserFactory
	at org.fedoraproject.xmvn.tools.install.impl.JarUtils.injectManifest(JarUtils.java:213)
	at org.fedoraproject.xmvn.tools.install.impl.DefaultArtifactInstaller.install(DefaultArtifactInstaller.java:82)
	at org.fedoraproject.xmvn.tools.install.impl.DefaultInstaller.installArtifact(DefaultInstaller.java:235)
	at org.fedoraproject.xmvn.tools.install.impl.DefaultInstaller.install(DefaultInstaller.java:345)
	at org.fedoraproject.xmvn.tools.install.cli.InstallerCli.run(InstallerCli.java:53)
	at org.fedoraproject.xmvn.tools.install.cli.InstallerCli.main(InstallerCli.java:72)
Caused by: java.util.zip.ZipException: duplicate entry: META-INF/services/org.xmlpull.v1.XmlPullParserFactory
	at java.util.zip.ZipOutputStream.putNextEntry(ZipOutputStream.java:232)
	at java.util.jar.JarOutputStream.putNextEntry(JarOutputStream.java:109)
	at org.fedoraproject.xmvn.tools.install.impl.JarUtils.injectManifest(JarUtils.java:203)
	... 5 more
RPM build errors:
error: Bad exit status from /var/tmp/rpm-tmp.TZHhK0 (%install)
    Bad exit status from /var/tmp/rpm-tmp.TZHhK0 (%install)
Child return code was: 1
EXCEPTION: Command failed. See logs for output.
 # bash --login -c /usr/bin/rpmbuild -bb --target x86_64 --nodeps  /builddir/build/SPECS/kxml2.spec 
Traceback (most recent call last):
  File "/usr/lib/python3.4/site-packages/mockbuild/trace_decorator.py", line 88, in trace
    result = func(*args, **kw)
  File "/usr/lib/python3.4/site-packages/mockbuild/util.py", line 547, in do
    raise exception.Error("Command failed. See logs for output.\n # %s" % (command,), child.returncode)
mockbuild.exception.Error: Command failed. See logs for output.
 # bash --login -c /usr/bin/rpmbuild -bb --target x86_64 --nodeps  /builddir/build/SPECS/kxml2.spec 
LEAVE do --> EXCEPTION RAISED

The spec file I've used is attached. It seems maven30-xmvn needs a backport of:
https://github.com/mizdebsk/xmvn/commit/9a326bd401d3f82ce09be69fec55d48fb39d3bea

An SRPM and full log of the failure is here:
https://copr.fedorainfracloud.org/coprs/jerboaa/thermostat-latest/build/167520/

Comment 4 Mikolaj Izdebski 2017-10-05 09:20:47 UTC
Created attachment 1334726 [details]
Reproducer

java -cp $(build-classpath xmvn objectweb-asm slf4j/api slf4j/simple):rep.jar rep.DuplicateManifestReproducer rep.jar

Comment 7 errata-xmlrpc 2017-10-24 09:53:38 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2017:3022


Note You need to log in before you can comment on or make changes to this bug.