Skip to Content.
Sympa Menu

mace-opensaml-users - FactoryConfigurationError exception

Subject: OpenSAML user discussion

List archive

FactoryConfigurationError exception


Chronological Thread 
  • From:
  • To:
  • Subject: FactoryConfigurationError exception
  • Date: Mon, 5 Dec 2005 15:20:16 -0500 (EST)

I have a Java program in which the first interesting thing I do is to
instantiate a SAMLNameIdentifier. SAMLConfig.verifyUsableXmlParser() throws
a javax.xml.parsers.FactoryConfigurationError exception and states "OpenSAML
requires an xml parser that supports DOM3 calls. Sun JAXP 1.3 has been
included with this release and is strongly recommended. If you are using Java
1.4, make sure that you have enabled the Endorsed Standards Override
Mechanism for this parser (see
http://java.sun.com/j2se/1.4.2/docs/guide/standards/ for details)."

One of the OpenSAML documentation files states "There is a known issue with
JDK 1.4 because it includes obsolete XML code inside the JDK itself. The
workaround for the issue is to copy the JAXP jarfiles from the endorsed
folder into your JDK's 'endorsed' class library location, typically
'$JAVA_HOME/jre/lib/endorsed'". So, I copy resolver.jar, xalan.jar,
xercesImpl.jar and xml-apis.jar from the OpenSAML 'common/endorsed' directory
to the directory they specify, and, for good measure, make sure that they are
replaced in *any* directory these files appear. When running my program from
a command line, I also tell the library to override the default parser by
specifying the "-D" option, as follows:
java -Djava.endorsed.dir="c:\program files\...\common\endorsed" mylib.MyTest

Of course, I still get the exception. Does anyone have any idea why, and
(preferably) how to make sure the correct version of the library is specified
to avoid the situation that causes the exception to fire?

Note that I am using j2sdk1.4.2_07.

Any help would be much appreciated. Thanks,

Dan Lanz


p.s. Just an extra note: if I run 'java org.apache.xerces.impl.Version' it
responds with 'Xerces-J 2.7.1'. If I specify the override, as follows: 'java
-Djava.endorsed.dir="c:\program files\...\common\endorsed"
org.apache.xerces.impl.Version' it responds with exactly the same version. I
also attempted to explictly specify the Xerces Jaxp factory when I tried to
run my program from the command line, as follows: 'java
-Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl"
mylib.MyTest', all with the same result.



Archive powered by MHonArc 2.6.16.

Top of Page