Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6982772

javax.xml.crypto.dsig.TransformException occurs in canonicalization for XML signature in jdk6u21

    Details

    • Subcomponent:
    • Resolved In Build:
      b09
    • CPU:
      x86
    • OS:
      windows_vista
    • Verification:
      Verified

      Backports

        Description

        When a program tries to do XML digital signature, the following exception shows up.

        C:\Users\licensees>java -version
        java version "1.6.0_21"
        Java(TM) SE Runtime Environment (build 1.6.0_21-b06)
        Java HotSpot(TM) Client VM (build 17.0-b16, mixed mode)

        C:\Users\licensees>javac *.java

        C:\Users\licensees>java Main
        javax.xml.crypto.dsig.TransformException: Couldn't find Canonicalizer for: http://www.w3.org/TR/2001/REC-xml-c14n-20010315: Unknown canonicalizer. No handler installed for URI http://www.w3.org/TR/2001/REC-xml-c14n-20010315
                at org.jcp.xml.dsig.internal.dom.ApacheCanonicalizer.canonicalize(ApacheCanonicalizer.java:85)
                at org.jcp.xml.dsig.internal.dom.ApacheCanonicalizer.canonicalize(ApacheCanonicalizer.java:71)
                at org.jcp.xml.dsig.internal.dom.DOMCanonicalXMLC14NMethod.transform(DOMCanonicalXMLC14NMethod.java:55)
                at org.jcp.xml.dsig.internal.dom.DOMTransform.transform(DOMTransform.java:111)
                at Main.test1(Main.java:32)
                at Main.main(Main.java:23)
        Caused by: com.sun.org.apache.xml.internal.security.c14n.InvalidCanonicalizerException: Unknown canonicalizer. No handlerinstalled for URI http://www.w3.org/TR/2001/REC-xml-c14n-20010315
                at com.sun.org.apache.xml.internal.security.c14n.Canonicalizer.<init>(Canonicalizer.java:108)
                at com.sun.org.apache.xml.internal.security.c14n.Canonicalizer.getInstance(Canonicalizer.java:123)
                at org.jcp.xml.dsig.internal.dom.ApacheCanonicalizer.canonicalize(ApacheCanonicalizer.java:79)
                ... 5 more
        com.sun.org.apache.xml.internal.security.c14n.InvalidCanonicalizerException: Unknown canonicalizer. No handler installed for URI
        http://www.w3.org/TR/2001/REC-xml-c14n-20010315
                at com.sun.org.apache.xml.internal.security.c14n.Canonicalizer.<init>(Canonicalizer.java:108)
                at com.sun.org.apache.xml.internal.security.c14n.Canonicalizer.getInstance(Canonicalizer.java:123)
                at org.jcp.xml.dsig.internal.dom.ApacheCanonicalizer.canonicalize(ApacheCanonicalizer.java:79)
                at org.jcp.xml.dsig.internal.dom.ApacheCanonicalizer.canonicalize(ApacheCanonicalizer.java:71)
                at org.jcp.xml.dsig.internal.dom.DOMCanonicalXMLC14NMethod.transform(DOMCanonicalXMLC14NMethod.java:55)
                at org.jcp.xml.dsig.internal.dom.DOMTransform.transform(DOMTransform.java:111)
                at Main.test1(Main.java:32)
                at Main.main(Main.java:23)
        com.sun.org.apache.xml.internal.security.c14n.InvalidCanonicalizerException: Unknown canonicalizer. No handler installed for URI http://www.w3.org/TR/2001/REC-xml-c14n-20010315
                at com.sun.org.apache.xml.internal.security.c14n.Canonicalizer.<init>(Canonicalizer.java:108)
                at com.sun.org.apache.xml.internal.security.c14n.Canonicalizer.getInstance(Canonicalizer.java:123)
                at org.jcp.xml.dsig.internal.dom.ApacheCanonicalizer.canonicalize(ApacheCanonicalizer.java:79)
                at org.jcp.xml.dsig.internal.dom.ApacheCanonicalizer.canonicalize(ApacheCanonicalizer.java:71)
                at org.jcp.xml.dsig.internal.dom.DOMCanonicalXMLC14NMethod.transform(DOMCanonicalXMLC14NMethod.java:55)
                at org.jcp.xml.dsig.internal.dom.DOMTransform.transform(DOMTransform.java:111)
                at Main.test1(Main.java:32)
                at Main.main(Main.java:23)


        REPRODUCE:
        1. Compile the attached Main.java
        2. Set the attached SampleDOM.xml under the directory where Main.class is placed.
        3. Invoke "java Main"

        FREQUENCY:
        This exception always occurs.

        NOTE:
        This problem does not occur in jdk7.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  skoppar Sunita Koppar (Inactive)
                  Reporter:
                  tbaba Tadayuki Baba (Inactive)
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Imported:
                    Indexed: