[ 
https://issues.apache.org/jira/browse/XERCESJ-784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13839264#comment-13839264
 ] 

Johnny Wu commented on XERCESJ-784:
-----------------------------------

I just downloaded Xeres2 for Mac OS and got the same error during compilation.  
Can anyone confirm this problem was resolved for Mac?  Thanks!

> Build failure for Xerces2-J on Redhat Linux 9.0 with Blackdown JDK.
> -------------------------------------------------------------------
>
>                 Key: XERCESJ-784
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-784
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: Other
>    Affects Versions: 2.5.0
>         Environment: Operating System: Linux
> Platform: PC
>            Reporter: Amit Kapoor
>
> Product: Xerces2-J 2.5.0 (Code checkout from CVS on Aug 14,2003)
> Operating System: Redhat Linux 9.0
> JDK: Blackdown JDK 1.4.1
> Steps to reproduce problem:
> 1. Check out code from CVS
> 2. ./build.sh jars at the root of the Java tree
> Here is what I get:
> [root@linux2 java]# ./build.sh jars
>  
> Xerces-Java Build System
> ------------------------
>  
> Building with classpath
> /home/download/java/j2sdk1.4.1/lib/tools.jar:/home/download/java/j2sdk1.4.1/lib/classes.zip:./tools/ant.jar:./tools/xml-apis.jar:./tools/xercesImpl.jar:./tools/bin/xjavac.jar
> Starting Ant...
>  
> Buildfile: build.xml
>  
> init:
>      [echo] ---------------- Xerces-J 2.5.0 [1999-2003] ---------------
>  
> prepare:
>     [mkdir] Created dir: /home/download/cvs/xml-xerces/java/build
>  
> prepare-common:
>     [mkdir] Created dir: /home/download/cvs/xml-xerces/java/build/src
>     [mkdir] Created dir: /home/download/cvs/xml-xerces/java/build/classes
>     [mkdir] Created dir: 
> /home/download/cvs/xml-xerces/java/build/classes/META-INF
>     [mkdir] Created dir:
> /home/download/cvs/xml-xerces/java/build/classes/META-INF/services
>      [copy] Copying 1 file to
> /home/download/cvs/xml-xerces/java/build/classes/META-INF/services
>      [copy] Copying 1 file to
> /home/download/cvs/xml-xerces/java/build/classes/META-INF/services
>      [copy] Copying 1 file to
> /home/download/cvs/xml-xerces/java/build/classes/META-INF/services
>  
> prepare-src:
>      [copy] Copying 1 file to
> /home/download/cvs/xml-xerces/java/build/classes/META-INF/services
>      [copy] Copying 604 files to /home/download/cvs/xml-xerces/java/build/src
>      [copy] Copied 31 empty directories to
> /home/download/cvs/xml-xerces/java/build/src
>     [unzip] Expanding:
> /home/download/cvs/xml-xerces/java/tools/xml-apis--src.zip into
> /home/download/cvs/xml-xerces/java/build/src
>  
> compile:
>      [copy] Copying 9 files to 
> /home/download/cvs/xml-xerces/java/build/classes
>    [xjavac] Compiling 617 source files to
> /home/download/cvs/xml-xerces/java/build/classes
>    [xjavac]
> /home/download/cvs/xml-xerces/java/build/src/org/apache/html/dom/HTMLIFrameElementImpl.java:69:
> org.apache.html.dom.HTMLIFrameElementImpl should be declared abstract; it does
> not define getContentDocument() in org.apache.html.dom.HTMLIFrameElementImpl
>    [xjavac] public class HTMLIFrameElementImpl
>    [xjavac]        ^
>    [xjavac]
> /home/download/cvs/xml-xerces/java/build/src/org/apache/html/dom/HTMLFrameElementImpl.java:69:
> org.apache.html.dom.HTMLFrameElementImpl should be declared abstract; it does
> not define getContentDocument() in org.apache.html.dom.HTMLFrameElementImpl
>    [xjavac] public class HTMLFrameElementImpl
>    [xjavac]        ^
>    [xjavac]
> /home/download/cvs/xml-xerces/java/build/src/org/apache/html/dom/HTMLObjectElementImpl.java:69:
> org.apache.html.dom.HTMLObjectElementImpl should be declared abstract; it does
> not define getContentDocument() in org.apache.html.dom.HTMLObjectElementImpl
>    [xjavac] public class HTMLObjectElementImpl
>    [xjavac]        ^
>    [xjavac] Note: Some input files use or override a deprecated API.
>    [xjavac] Note: Recompile with -deprecation for details.
>    [xjavac] 3 errors
>  
> BUILD FAILED
> file:/home/download/cvs/xml-xerces/java/build.xml:232: Compile failed; see the
> compiler error output for details.
>  
> Total time: 31 seconds
> Problem:
> Blackdown JDK rt.jar has older versions of org.apache.* in it causing the
> compiler to pick the class and interface definitions from there, rather than 
> the
> current compiled source directory. Setting -Xbootclasspath did not help.
> Possible Solution:
> After some digging around, I found that the build is correcting
> the problem in tools/src/XJavac.java by resetting the bootclasspath
> based on the type of JDK being used to do the build. Based on the information
> it extracts from the "java.vendor" environment variable, it sets the correct
> bootclasspath before launching the original javac compiler. Currently it is
> testing for only two JDK environments, IBM and Sun. Blackdown JDK 1.4.1 also
> requires the the bootclasspath to be changed to avoid the classes conflict.
> I changed XJavac.java to add the case for Blackdown, recompiled and repackaged
> xjavac.jar and the build went through without a hitch.
> Here is what the Blackdown Linux JDK sets java.vendor to:
>    java.vendor=Blackdown Java-Linux Team
> Changed line 134 in XJavac.java to:
> else if ( (vendor.indexOf("SUN") >= 0) || (vendor.indexOf("BLACKDOWN") >= 0)) 
> {



--
This message was sent by Atlassian JIRA
(v6.1#6144)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to