commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pfeifer, Craig" <>
Subject RE: Validator 1.01 : java.lang.LinkageError w/JDK 1.4
Date Tue, 17 Dec 2002 18:56:33 GMT
I seem to have answered my own question somewhat.

I was running my TestDriver class from an Ant target. When I execute my
class from a batch file from the shell (not from inside of Ant) with both
the XML API jar and the XercesImpl jar, it executes w/o errors.

Based on these results, I added a fork="true" to my java element in my Ant
script that kicks off my test driver program and it works.

So, it seems that there's some classloader conflict wrt Xerces between Ant
1.5.1 and Validator 1.0.1. The real test is how it will behave when deployed
in the Oracle container.


-----Original Message-----
From: Pfeifer, Craig 
Sent: Tuesday, December 17, 2002 12:06 PM
To: ''
Subject: Validator 1.01 : java.lang.LinkageError w/JDK 1.4

Howdy -

I'm trying to build a small prototype w/Validator 1.0.1 outside of a web

I've got : 

- a main driver class that instantiates the ValidatorResources and Validator
- a JavaBean w/2 fields (username, password)
- my validator.xml with my validation rules for the 2 fields

When I make the call to the ValidatorResourcesInitializer to read my
validator.xml file in my driver class, I get the following exception:

     [java] java.lang.LinkageError: loader constraints violated when linking
org /xml/sax/XMLReader class

I have the xml-apis.jar and the xercesImpl.jar in my classpath when I
compile/run my test driver. If I omit the xml-apis.jar it cannot find the
SAX interfaces on compilation. If I omit the xercesImpl.jar from the
classpath, the test driver compiles successfully but I get this error when
it runs:

     [java] javax.xml.parsers.FactoryConfigurationError: Provider
org.apache.xer ces.jaxp.SAXParserFactoryImpl not found

So, it would seem that the Jakarta components are looking for Xerces as
their XML parser provider, but since JDK 1.4 ships with Crimson, it creates
some sort of class loading issue.

Any thoughts?



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message