0

I am trying to build Apaches Xerxes 2.11.0 in Java and running into the following compile errors:

   [xjavac] c:\Program Files\Java\libraries\xerces-2_11_0\build\src\org\apache\html\dom\HTMLFrameElementImpl.java:28: error: HTMLFrameElementImpl is not abstract and does not override abstract method getContentDocument() in HTMLFrameElement

   [xjavac] public class HTMLFrameElementImpl
   [xjavac]        ^
   [xjavac] c:\Program Files\Java\libraries\xerces-2_11_0\build\src\org\apache\html\dom\HTMLIFrameElementImpl.java:28: error: HTMLIFrameElementImpl is not abstract and does not override abstract method getContentDocument() in HTMLIFrameElement
   [xjavac] public class HTMLIFrameElementImpl
   [xjavac]        ^
   [xjavac] c:\Program Files\Java\libraries\xerces-2_11_0\build\src\org\apache\html\dom\HTMLObjectElementImpl.java:28: error: HTMLObjectElementImpl is not abstract and does not override abstract method getContentDocument() in HTMLObjectElement
   [xjavac] public class HTMLObjectElementImpl
   [xjavac]        ^

Any thoughts on what I might be missing or doing wrong, or better, is there somewhere I can just download a pre-compiled jar for this library? (The "binary distribution" available on the downloads page seems to actually be just documentation and samples.)

PurpleVermont
  • 1,179
  • 4
  • 18
  • 46

2 Answers2

1

Please see the following link to get over the issue of compilation: XERCESJ-1621 xerces2 doesn't build with Mac OS 10.9 and JDK 1.7

The core idea is :

The Issue here is that Xerces supports DOM Level 1 HTML Specification only. However the JDK installed on your system which is 1.7 has DOM Level 3 specification. The newly added methods from Level 2 and Level 3 specification in JDK 1.5 and onwards are not implemented in Xerces. So one of the options is to build the code with older version i.e JDK 1.4 etc or work around fix would be to add dummy method implementations in the source so that you don't get error's for not implementing them.

Gábor Lipták
  • 9,646
  • 2
  • 59
  • 113
  • Welcome to stackoverflow! You should try to elaborate your answer, including vital sumary of what you'll find when you click the link. Not only link to an external source! – Philip G Dec 24 '14 at 06:44
  • Sure! I see what you folks are telling me, will edit the response. – user3619166 Jan 02 '15 at 06:04
0

I found the jars here:

http://search.maven.org/#artifactdetails|xerces|xercesImpl|2.11.0|jar

I couldn't get m2e to load them in eclipse, but I was able to use the AddExternalJars... approach to add them (main jar plus source and javadoc jars)

PurpleVermont
  • 1,179
  • 4
  • 18
  • 46