Skip to Content.
Sympa Menu

mace-opensaml-users - Re: NullPointerException when building objects

Subject: OpenSAML user discussion

List archive

Re: NullPointerException when building objects


Chronological Thread 
  • From: Brent Putman <>
  • To:
  • Subject: Re: NullPointerException when building objects
  • Date: Mon, 27 Aug 2007 14:57:10 -0400

Hi Maicon,

No, you don't need to change the config files, but looks like you're
using Sun's JDK, the com.sun.org.apache.* classes indicated in the
exception give it away. You do need to be sure and endorse the latest
versions of both Xerces and Xalan as described here:

https://mail.internet2.edu/wws/arc/mace-opensaml-users/2006-04/msg00038.html

From our SVN, you can get the ones we currently use from
/thirdparty-lib/xerces and /thirdparty-lib/xalan.

Be sure to also remove any other Xerces and Xalan jars that you may have
in your classpath or endorsed dir (wherever the latter may be for your
environment).

I thought we had this info more centrally on the Wiki somewhere, but I
couldn't find it anywhere. We'll add that to one of the introductory or
installation oriented pages.

--Brent




wrote:
> Hi Brent,
>
>>
>> Before you use any OpenSAML 2 code, you need to initialize the library
>> as described here under "Configurating the Library":
>
> Thank you for pointing me that, I added the bootstrap to the code and
> now I'm getting an error that says the configuration file doesnt
> validate against the schema. Do I need to change anything on the
> configuration files? (I've built the lib from the opensaml2 "trunk",
> and did not change anything, just compiled it).
>
> Best Regards,
> Maicon
>
> ps. The error messages are bellow:
>
> org.opensaml.xml.ConfigurationException: Configuration file does not
> validate against schema
> at
> org.opensaml.xml.XMLConfigurator.validateConfiguration(XMLConfigurator.java:397)
>
> at org.opensaml.xml.XMLConfigurator.load(XMLConfigurator.java:156)
> at org.opensaml.xml.XMLConfigurator.load(XMLConfigurator.java:129)
> at
> org.opensaml.DefaultBootstrap.initializeXMLTooling(DefaultBootstrap.java:137)
>
> at org.opensaml.DefaultBootstrap.bootstrap(DefaultBootstrap.java:73)
> at teste.Main.main(Main.java:36)
> Caused by: org.xml.sax.SAXParseException: UndeclaredPrefix: Cannot
> resolve 'xt:DEFAULT' as a QName: the prefix 'xt' is not declared.
> at
> com.sun.org.apache.xerces.internal.jaxp.validation.Util.toSAXParseException(Util.java:109)
>
> at
> com.sun.org.apache.xerces.internal.jaxp.validation.ErrorHandlerAdaptor.error(ErrorHandlerAdaptor.java:104)
>
> at
> com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:382)
>
> at
> com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:316)
>
> at
> com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(XMLSchemaValidator.java:429)
>
> at
> com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.reportSchemaError(XMLSchemaValidator.java:3185)
>
> at
> com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.processOneAttribute(XMLSchemaValidator.java:2799)
>
> at
> com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.processAttributes(XMLSchemaValidator.java:2735)
>
> at
> com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:2094)
>
> at
> com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:705)
>
> at
> com.sun.org.apache.xerces.internal.jaxp.validation.ValidatorHandlerImpl.startElement(ValidatorHandlerImpl.java:335)
>
> at
> org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1072)
>
> at org.apache.xml.serializer.TreeWalker.startNode(TreeWalker.java:357)
> at org.apache.xml.serializer.TreeWalker.traverse(TreeWalker.java:143)
> at
> org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:389)
>
> at
> com.sun.org.apache.xerces.internal.jaxp.validation.ValidatorImpl.process(ValidatorImpl.java:220)
>
> at
> com.sun.org.apache.xerces.internal.jaxp.validation.ValidatorImpl.validate(ValidatorImpl.java:141)
>
> at javax.xml.validation.Validator.validate(Validator.java:82)
> at
> org.opensaml.xml.XMLConfigurator.validateConfiguration(XMLConfigurator.java:388)
>
>
> .... (log was cut by IDE) ...
>
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
>



Archive powered by MHonArc 2.6.16.

Top of Page