DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Hybrid View

  1. #1
    Join Date
    Jul 2006

    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:

    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
    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
    ya, it is working now..Thanx for help......

  4. #4
    Join Date
    Jul 2006

    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 =
    Key keyEncryptKey = loadKeyEncryptionKey();

    XMLCipher xmlCipher = XMLCipher.getInstance();

    xmlCipher.init(XMLCipher.DECRYPT_MODE, null);


    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

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
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.