Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6368426

SchemaFactory.newInstance should report more developer-friendly message

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 6
    • 5.0
    • xml

      When a proper SchemaFactory implementation was not found, SchemaFactory should report something like
      "Unable to find an implementation for <URI>" not just the current

                  throw new IllegalArgumentException(schemaLanguage);

      (Line 186, SchemaFactory.java)

      One of our users reported the problem below:
      ---------------------
      SchemaFactory.newInstance(String) throws exception. Any ideas?


      [java] java.lang.IllegalArgumentException: http://www.w3.org/2001/XMLSchema
      [java] at javax.xml.validation.SchemaFactory.newInstance(SchemaFactory.java:186)
      [java] at org.project.Test.<init>(Test.java:22)
      [java] at org.project.Test.main(Test.java:56)
      ---------------------

      Correcting the message as suggested above should make it easier for him to track down problem.

            jsuttorsunw Jeff Suttor (Inactive)
            kkawagucsunw Kohsuke Kawaguchi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: