I have recently upgraded opensaml dependency from 2.5.3 to 2.6.1 and xmlutil from 1.3.0 to 1.4.1. It compiles without any errors but while running the application i get the following exception:
java.lang.NullPointerException
org.opensaml.xml.io.AbstractXMLObjectMarshaller.marshall(AbstractXMLObjectMarshaller.java:84)
Calling Code:
final MarshallerFactory marshallerFac = SAMLUtil.getMarshallerFactory();
final org.opensaml.xml.io.Marshaller authnStatementMarshaller = marshallerFac.getMarshaller(assertion);
Element assertionElement = null;
try {
assertionElement = authnStatementMarshaller.marshall(assertion);
try {
// Sign assertion and query signature
Signer.signObject(signature);
}
catch (final SignatureException e) {
LOGGER.error("Fout opgetreden bij ondertekenen Assertion", e);
}
}