You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by "Pfeifer, Craig" <cr...@impactinnovations.com> on 2002/12/17 18:05:38 UTC

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
container.

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?

TIA,

Craig