On 12/7/06, Marshall Schor <[EMAIL PROTECTED]> wrote:
Adam Lally wrote: > I got Sun JDK 1.4.2 to work. However it requires an additional jar > file to be added to uima-docbook/lib: the xml-apis.jar that comes > with the Xerces download. Otherwise you get a NoClassDefFoundError > Should I check this in? yes - but be sure to check in the right one... the one that goes with the other xerces
Done. Docbooks should build now using Sun JRE 1.4 or any 1.5 JRE. Also note that building the UIMA assembly (calling mvn assembly:assembly) calls the docbooks build and so you have to be using the right JRE here too.
download. (I think it's 2.9.0) > (And also check in the changes that switch > the xmlns back to 2001?) All checked back in... > I think it's fine for use to use the Sun JDK to build. IBM's java 1.4 > (even the latest service release) bundles a buggy version of Xerces > and there doesn't appear to be anything that can be done about it. > Ironically, Sun's Java works better because it bundles a LESS popular > XML parser than IBM's Java does. :) It seems to respect the -D defines that are trying to tell it to use the right package.
For the curious... The reason is because IBM's Java bundles Xerces already. So adding xercesImpl.jar to the classpath just adds classes with the same class names as those already bundled in the JRE. The -D argument cannot be used to distinguish them. The ones in the JRE take precedence. About the only way I could think to work around this would be to go into your JRE install directory and remove xml.jar. But it's probably better to just not use this buggy JRE at all. Sun's Java bundles a different XML parser with different class names, and doesn't have this problem. Also in Java 5 they finally realized this problem and renamed the XML parser classes when bundling them, so that they can be overridden. -Adam