<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p><br>
</p>
<div class="moz-cite-prefix">On 1/15/20 1:03 PM, rahul sharma wrote:</div>
<blockquote type="cite"
cite="mid:1579111413578-0.post@n2.nabble.com">
<pre class="moz-quote-pre" wrap="">
try {
final HTTPPostEncoder pe = new HTTPPostEncoder();
pe.setHttpServletResponse(response);
pe.setMessageContext(mc);
pe.initialize();
pe.prepareContext();
pe.encode();
} catch (final MessageEncodingException |
ComponentInitializationException e) {
logger.warn("SAML2Request generation failed: {}",
e.getMessage(), e);
}
*This is the error I got *- SAML2Request generation failed: VelocityEngine
must be supplied
net.shibboleth.utilities.java.support.component.ComponentInitializationException:
VelocityEngine must be supplied
at
org.opensaml.saml.saml2.binding.encoding.impl.HTTPPostEncoder.doInitialize(HTTPPostEncoder.java:128)
</pre>
</blockquote>
<p><br>
</p>
<p>The error is pretty self-explanatory. You must supply a
VelocityEngine instance to the HTTPPostEncoder instance via the
corresponding setter before you call initialize() on it.<br>
</p>
</body>
</html>