Uploaded image for project: 'Axiom'
  1. Axiom
  2. AXIOM-238

NPE will result in Axiom code if MD5 algorithm is not in classpath

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.2.8
    • None
    • None

    Description

      org.apache.axiom.om.util.UUIDGenerator.getInitialUUID at line 72, result could be null, resulting in NullPointerException at line 77 (SVN rev 670666):

      try

      { md5 = MessageDigest.getInstance("MD5"); // LINE 72 }

      catch (NoSuchAlgorithmException e)

      { //System.out.println("Error: " + e); //todo heve to be properly handle }

      md5.update(sb.toString().getBytes()); // NPE HERE AT LINE 77

      The MD5 algorithm should be in the ext dir of the JVM, and the only way I know that it would be missing from the classpath is if the jar containing the algorithm was removed, it was mis-configured in the java.security file, or someone passed the -Djava.ext.dirs flag, effectively REPLACING the ext classpath.

      At a minimum, the catch block should report the error.

      I'll fix this to report the error and warn of the NPE. Contribute ideas if you have some. Thanks..

      Attachments

        Activity

          People

            veithen Andreas Veithen
            rott Michael Rheinheimer
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: