JC Tchitchiama
2002-10-22 14:21:02 UTC
All,
I am starting using the Apache XML security tool to sign an XML file.
I am have sucessfully run the signature example. That example
uses DOM technology and that's fine.
My requirement is to sign a JDOM document using xml apache.
My first thought was change the src_example and output a JDOM document into a
DOM
code snippet
...
DOMOutputter out = new DOMOutputter()
w3c.dom.Document doc = out.output(jdom.Document)
...
document and proceed with the signature. I keep getting the NPE below.
A collegue told me that they might be some issue in the JDOM serialization.
When I output the DOM document into a file using XMLSerializer
it works fine XMLSignature cannot handle that same document
Any ideas
Best Regards.
JC.
==================[CreateSignature] Root jett
Start signing
java.lang.NullPointerException
at org.apache.xml.security.c14n.helper.NonNSAttrCompare.compare(Unknown
Source)
at java.util.Arrays.mergeSort(Arrays.java:1181)
at java.util.Arrays.sort(Arrays.java:1128)
at java.util.Collections.sort(Collections.java:121)at
org.apache.xml.security.c14n.implementations.Canonicalizer20010315.getAttrs(Unknown
Source) at
org.apache.xml.security.c14n.implementations.Canonicalizer20010315.canonicalizeXPathNodeSet(Unknown
Source)at
org.apache.xml.security.c14n.implementations.Canonicalizer20010315.canonicalizeXPathNodeSet(Unknown
Source)at
org.apache.xml.security.c14n.implementations.Canonicalizer20010315.engineCanonicalizeXPathNodeSet(Unknown
Source)at
org.apache.xml.security.transforms.implementations.TransformC14NWithComments.enginePerformTransform(Unknown
Source)at
org.apache.xml.security.transforms.Transform.performTransform(Unknown
Source)at
org.apache.xml.security.transforms.Transforms.performTransforms(Unknown
Source)at
org.apache.xml.security.signature.Reference.dereferenceURIandPerformTransforms(Unknown
Source) at
org.apache.xml.security.signature.Reference.getReferencedBytes(Unknown
Source)at org.apache.xml.security.signature.Reference.calculateDigest(Unknown
Source)at
org.apache.xml.security.signature.Reference.generateDigestValue(Unknown
Source) at
org.apache.xml.security.signature.Manifest.generateDigestValues(Unknown
Source) at org.apache.xml.security.signature.XMLSignature.sign(Unknown
Source)
================================================
***@panonet.net
=================================================================
I am starting using the Apache XML security tool to sign an XML file.
I am have sucessfully run the signature example. That example
uses DOM technology and that's fine.
My requirement is to sign a JDOM document using xml apache.
My first thought was change the src_example and output a JDOM document into a
DOM
code snippet
...
DOMOutputter out = new DOMOutputter()
w3c.dom.Document doc = out.output(jdom.Document)
...
document and proceed with the signature. I keep getting the NPE below.
A collegue told me that they might be some issue in the JDOM serialization.
When I output the DOM document into a file using XMLSerializer
it works fine XMLSignature cannot handle that same document
Any ideas
Best Regards.
JC.
==================[CreateSignature] Root jett
Start signing
java.lang.NullPointerException
at org.apache.xml.security.c14n.helper.NonNSAttrCompare.compare(Unknown
Source)
at java.util.Arrays.mergeSort(Arrays.java:1181)
at java.util.Arrays.sort(Arrays.java:1128)
at java.util.Collections.sort(Collections.java:121)at
org.apache.xml.security.c14n.implementations.Canonicalizer20010315.getAttrs(Unknown
Source) at
org.apache.xml.security.c14n.implementations.Canonicalizer20010315.canonicalizeXPathNodeSet(Unknown
Source)at
org.apache.xml.security.c14n.implementations.Canonicalizer20010315.canonicalizeXPathNodeSet(Unknown
Source)at
org.apache.xml.security.c14n.implementations.Canonicalizer20010315.engineCanonicalizeXPathNodeSet(Unknown
Source)at
org.apache.xml.security.transforms.implementations.TransformC14NWithComments.enginePerformTransform(Unknown
Source)at
org.apache.xml.security.transforms.Transform.performTransform(Unknown
Source)at
org.apache.xml.security.transforms.Transforms.performTransforms(Unknown
Source)at
org.apache.xml.security.signature.Reference.dereferenceURIandPerformTransforms(Unknown
Source) at
org.apache.xml.security.signature.Reference.getReferencedBytes(Unknown
Source)at org.apache.xml.security.signature.Reference.calculateDigest(Unknown
Source)at
org.apache.xml.security.signature.Reference.generateDigestValue(Unknown
Source) at
org.apache.xml.security.signature.Manifest.generateDigestValues(Unknown
Source) at org.apache.xml.security.signature.XMLSignature.sign(Unknown
Source)
================================================
***@panonet.net
=================================================================