DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2006
    Posts
    11

    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.....

  2. #2
    Join Date
    Dec 2005
    Posts
    19
    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

  3. #3
    Join Date
    Jul 2006
    Posts
    11
    ya, it is working now..Thanx for help......

  4. #4
    Join Date
    Jul 2006
    Posts
    11

    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

  1. ASP.NET problem with XML file
    By rgcr in forum ASP.NET
    Replies: 14
    Last Post: 10-20-2005, 07:11 PM
  2. wav file fade in out help
    By jase_dukerider in forum C++
    Replies: 2
    Last Post: 04-14-2005, 07:48 PM
  3. Help on Formating XML file ??
    By serge calderara in forum .NET
    Replies: 3
    Last Post: 04-12-2005, 01:10 PM
  4. Replies: 0
    Last Post: 09-02-2002, 06:11 AM
  5. How do i search within a xml file?
    By Kelvin Teh in forum XML
    Replies: 3
    Last Post: 02-16-2001, 10:09 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


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


Sponsored Links