1 Reply Latest reply on Nov 27, 2011 1:54 PM by Anil Saldanha

    PicketLink 2.0.1: NullPointerException

    John Baker Newbie

      Hello,

       

      Reference: jjava.lang.NullPointerException

              org.picketlink.identity.federation.core.parsers.saml.SAMLStatusResponseTypeParser.parseStatus(SAMLStatusResponseTypeParser.java:132)

              org.picketlink.identity.federation.core.parsers.saml.SAMLResponseParser.parse(SAMLResponseParser.java:90)

              org.picketlink.identity.federation.core.parsers.saml.SAMLParser.parse(SAMLParser.java:100)

              org.picketlink.identity.federation.core.parsers.AbstractParser.parse(AbstractParser.java:92)

              org.picketlink.identity.federation.api.saml.v2.response.SAML2Response.getSAML2ObjectFromStream(SAML2Response.java:437)

              org.picketlink.identity.federation.web.process.ServiceProviderSAMLResponseProcessor.process(ServiceProviderSAMLResponseProcessor.java:115)

       

      I think you need to take the following in SAMLStatusResponseTypeParser:

       

                  //Peek at the next start element to see if it is status code

                  startElement = StaxParserUtil.peekNextStartElement(xmlEventReader);

                  elementTag = startElement.getName().getLocalPart();

       

      and change to:

       

                  //Peek at the next start element to see if it is status code

                  startElement = StaxParserUtil.peekNextStartElement(xmlEventReader);

                  if (startElement!=null) {

                      elementTag = startElement.getName().getLocalPart();

       

      A response from ADFS2.0 generated the XML that caused this exception.

       

       

      John