XML signatur applet - Exception: Cannot find DOM mechanism type
Jeg er igang med at lave en applet hvor det skal være muligt at signere en fil med en xml signatur. Jeg har dog nogle problemer med at få den til at virke.Når jeg forsøger at lave en ínstans af XMLSignatureFactory med
XMLSignatureFactory fac = XMLSignatureFactory.getInstance("DOM");
får jeg den nedenstående fejl. Jeg har ingen problemer i mit test program. Fejlen opstår kun i applet implementeringen.
Er der nogen der har en idé om hvad det skyldes?
Stack trace af fejlen:
javax.xml.crypto.NoSuchMechanismException: Cannot find DOM mechanism type
at javax.xml.crypto.dsig.XMLSignatureFactory.findInstance(XMLSignatureFactory.java:190)
at javax.xml.crypto.dsig.XMLSignatureFactory.getInstance(XMLSignatureFactory.java:171)
at DigitalSignerApplet.signDocument2(DigitalSignerApplet.java:368)
at DigitalSignerApplet.signFile(DigitalSignerApplet.java:263)
at DigitalSignerApplet.signSelectedFile(DigitalSignerApplet.java:136)
at DigitalSignerApplet.access$000(DigitalSignerApplet.java:82)
at DigitalSignerApplet$1.actionPerformed(DigitalSignerApplet.java:109)
at java.awt.Button.processActionEvent(Unknown Source)
at java.awt.Button.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at javax.xml.crypto.dsig.XMLSignatureFactory.findInstance(XMLSignatureFactory.java:184)
... 16 more
Caused by: javax.xml.crypto.dsig.XMLSignatureException: Mechanism type DOM not available
at javax.xml.crypto.dsig.XMLDSigSecurity.getEngineClassName(XMLDSigSecurity.java:70)
at javax.xml.crypto.dsig.XMLDSigSecurity.getImpl(XMLDSigSecurity.java:130)
... 21 more