ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephane Bailliez <sbaill...@imediation.com>
Subject RE: LinkageError?
Date Thu, 08 Feb 2001 10:25:33 GMT
Welcome to libraries hell :-)

The linkage error is due to conflicts between the 2 parsers when loading 2
implementations with different classloaders

considering the first error, you are apparentely using jaxp11 included in
Xalan2, thus if you want to use crimson you need to specify the following
properties:
-Djavax.xml.parsers.SAXParserFactory=org.apache.crimson.jaxp.SAXParserFactor
yImpl
-Djavax.xml.parsers.DocumentBuilderFactory=org.apache.crimson.jaxp.DocumentB
uilderFactoryImpl

-- 
 St├ęphane Bailliez 
 Software Engineer, Paris - France 
 iMediation - http://www.imediation.com 
 Disclaimer: All the opinions expressed above are mine and not those from my
company. 


-----Original Message-----
From: Tim McCune [mailto:timm@channelpoint.com]
Sent: Wednesday, February 07, 2001 11:47 PM
To: 'ant-dev@jakarta.apache.org'
Subject: LinkageError?


-----BEGIN PGP SIGNED MESSAGE----- 
Hash: SHA1 
I came across a weird error today.  I'm trying to run Ant 1.2 with 
Xerces 1.3 in my classpath.  If I put Crimson ahead of Xerces in my 
classpath, I get a FactoryConfigurationError: 
  
org.apache.xerces.jaxp.DocumentBuilderFactoryImpl 
javax.xml.parsers.FactoryConfigurationError: 
org.apache.xerces.jaxp.DocumentBuilderFactoryImpl 
 at 
javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFa 
ctory.java:75) 
  
Fair enough.  So I tried to put Xerces ahead of Crimson, and got a 
LinkageError: 
  
Class org/w3c/dom/Document violates loader constraints 
java.lang.LinkageError: Class org/w3c/dom/Document violates loader 
constraints 
 at java.lang.ClassLoader.defineClass0(Native Method) 
 at java.lang.ClassLoader.defineClass(ClassLoader.java:486) 
 at java.lang.ClassLoader.defineClass(ClassLoader.java:426) 
 at 
org.apache.tools.ant.AntClassLoader.getClassFromStream(AntClassLoader. 
java:388) 
 at 
org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:433) 
 at 
org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:406) 
 at 
org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:336) 
  
This is the one that really has me baffled.  Anyone know what would 
be causing the LinkageError? 
  
Tim McCune 
Software Architect, ChannelPoint 
"Aw, Gilligan screwed it up.  He always screws it up.  Why don't they 
just kill him?" -- Red Foreman 
  
-----BEGIN PGP SIGNATURE----- 
Version: PGPfreeware 6.5.3 for non-commercial use <http://www.pgp.com> 
iQA/AwUBOoHP+NUPOr8a7vy5EQI1GgCgn6pjG3eeHcV7L1M/Ot+II6AloM8Anj7s 
/xHsMPu75p65YBTb7aG8grJe 
=dVms 
-----END PGP SIGNATURE----- 

Mime
View raw message