List of usage examples for javax.xml.crypto MarshalException getCause
public Throwable getCause()
From source file:at.gv.egiz.bku.slcommands.impl.CreateXMLSignatureCommandImpl.java
/** * Signs the signature./*from w ww . j a v a2s .c om*/ * @param commandContext TODO * * @throws SLCommandException * if signing the signature fails * @throws SLViewerException */ private void signXMLSignature(SLCommandContext commandContext) throws SLCommandException, SLViewerException { try { signature.sign(commandContext.getSTAL(), keyboxIdentifier); } catch (MarshalException e) { log.error("Failed to marshall XMLSignature.", e); throw new SLCommandException(4000); } catch (XMLSignatureException e) { if (e.getCause() instanceof URIReferenceException) { URIReferenceException uriReferenceException = (URIReferenceException) e.getCause(); if (uriReferenceException.getCause() instanceof SLCommandException) { throw (SLCommandException) uriReferenceException.getCause(); } } log.error("Failed to sign XMLSignature.", e); throw new SLCommandException(4000); } }