org.apache.xml.security.utils.resolver.ResourceResolverException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • How to sign a SOAP message?
    via Stack Overflow by Eduardo Lopes
    ,
  • When trying to sign a SAML 2.0 Assertion XML element using the Apache XML Security provider (org.apache.jcp.xml.dsig.internal.dom.XMLDSigRI), the below error is thrown and operation fails. This is seen in xmlsec 1.5.1 (java). However, using this provider (which is part of Java 6 and also was part of xmlsec 1.4.5) - org.jcp.xml.dsig.internal.dom.XMLDSigRI does not result in any error. Please see attached test code to repro the problem. ------- Unit test output ---------- XMLSignatureFactory class = org.apache.jcp.xml.dsig.internal.dom.DOMXMLSignatureFactory javax.xml.crypto.dsig.XMLSignatureException: javax.xml.crypto.URIReferenceException: org.apache.xml.security.utils.resolver.ResourceResolverException: Cannot resolve element with ID ID_b528ce76-71e5-4012-aabb-daa952e14603 at org.apache.jcp.xml.dsig.internal.dom.DOMReference.dereference(DOMReference.java:419) at org.apache.jcp.xml.dsig.internal.dom.DOMReference.digest(DOMReference.java:347) at org.apache.jcp.xml.dsig.internal.dom.DOMXMLSignature.digestReference(DOMXMLSignature.java:471) at org.apache.jcp.xml.dsig.internal.dom.DOMXMLSignature.sign(DOMXMLSignature.java:370) at example.xmlseclib.TestSignAssertion.testSign(TestSignAssertion.java:117) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28) at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28) at org.junit.runners.ParentRunner.run(ParentRunner.java:236) at org.junit.runner.JUnitCore.run(JUnitCore.java:157) at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:76) at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:182) at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:62) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120) Caused by: javax.xml.crypto.URIReferenceException: org.apache.xml.security.utils.resolver.ResourceResolverException: Cannot resolve element with ID ID_b528ce76-71e5-4012-aabb-daa952e14603 at org.apache.jcp.xml.dsig.internal.dom.DOMURIDereferencer.dereference(DOMURIDereferencer.java:122) at org.apache.jcp.xml.dsig.internal.dom.DOMReference.dereference(DOMReference.java:413) ... 32 more Caused by: org.apache.xml.security.utils.resolver.ResourceResolverException: Cannot resolve element with ID ID_b528ce76-71e5-4012-aabb-daa952e14603 at org.apache.xml.security.utils.resolver.implementations.ResolverFragment.engineResolve(ResolverFragment.java:86) at org.apache.xml.security.utils.resolver.ResourceResolver.resolve(ResourceResolver.java:279) at org.apache.jcp.xml.dsig.internal.dom.DOMURIDereferencer.dereference(DOMURIDereferencer.java:115) ... 33 more javax.xml.crypto.URIReferenceException: org.apache.xml.security.utils.resolver.ResourceResolverException: Cannot resolve element with ID ID_b528ce76-71e5-4012-aabb-daa952e14603 at org.apache.jcp.xml.dsig.internal.dom.DOMURIDereferencer.dereference(DOMURIDereferencer.java:122) at org.apache.jcp.xml.dsig.internal.dom.DOMReference.dereference(DOMReference.java:413) at org.apache.jcp.xml.dsig.internal.dom.DOMReference.digest(DOMReference.java:347) at org.apache.jcp.xml.dsig.internal.dom.DOMXMLSignature.digestReference(DOMXMLSignature.java:471) at org.apache.jcp.xml.dsig.internal.dom.DOMXMLSignature.sign(DOMXMLSignature.java:370) at example.xmlseclib.TestSignAssertion.testSign(TestSignAssertion.java:117) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28) at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28) at org.junit.runners.ParentRunner.run(ParentRunner.java:236) at org.junit.runner.JUnitCore.run(JUnitCore.java:157) at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:76) at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:182) at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:62) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120) Caused by: org.apache.xml.security.utils.resolver.ResourceResolverException: Cannot resolve element with ID ID_b528ce76-71e5-4012-aabb-daa952e14603 at org.apache.xml.security.utils.resolver.implementations.ResolverFragment.engineResolve(ResolverFragment.java:86) at org.apache.xml.security.utils.resolver.ResourceResolver.resolve(ResourceResolver.java:279) at org.apache.jcp.xml.dsig.internal.dom.DOMURIDereferencer.dereference(DOMURIDereferencer.java:115) ... 33 more Process finished with exit code 255
    via by Murali Gunasekaran,
    • org.apache.xml.security.utils.resolver.ResourceResolverException: Cannot resolve element with ID Body at org.apache.xml.security.utils.resolver.implementations.ResolverFragment.engineResolve(ResolverFragment.java:92) at org.apache.xml.security.utils.resolver.ResourceResolver.resolve(ResourceResolver.java:259) at org.apache.xml.security.signature.Reference.getContentsBeforeTransformation(Reference.java:400) at org.apache.xml.security.signature.Reference.dereferenceURIandPerformTransforms(Reference.java:612) at org.apache.xml.security.signature.Reference.calculateDigest(Reference.java:689) at org.apache.xml.security.signature.Reference.generateDigestValue(Reference.java:364) at org.apache.xml.security.signature.Manifest.generateDigestValues(Manifest.java:180) at org.apache.xml.security.signature.XMLSignature.sign(XMLSignature.java:492) at com.vivotech.vivogate.webservice.ViVOGatewayViVOGatewaySOAP11PortStub.processRequest(ViVOGatewayViVOGatewaySOAP11PortStub.java:208) at com.vivotech.vivogate.webservice.client.TestClient.main(TestClient.java:47)

    Users with the same issue

    Unknown visitor
    Unknown visitor1 times, last one,