https://bugzilla.redhat.com/show_bug.cgi?id=1542899
Bug ID: 1542899 Summary: Task failure with ant and JAXB's xjc Product: Fedora Version: 27 Component: ant Assignee: msimacek@redhat.com Reporter: peterhull90@gmail.com QA Contact: extras-qa@fedoraproject.org CC: akurtako@redhat.com, jaromir.capik@email.cz, java-sig-commits@lists.fedoraproject.org, krzysztof.daniel@gmail.com, mizdebsk@redhat.com, msimacek@redhat.com, msrb@redhat.com
Created attachment 1392587 --> https://bugzilla.redhat.com/attachment.cgi?id=1392587&action=edit Ant build script
Description of problem:
Running the JAXB xjc task in ant appears to make ant fail at a later stage with classpath problems. The xjc task itself seems to finish correctly.
The background to this is trying to build Netbeans on Fedora 27 fails and I have done some work to narrow down Netbeans build script (which is very large/complicated) to this aspect. See https://issues.apache.org/jira/browse/NETBEANS-239 and http://mail-archives.apache.org/mod_mbox/incubator-netbeans-dev/201801.mbox/...
However setting the ANT_HOME explicitly makes this bug disappear.
I believe I have set up the xjc task correctly to run with Fedora's glassfish-jaxb packages.
Version-Release number of selected component (if applicable): ant.noarch 1.10.1-7.fc27 @fedora ant-lib.noarch 1.10.1-7.fc27 @fedora glassfish-jaxb.noarch 2.2.11-6.fc27 @fedora glassfish-jaxb-api.noarch 2.2.12-7.fc27 @fedora glassfish-jaxb-bom.noarch 2.2.11-6.fc27 @fedora glassfish-jaxb-bom-ext.noarch 2.2.11-6.fc27 @fedora glassfish-jaxb-codemodel.noarch 2.2.11-6.fc27 @fedora glassfish-jaxb-codemodel-annotation-compiler.noarch glassfish-jaxb-codemodel-parent.noarch 2.2.11-6.fc27 @fedora glassfish-jaxb-core.noarch 2.2.11-6.fc27 @fedora glassfish-jaxb-external-parent.noarch 2.2.11-6.fc27 @fedora glassfish-jaxb-jxc.noarch 2.2.11-6.fc27 @fedora glassfish-jaxb-parent.noarch 2.2.11-6.fc27 @fedora glassfish-jaxb-rngom.noarch 2.2.11-6.fc27 @fedora glassfish-jaxb-runtime.noarch 2.2.11-6.fc27 @fedora glassfish-jaxb-runtime-parent.noarch 2.2.11-6.fc27 @fedora glassfish-jaxb-txw-parent.noarch 2.2.11-6.fc27 @fedora glassfish-jaxb-txw2.noarch 2.2.11-6.fc27 @fedora glassfish-jaxb-txwc2.noarch 2.2.11-6.fc27 @fedora glassfish-jaxb-xjc.noarch 2.2.11-6.fc27 @fedora glassfish-jaxb1-impl.noarch 2.2.11-6.fc27 @fedora java-1.8.0-openjdk.x86_64 1:1.8.0.161-0.b14.fc27 @updates java-1.8.0-openjdk-devel.x86_64 1:1.8.0.161-0.b14.fc27 @updates java-1.8.0-openjdk-headless.x86_64 1:1.8.0.161-0.b14.fc27 @updates
How reproducible: Always
Steps to Reproduce: 1. Use attached build.xml and test.xsd 2. Run ant 3. See error message Note this is a minimal build.xml and test.xsd to cause the problem to appear.
Actual results: build succeeds
Expected results: Build fails, $ ant Buildfile: .../build.xml
fail: [xjc] Consider using <depends>/<produces> so that XJC won't do unnecessary compilation [xjc] Compiling file:.../test.xsd [xjc] Writing output to . Caught an exception while logging the end of the build. Exception was: java.lang.NoClassDefFoundError: org/apache/tools/ant/util/DateUtils at org.apache.tools.ant.DefaultLogger.formatTime(DefaultLogger.java:328) at org.apache.tools.ant.DefaultLogger.buildFinished(DefaultLogger.java:177) at org.apache.tools.ant.Project.fireBuildFinished(Project.java:2110) at org.apache.tools.ant.Main.runBuild(Main.java:878) at org.apache.tools.ant.Main.startAnt(Main.java:236) at org.apache.tools.ant.launch.Launcher.run(Launcher.java:287) at org.apache.tools.ant.launch.Launcher.main(Launcher.java:113) Caused by: java.lang.ClassNotFoundException: org.apache.tools.ant.util.DateUtils at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:338) at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
Additional info: This succeeds: $ ANT_HOME=/usr/share/ant/ ant Buildfile: .../build.xml
fail: [xjc] Consider using <depends>/<produces> so that XJC won't do unnecessary compilation [xjc] Compiling file:.../test.xsd [xjc] Writing output to .
BUILD SUCCESSFUL Total time: 1 second
https://bugzilla.redhat.com/show_bug.cgi?id=1542899
--- Comment #1 from Peter Hull peterhull90@gmail.com --- Created attachment 1392588 --> https://bugzilla.redhat.com/attachment.cgi?id=1392588&action=edit Example schema file
https://bugzilla.redhat.com/show_bug.cgi?id=1542899
Mikolaj Izdebski mizdebsk@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |mgoldman@redhat.com Component|ant |istack-commons Assignee|msimacek@redhat.com |mizdebsk@redhat.com
--- Comment #2 from Mikolaj Izdebski mizdebsk@redhat.com --- Reproducible. It looks like ProtectedTask from istack-commons is messing up with Ant class loader, so that it can't find its core classes.
https://bugzilla.redhat.com/show_bug.cgi?id=1542899
--- Comment #3 from Peter Hull peterhull90@gmail.com --- Further information: this doesn't occur on Debian 9. They have an older version of ant (1.9.9) and put all jars into /usr/share/java rather than the way they are organised on Fedora. I wasn't able to check if Debian or Fedora apply any patches to the stock Apache Ant that may be relevant.
https://bugzilla.redhat.com/show_bug.cgi?id=1542899
--- Comment #4 from Ben Cotton bcotton@redhat.com --- This message is a reminder that Fedora 27 is nearing its end of life. On 2018-Nov-30 Fedora will stop maintaining and issuing updates for Fedora 27. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '27'.
Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version.
Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 27 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above.
Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
https://bugzilla.redhat.com/show_bug.cgi?id=1542899
Ben Cotton bcotton@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |CLOSED Resolution|--- |EOL Last Closed| |2018-11-30 17:24:24
--- Comment #5 from Ben Cotton bcotton@redhat.com --- Fedora 27 changed to end-of-life (EOL) status on 2018-11-30. Fedora 27 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug.
If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug.
Thank you for reporting this bug and we are sorry it could not be fixed.
java-sig-commits@lists.stg.fedoraproject.org