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

jaxp.properties file is all or none

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 1.2.2
    • 1.4.1
    • xml
    • 1.2.2
    • sparc
    • solaris_8

      If a ...jre/lib/jaxp.properties file exists with the following entries:
       #javax.xml.transform.TransformerFactory=org.apache.xalan.xsltc.trax.TransformerFactoryImpl
      #javax.xml.transform.TransformerFactory=org.apache.xalan.processor.TransformerFactoryImpl
      javax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl
      javax.xml.parsers.DocumentBuilderFactory=org.apache.xerces.jaxp.DocumentBuilderFactoryImpl

      transformations fail with an error message indicating an NPE for the
      TranformerFactoryImpl.

        javax.xml.transform.TransformerFactoryConfigurationError: Provider null could
        not be instantiated: java.lang.NullPointerException

      Of course, if I uncomment the first or second line there's no problem.
      The problem has nothing to do with the commented lines. If I delete
      them, the problem still happens. In the same context, if I delete the
      jaxp.properties file all together, there is no problem.

      It seems that if you have a jaxp.properties file, it must define ALL of the jaxp properties. The JAXP spec describes an ordered process for determining what factory implementations to use. For any one property it should go to the next tier if it doesn't find a definition in a higher tier.

            gsharmasunw Gopal Sharma (Inactive)
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: