Bug 601830 - Xerces build without target
Summary: Xerces build without target
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: xerces-j2
Version: 13
Hardware: All
OS: Linux
low
high
Target Milestone: ---
Assignee: Mat Booth
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-06-08 17:47 UTC by Fernando Lozano
Modified: 2010-07-13 07:45 UTC (History)
1 user (show)

Fixed In Version: xerces-j2-2.9.0-4.fc13
Clone Of:
Environment:
Last Closed: 2010-07-13 07:45:58 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
spec to compile with target and requires = Java 1.5.0 (19.09 KB, application/octet-stream)
2010-06-10 16:24 UTC, Fernando Lozano
no flags Details
patch to add target="1.5" to xerces build.xml (431 bytes, application/octet-stream)
2010-06-10 16:26 UTC, Fernando Lozano
no flags Details

Description Fernando Lozano 2010-06-08 17:47:24 UTC
Description of problem:

Xerces-j2 was built without a target, so it degaults to requiring >=Java 1.6.0.

From the website http://xerces.apache.org/xerces2-j/faq-general.html#faq-11
"What JDK level is required for Xerces?    
As of version 2.6.2, Xerces requires JDK 1.2 or later to run and also requires JDK 1.2 or later to build the source code."

This prevents me from using Sun Java 1.5.0 (repackaged by JPackage standards) on Fedora 13, because ant fails with:

> $ ant -diagnostics.
exec "/usr/lib/jvm/java/bin/java" -classpath
"/usr/share/java/ant.jar:/usr/share/java/ant-launcher.jar:/usr/share/java/jaxp_parser_impl.jar:/usr/share/java/xml-commons-apis.jar:/usr/share/java/antlr.jar:/usr/share/java/ant/ant-antlr.jar:/usr/share/java/bcel.jar:/usr/share/java/ant/ant-apache-bcel.jar:/usr/share/java/bsf.jar:/usr/share/java/ant/ant-apache-bsf.jar:/usr/share/java/log4j.jar:/usr/share/java/ant/ant-apache-log4j.jar:/usr/share/java/oro.jar:/usr/share/java/ant/ant-apache-oro.jar:/usr/share/java/regexp.jar:/usr/share/java/ant/ant-apache-regexp.jar:/usr/share/java/xml-commons-resolver.jar:/usr/share/java/ant/ant-apache-resolver.jar:/usr/share/java/jakarta-commons-logging.jar:/usr/share/java/ant/ant-commons-logging.jar:/usr/share/java/jakarta-commons-net.jar:/usr/share/java/ant/ant-commons-net.jar:/usr/share/java/javamail.jar:/usr/share/java/jaf.jar:/usr/share/java/ant/ant-javamail.jar:/usr/share/java/jdepend.jar:/usr/share/java/ant/ant-jdepend.jar:/usr/share/java/jsch.jar:/usr/share/java/ant/ant-jsch.jar:/usr/share/java/junit.jar:/usr/share/java/ant/ant-junit.jar:/usr/share/java/ant/ant-nodeps.jar:/usr/share/java/ant/ant-swing.jar:/usr/share/java/jaxp_transform_impl.jar:/usr/share/java/ant/ant-trax.jar:/usr/share/java/xalan-j2-serializer.jar:/usr/lib/jvm/java/lib/tools.jar"

-Dant.home="/usr/share/ant"
-Dant.library.dir="/usr/share/ant/lib"
org.apache.tools.ant.launch.Launcher -cp "" "-diagnostics"
> 
> ------- Ant diagnostics report -------
> Apache Ant version 1.7.1 compiled on April 16 2010
> 
> -------------------------------------------
>  Implementation Version
> -------------------------------------------
> core tasks     : 1.7.1
> optional tasks : not available
> 
> -------------------------------------------
>  ANT PROPERTIES
> -------------------------------------------
> ant.version: Apache Ant version 1.7.1 compiled on April 16 2010
> ant.java.version: 1.5
> ant.core.lib: /usr/share/java/ant-1.7.1.jar
> ant.home: /usr/share/ant
> 
> -------------------------------------------
>  ANT_HOME/lib jar listing
> -------------------------------------------
> ant.home: /usr/share/ant
> ant-commons-logging.jar (4031 bytes)
> ant-javamail.jar (7163 bytes)
> ant-nodeps.jar (438618 bytes)
> ant-launcher.jar (12243 bytes)
> ant-swing.jar (6772 bytes)
> ant-bootstrap.jar (19013 bytes)
> ant-jdepend.jar (8307 bytes)
> ant-junit.jar (94995 bytes)
> ant-apache-regexp.jar (3772 bytes)
> ant-apache-log4j.jar (3042 bytes)
> ant-trax.jar (6927 bytes)
> ant.jar (1339582 bytes)
> ant-apache-bsf.jar (4021 bytes)
> ant-commons-net.jar (47981 bytes)
> ant-apache-oro.jar (40216 bytes)
> ant-apache-bcel.jar (8796 bytes)
> ant-antlr.jar (5927 bytes)
> ant-apache-resolver.jar (4060 bytes)
> ant-jsch.jar (31458 bytes)
> 
> -------------------------------------------
>  USER_HOME/.ant/lib jar listing
> -------------------------------------------
> user.home: /home/lozano
> No such directory.
> 
> -------------------------------------------
>  Tasks availability
> -------------------------------------------
> image : Not Available (the implementation class is not present)
> wlrun : Not Available (the implementation class is not present)
> stlist : Not Available (the implementation class is not present)
> netrexxc : Not Available (the implementation class is not present)
> starteam : Not Available (the implementation class is not present)
> stylebook : Not Available (the implementation class is not present)
> stlabel : Not Available (the implementation class is not present)
> stcheckin : Not Available (the implementation class is not present)
> stcheckout : Not Available (the implementation class is not present)
> ejbc : Not Available (the implementation class is not present)
> wlstop : Not Available (the implementation class is not present)
> sound : Not Available (the implementation class is not present)
> ddcreator : Not Available (the implementation class is not present)
> A task being missing/unavailable should only matter if you are trying to use it
> 
> -------------------------------------------
>  org.apache.env.Which diagnostics
> -------------------------------------------
> Not available.
> Download it at http://xml.apache.org/commons/
> 
> -------------------------------------------
>  XML Parser information
> -------------------------------------------
> Bad version number in .class file

Following ant classpath I found the only classes with target > 1.5.0 was jaxp_parser_impl.jar and from rpm -q --whatprovides I found it comes from xerces-j2 package.


Version-Release number of selected component (if applicable):
rpm package 2.9.0-3

How reproducible:
Every time

Steps to Reproduce:
1.Download Sun Java binaries and repackage them using JPackage instructions
2.Install the repackaged Sun JDK 1.5.0
3.Run ant -diagnostics
  
Actual results:
Bad version number in .class file

Expected results:
No error

Additional info:
This will prevent everything that needs xerces to run with Sun JDK 5, IBM JDK 5 o any other JVM which is not Java 6. I know Sun JDK 5 is EOL, but there's still a lot of java software that is not supported under JDK 6.

Comment 1 Fernando Lozano 2010-06-08 18:02:40 UTC
It looks the same problem happens on Fedora 12

Comment 2 Mat Booth 2010-06-08 19:58:40 UTC
I'm surprised this happens on Fedora 12, because on Fedora it was built with GCJ (Java 1.5). From the buildroot log you can see that OpenJDK was not installed for the build of this package in Fedora 12. [1]


[1] http://kojipkgs.fedoraproject.org/packages/xerces-j2/2.7.1/12.3.fc12.1/data/logs/i686/root.log

Comment 3 Fernando Lozano 2010-06-08 20:27:16 UTC
I don't have the F12 setup to verify this anymore, So be welcome to disregard this information. If I remember correctly I had a i386 F12 machine which could not run ant using Sun JDK5 but another x86_64 which had no problems. At the time I just downloaded a binary build from apache.org to use ant and forgot about the problem.

Comment 4 Fernando Lozano 2010-06-08 21:17:09 UTC
I rebuilt xerces-j2 from the source RPM, using --sort-circuit to edit the buildfile between -bi and -bi and add target="1.5" to xjavac. Ant now works fine with Sun JDK 5 using this build. And so far nothing was broken.

Comment 5 Fernando Lozano 2010-06-10 16:24:29 UTC
Created attachment 422964 [details]
spec to compile with target and requires = Java 1.5.0

Comment 6 Fernando Lozano 2010-06-10 16:26:49 UTC
Created attachment 422965 [details]
patch to add target="1.5" to xerces build.xml

this patch is so small that you'd probably merge with the patch aready included on the source rpm

Comment 7 Mat Booth 2010-06-12 21:10:55 UTC
Hmm, I bumped the java-devel build requirement to 1.6 for this package because xml-stylebook doesn't quite work on 1.5.

I will see if it's possible to fix xml-stylebook properly first.

Comment 8 Mat Booth 2010-06-13 11:45:02 UTC
Hmm, looks like a limitation in GCJ where there is no image writer for the JPEG format in the Java Image IO API. I will patch the build script as you suggest.

Comment 9 Fedora Update System 2010-06-13 12:05:33 UTC
xerces-j2-2.9.0-4.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/xerces-j2-2.9.0-4.fc13

Comment 10 Fedora Update System 2010-06-14 17:19:18 UTC
xerces-j2-2.9.0-4.fc13 has been pushed to the Fedora 13 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update xerces-j2'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/xerces-j2-2.9.0-4.fc13

Comment 11 Fernando Lozano 2010-06-17 23:17:12 UTC
The new packages works fine for me so far. But I found the same problem on Fedora 11, and only on i386, not on X86_64! I may have done something wrong, but I am positive a brand-new Fedora 11 32-bit system, no updates, has xerves-j2 compiled for Java 6.

Maybe GCJ (actually ECJ) on 32-bits generates version 50.0 class files by default?

Comment 12 Fedora Update System 2010-07-13 07:45:52 UTC
xerces-j2-2.9.0-4.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.


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