I've observed that  i need to restart Tomcat server after deploying , when
I use WSS4J
If I don't do it, java.lang.NullPointerException in DOMReference.java is
thrown

Does anyone know why ?

Thanks and regards



2013/6/18 Jose María Zaragoza <[email protected]>

>
> Hello:
>
> I'm using Apache CXF 2.7.3
>
> I'm getting this exception sometimes.
> It's a NullPointerException in
> org.apache.jcp.xml.dsig.internal.dom.DOMReference.marshal method
> Is there any problem with xmlsec-1.5.3 + wss4j-1.6.9 ?
>
>
> But other times, usually after restart Tomcat server, it works fine ( with
> the same test )
> I've pasted .WSS4JOutInterceptor's configuration below
>
> Caused by: org.apache.ws.security.WSSecurityException: Signature creation
> failed
> at
> org.apache.ws.security.message.WSSecSignature.computeSignature(WSSecSignature.java:558)
> ~[wss4j-1.6.9.jar:1.6.9]
>  at
> org.apache.ws.security.action.SignatureAction.execute(SignatureAction.java:99)
> ~[wss4j-1.6.9.jar:1.6.9]
> ... 52 common frames omitted
> Caused by: java.lang.NullPointerException: null
> at
> org.apache.jcp.xml.dsig.internal.dom.DOMReference.marshal(DOMReference.java:297)
> ~[xmlsec-1.5.3.jar:1.5.3]
>  at
> org.apache.jcp.xml.dsig.internal.dom.DOMSignedInfo.marshal(DOMSignedInfo.java:268)
> ~[xmlsec-1.5.3.jar:1.5.3]
> at
> org.apache.jcp.xml.dsig.internal.dom.DOMXMLSignature.marshal(DOMXMLSignature.java:216)
> ~[xmlsec-1.5.3.jar:1.5.3]
>  at
> org.apache.jcp.xml.dsig.internal.dom.DOMXMLSignature.sign(DOMXMLSignature.java:329)
> ~[xmlsec-1.5.3.jar:1.5.3]
> at
> org.apache.ws.security.message.WSSecSignature.computeSignature(WSSecSignature.java:553)
> ~[wss4j-1.6.9.jar:1.6.9]
>
>
> <bean class="org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor"
> id="sign">
>         <constructor-arg>
>             <map>
>                 <entry key="action" value="Signature"/>
>                 <entry key="user" value="me"/>
>                 <entry key="signatureUser" value="me"/>
>
>                 <entry key="passwordCallbackClass"
> value="com.prosodie.ws.fijo.util.KeystorePasswordCallback"/>
>                 <entry key="signaturePropFile"
> value="keystore.properties"/>
>                 <entry key="signatureKeyIdentifier"
> value="DirectReference"/>
>                 <entry key="signatureParts" value="{Content}{
> http://schemas.xmlsoap.org/soap/envelope/}Body"/>
>                 <entry key="signatureAlgorithm" value="
> http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
>
>                 <entry key="sigCanonicalization" value="
> http://www.w3.org/2001/10/xml-exc-c14n#"/>
>                 <entry key="signatureDigestAlgorithm" value="
> http://www.w3.org/2000/09/xmldsig#sha1"/>
>
>             </map>
>         </constructor-arg>
>     </bean>
>

Reply via email to