Skip to Content.
Sympa Menu

mace-opensaml-users - Re: problems extending the opensaml2 library

Subject: OpenSAML user discussion

List archive

Re: problems extending the opensaml2 library


Chronological Thread 
  • From: Chad La Joie <>
  • To:
  • Subject: Re: problems extending the opensaml2 library
  • Date: Mon, 10 Sep 2007 15:48:09 -0400
  • Organization: OIS - Middleware

The configuration files are just XML files. The error just means you haven't declared the namespace in whichever configuration file you added put your object provide registration information.


wrote:
Quoting Chad La Joie
<>:

Well, I'm not sure what your interface looks like but the error message
is pretty clear. It's not find a setter that it expects.

As to the configs, they are the XML files listed in the
resource/classpath directory.

Hi Chad,

thank you for the reply. I found them a couple of minute ago while I was browsing the directory tree. I added the configuration and solved the problem of NullPointerException.

Now I have the following problem that I'm unsure what to do next. I added some constants to SAMLConstants.java so that my objects have a namespace like "urn:oasis:names:tc:xacml:2.0:saml:protocol:schema:os" and a prefix like "xacml-samlp". I also added a validator to the configuration file. The library builds ok, but when I try to create the object on my program I get the following error:

[maicon@caronte
~/usr/workspace/OSTwo]$ ant run
Buildfile: build.xml

run:
[java] log4j:WARN No appenders could be found for logger (org.opensaml.DefaultBootstrap).
[java] log4j:WARN Please initialize the log4j system properly.
[java] org.opensaml.xml.ConfigurationException: Configuration file does not validate against schema
[java] at org.opensaml.xml.XMLConfigurator.validateConfiguration(XMLConfigurator.java:397)
[java] at org.opensaml.xml.XMLConfigurator.load(XMLConfigurator.java:156)
[java] at org.opensaml.xml.XMLConfigurator.load(XMLConfigurator.java:129)
[java] at org.opensaml.DefaultBootstrap.initializeXMLTooling(DefaultBootstrap.java:137)
[java] at org.opensaml.DefaultBootstrap.bootstrap(DefaultBootstrap.java:73)
[java] at teste.Main.main(Unknown Source)
[java] Caused by: org.xml.sax.SAXParseException: UndeclaredPrefix: Cannot resolve 'xacml-samlp:XACMLAuthzDecisionQuery' as a QName: the prefix 'xacml-samlp' is not declared.
[java] at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
[java] at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
[java] at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
[java] at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
[java] at org.apache.xerces.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(Unknown Source)
[java] at org.apache.xerces.impl.xs.XMLSchemaValidator.reportSchemaError(Unknown Source)
[java] at org.apache.xerces.impl.xs.XMLSchemaValidator.processOneAttribute(Unknown Source)
[java] at org.apache.xerces.impl.xs.XMLSchemaValidator.processAttributes(Unknown Source)
[java] at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source)
[java] at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(Unknown Source)
[java] at org.apache.xerces.jaxp.validation.DOMValidatorHelper.beginNode(Unknown Source)
[java] at org.apache.xerces.jaxp.validation.DOMValidatorHelper.validate(Unknown Source)
[java] at org.apache.xerces.jaxp.validation.DOMValidatorHelper.validate(Unknown Source)
[java] at org.apache.xerces.jaxp.validation.ValidatorImpl.validate(Unknown Source)
[java] at javax.xml.validation.Validator.validate(Unknown Source)
[java] at org.opensaml.xml.XMLConfigurator.validateConfiguration(XMLConfigurator.java:388)
[java] ... 5 more



Where should I register these new prefix and namespace so that the validator wont complain? (as a side note, I added the schema files corresponding to the new objets to the resource/classpath/schema dir.)


Thanks for your attention


Maicon

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.


--
Chad La Joie 2052-C Harris Bldg
OIS-Middleware 202.687.0124



Archive powered by MHonArc 2.6.16.

Top of Page