Skip to Content.
Sympa Menu

mace-opensaml-users - Re: [OpenSAML] Unmarshall and validating an SAML file

Subject: OpenSAML user discussion

List archive

Re: [OpenSAML] Unmarshall and validating an SAML file


Chronological Thread 
  • From: murali mca <>
  • To:
  • Subject: Re: [OpenSAML] Unmarshall and validating an SAML file
  • Date: Mon, 26 Oct 2009 16:48:09 -0700 (PDT)
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.co.in; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=hraL1fRQ/tb6LCoFR2UnU8tjjJORbW9cqMd0G83UDmdr3G2p4PmY6xvb3XpENy3WF92mT9ybqMOd4ZUJzdNlmsHXaeU0Wkx5vSVMc4A8McU6HETsmAes/qRUc9vW8OMFXfJnR9C/bVugmhvzTbBucFw8KVkcQjIRE2o7roHrCmE=;

Brent, Many Thanks for pointing the DefaultBootstrap.bootstrap().
 
I have added "DefaultBootstrap.bootstrap();" in my code and could see the below error in the output:
======================
26-Oct-2009 21:58:53 org.apache.catalina.core.ApplicationContext log
INFO: HTMLManager: list: Listing contexts for virtual host 'localhost'
[org.opensaml.DefaultBootstrap] : Initializing Velocity template engine
[org.opensaml.xml.Configuration] : VM using JAXP parser oracle.xml.jaxp.JXDocumentBuilderFactory
26-Oct-2009 21:58:58 org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet jsp threw exception
java.lang.UnsupportedOperationException: This parser does not support specification "null" version "null"
 at javax.xml.parsers.DocumentBuilderFactory.setSchema(Unknown Source)
 at org.opensaml.xml.parse.BasicParserPool.initializePool(BasicParserPool.java:498)
 at org.opensaml.xml.parse.BasicParserPool.<init>(BasicParserPool.java:144)
 at org.opensaml.xml.XMLConfigurator.<init>(XMLConfigurator.java:70)
 at org.opensaml.DefaultBootstrap.initializeXMLTooling(DefaultBootstrap.java:131)
 at org.opensaml.DefaultBootstrap.bootstrap(DefaultBootstrap.java:75)
 at org.apache.jsp.service_005fprovider_jsp._jspService(service_005fprovider_jsp.java:122)
 at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
 at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:384)
 at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:196)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:228)
 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:216)
 at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
 at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:634)
 at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445)
 at java.lang.Thread.run(Unknown Source)
==================================
I have endorsed the files in tomcat(copied complete "endorsed" folder from downloaded opensaml2.0 to c:/apachetomcat/) and jre(copied complete "endorsed" folder to myeclipse/jre/lib).
As I am getting the error in web application, I tried to test the same code as standalone and can see different error as below.
For the Stand alone application I have the slf4j-api-1.5.0.jar in the build path.
==================
[org.opensaml.DefaultBootstrap] : Initializing Velocity template engine
[org.opensaml.xml.Configuration] : VM using JAXP parser org.apache.xerces.jaxp.DocumentBuilderFactoryImpl
[org.opensaml.xml.Configuration] : VM using JAXP parser org.apache.xerces.jaxp.DocumentBuilderFactoryImpl
[org.opensaml.DefaultBootstrap] : Loading XMLTooling configuration /default-config.xml
[org.opensaml.xml.XMLConfigurator] : Loading configuration from XML Document
Exception in thread "main" java.lang.NoSuchMethodError: org.slf4j.Logger.trace(Ljava/lang/String;Ljava/lang/Object;)V
 at org.opensaml.xml.XMLConfigurator.load(XMLConfigurator.java:141)
 at org.opensaml.xml.XMLConfigurator.load(XMLConfigurator.java:125)
 at org.opensaml.DefaultBootstrap.initializeXMLTooling(DefaultBootstrap.java:135)
 at org.opensaml.DefaultBootstrap.bootstrap(DefaultBootstrap.java:75)
 at utils.Main.main(Main.java:35)
==================
 
If I remove the "DefaultBootstrap.bootstrap()" in the standalone application, I can see the "Exception in thread "main" java.lang.NullPointerException " at the line "inCommonMDDoc = ppMgr.parse(in); ".i.e, the "inCommonMDDoc " is null. I am sure the input file path is correct and is not empty.
Please help me with your inputs to get this resolved.
 
Thanks and Regards,
Murali

--- On Tue, 27/10/09, Brent Putman <> wrote:

From: Brent Putman <>
Subject: Re: [OpenSAML] Unmarshall and validating an SAML file
To:
Date: Tuesday, 27 October, 2009, 2:01 AM

I don't see anything obviously wrong with what you doing vis-a-vis the
XML parsing.  Not much can go wrong there, it's not even the opensaml
code, just JAXP.   So check that that is the correct filename, that the
file isn't empty, etc.

Are you sure the error is from that line?  I don't see you calling
DefaultBootstrap.bootstrap() in your code snippet.  Failing to bootstrap
the library that would most likely generate an NPE a few lines down,
where an attempt would be made to use  the (null reference) unmarshaller .



murali mca wrote:
>
>
> When I ran the above piece of code, I am presenting with
> responseRoot: null
> "Exception in thread "main" _java.lang.NullPointerException_ "

> I am getting the "null", at this  line. Element responseRoot =
> inCommonMDDoc.getDocumentElement();
> Please could you correct me if I am doing wrong in mycode.

> Thanks
> Regards
>
>
> <http://in.rd.yahoo.com/tagline_metro_4/*http://in.yahoo.com/trynew>


From cricket scores to your friends. Try the Yahoo! India Homepage!


Archive powered by MHonArc 2.6.16.

Top of Page