  | |  | unsatisfiedLinkError and xercesImpl | unsatisfiedLinkError and xercesImpl 2003-01-10 - By Doyle, Annette
On 2 development machines the following code runs fine. However, when we tried to deploy on a deployment machine the Java.lang.UnsatisfiedLinkError error occurs. It occurs at DocumentBuilder builder = factory.newDocumentBuilder();
try { Properties parserProp = new Properties(); parserProp.put ("javax.xml.parsers.DocumentBuilderFactory","org.apache.xerces.jaxp.Docu mentBuilderFactoryImpl"); parserProp.put ("javax.xml.parsers.SAXParserFactory","org.apache.xerces.jaxp.SAXParserF actoryImpl"); parserProp.put("org.xml.sax.driver","org.apache.xerces.parsers.SAXParser "); System.setProperties(parserProp); DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder builder = factory.newDocumentBuilder(); Document document = builder.parse(configFile);.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <HTML> <HEAD> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"> <META NAME="Generator" CONTENT="MS Exchange Server version 6.0.6249.1"> <TITLE>unsatisfiedLinkError and xercesImpl</TITLE> </HEAD> <BODY> <!-- Converted from text/rtf format -->
<P><FONT SIZE=2 FACE="Arial">On 2 development machines the following code runs fine. However, when we tried to deploy on a deployment machine the Java.lang .UnsatisfiedLinkError error occurs. It occurs at DocumentBuilder builder = factory.newDocumentBuilder();</FONT></P> <BR>
<P> <FONT SIZE=2 FACE="Arial">try {</FONT>
<BR> <FONT SIZE=2 FACE="Arial ">Properties parserProp = new Properties();</FONT>
<BR> <FONT SIZE=2 FACE="Arial ">parserProp.put ("javax.xml.parsers.DocumentBuilderFactory ","org.apache.xerces.jaxp.DocumentBuilderFactoryImpl");</FONT></P >
<P> <FONT SIZE=2 FACE="Arial ">parserProp.put ("javax.xml.parsers.SAXParserFactory","org .apache.xerces.jaxp.SAXParserFactoryImpl");</FONT></P>
<P> <FONT SIZE=2 FACE="Arial"> parserProp.put(" ;org.xml.sax.driver","org.apache.xerces.parsers.SAXParser");< /FONT>
<BR> <FONT SIZE=2 FACE="Arial ">System.setProperties(parserProp);</FONT>
<BR> <FONT SIZE=2 FACE="Arial ">DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();</FONT>
<BR> <FONT SIZE=2 FACE="Arial ">DocumentBuilder builder = factory.newDocumentBuilder();</FONT>
<BR> <FONT SIZE=2 FACE="Arial ">Document document = builder.parse(configFile);.</FONT> </P>
</BODY> </HTML>
|
|
 |