Hello,
Downloaded the 2.2.1 source and the tools and attempted to build thinking that perhaps one of the libraries were out of sync. However, I can't get it to build:
Xerces-Java Build System
------------------------
Building with ant classpath C:\jdk1.3.1_05\lib\tools.jar;C:\jdk1.3.1_05\lib\classes.zip;.\tools\ant.jar;.\tools\xercesImpl.jar;.\tools\xml-apis.jar;.\
tools\bin\xjavac.jar
Starting Ant...
Buildfile: build.xml
BUILD FAILED
file:C:/Documents and Settings/L507107/Desktop/xml/build.xml:22: taskdef class org.apache.xerces.util.XJavac cannot be found
Total time: 0 seconds
When I look in the ant file I see a comment just before the XJavac task is defined:
<!-- enable compilation under IBM JDK 1.4 -->
<taskdef name="xjavac" classname="org.apache.xerces.util.XJavac"/>
Given that the build fails and the comment, does this mean xerces can't be built on 1.3.1? I can't build xerces, can't get it to run without linkage errors - is the Xerces project still active?
-Ryan
| [EMAIL PROTECTED]
12/03/2002 11:48 AM
|
To: [EMAIL PROTECTED] cc: Subject: LinkageError with 2.2.1 - really simple project |
Hello,
I just downloaded Xerces 2.2.1 from the website and attempted to build a very very simple project but when I go to run it, I get the following error:
java.lang.LinkageError: loader constraints violated when linking org/w3c/dom/Document class
The only two jars in my classpath are:
xmlParserAPIs.jar
and
xercesImpl.jar
I am using the 1.3.1_05 JDK.
Code:
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.FactoryConfigurationError;
import javax.xml.parsers.ParserConfigurationException;
import java.io.File;
import java.io.IOException;
...
try {
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
dbf.setNamespaceAware(true);
DocumentBuilder db = dbf.newDocumentBuilder();
Document doc = db.parse(new File(m_filename));
System.out.println ( "First node: " + doc.getFirstChild().getNodeName() );
} catch (FactoryConfigurationError error) {
error.printStackTrace();
} catch (ParserConfigurationException e) {
e.printStackTrace();
} catch (SAXException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
Any suggestions on why I am getting this linkage error? I am at a complete loss at how to fix this.
-Ryan
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
