-
Error while encrypting the xml file...pls help
i download the code for encryption of xml file..
but i am getting following error..
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
at org.apache.xml.security.Init.<clinit>(Unknown Source)
at EncryptTool.<clinit>(EncryptTool.java:51)
so, what is that? pls help me..
there is a code for xml encryption:
http://www.devx.com/xml/Article/28701/0/page/6
but, when i execute that i got error.....
so, pls anyone can tell me all the procedures to execute that program..
which jar files need to be download....
pls help me.....
-
for the exception you got, you need to download commons-logging.jar from apache, then add it to your classpath.
if that doesn't work, maybe this will help: http://www.devx.com/xml/Article/28701/0/page/3
-
ya, it is working now..Thanx for help......
-
Error during decryption of xml file
when i am decryption file, it is giving me exception :
Exception in thread "main" java.lang.IllegalArgumentException: No attributes are implemented
at org.apache.crimson.jaxp.DocumentBuilderFactoryImpl.setAttribute(Unknown Source)
at org.apache.xml.security.encryption.XMLCipher$Serializer.deserialize(Unknown Source)
at org.apache.xml.security.encryption.XMLCipher.decryptElement(Unknown Source)
at org.apache.xml.security.encryption.XMLCipher.doFinal(Unknown Source)
at DecryptTool.main(DecryptTool.java:151)
and code is :
Document document = loadEncryptedFile(args[0]);
String namespaceURI = EncryptionConstants.EncryptionSpecNS;
String localName = EncryptionConstants._TAG_ENCRYPTEDDATA;
Element encryptedDataElement =
(Element)document.getElementsByTagNameNS(namespaceURI,
localName).item(0);
Key keyEncryptKey = loadKeyEncryptionKey();
XMLCipher xmlCipher = XMLCipher.getInstance();
xmlCipher.init(XMLCipher.DECRYPT_MODE, null);
xmlCipher.setKEK(keyEncryptKey);
xmlCipher.doFinal(document, encryptedDataElement);
so, what is that ?
pls , help me.......
Similar Threads
-
Replies: 14
Last Post: 10-20-2005, 07:11 PM
-
By jase_dukerider in forum C++
Replies: 2
Last Post: 04-14-2005, 07:48 PM
-
By serge calderara in forum .NET
Replies: 3
Last Post: 04-12-2005, 01:10 PM
-
Replies: 0
Last Post: 09-02-2002, 06:11 AM
-
By Kelvin Teh in forum XML
Replies: 3
Last Post: 02-16-2001, 10:09 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks