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

A validation of a SAXSource always fails if SecurityManager is set

XMLWordPrintable

    • b76
    • 7
    • 1.4
    • generic
    • generic
    • Verified

        JCK: JCK-runtime-7 b28 - ...
        JDK: 7 b76 - ...
        Platform[s]: FAIL - All

        Attached you will find the code that has been failing since build 76 of JDK7.

        ---- File Invoker.java is main class for testing purposes ---
        ....
        public class Invoker extends TestsContainer {

          static final Class<?>[] testArgTypes = {};
          
          public static void main(String[] args) {
            Invoker i = new Invoker();
        //line1: NewJavaTestSecurityManager.install();
        //line2: System.setSecurityManager(new DummySM());
            i.runAll();
          }
        ....
        -----------------------------------------------------------------------
        Setting any SecurityManager (line1 or line2) leads to the validation failure if this code started under JDK7 b76 and above.
        ............
        Caused by: javax.xml.parsers.FactoryConfigurationError: java.lang.ClassCastException: com.sun.org.apache.xerces.internal.util.SecurityManager cannot be cast to java.lang.SecurityManager
                at com.sun.org.apache.xerces.internal.jaxp.validation.ValidatorHandlerImpl.validate(ValidatorHandlerImpl.java:689)
                at com.sun.org.apache.xerces.internal.jaxp.validation.ValidatorImpl.validate(ValidatorImpl.java:102)
                at TestsContainer.Validate005(TestsContainer.java:58)
        ............

        This regression causes the failure of the following 21 JCK runtime tests:

        api/javax_xml/bind/JAXBContext/java2schema/DefaultMapping/index.html#DefaultMappingTest[java$util$MapTest]
        api/javax_xml/bind/JAXBContext/java2schema/DefaultMapping/index.html#DefaultMappingTest[java$util$concurrent$ConcurrentMapTest]
        api/javax_xml/bind/JAXBContext/java2schema/DefaultMapping/index.html#DefaultMappingTest[java$util$SortedMapTest]
        api/javax_xml/bind/JAXBContext/java2schema/DefaultMapping/index.html#DefaultMappingTest[java$util$AbstractMapTest]
        api/javax_xml/bind/JAXBContext/java2schema/DefaultMapping/index.html#DefaultMappingTest[java$util$jar$AttributesTest]
        api/javax_xml/bind/JAXBContext/java2schema/DefaultMapping/index.html#DefaultMappingTest[java$security$AuthProviderTest]
        api/javax_xml/bind/JAXBContext/java2schema/DefaultMapping/index.html#DefaultMappingTest[java$util$concurrent$ConcurrentHashMapTest]
        api/javax_xml/bind/JAXBContext/java2schema/DefaultMapping/index.html#DefaultMappingTest[java$util$HashMapTest]
        api/javax_xml/bind/JAXBContext/java2schema/DefaultMapping/index.html#DefaultMappingTest[java$util$HashtableTest]
        api/javax_xml/bind/JAXBContext/java2schema/DefaultMapping/index.html#DefaultMappingTest[java$util$IdentityHashMapTest]
        api/javax_xml/bind/JAXBContext/java2schema/DefaultMapping/index.html#DefaultMappingTest[java$util$LinkedHashMapTest]
        api/javax_xml/bind/JAXBContext/java2schema/DefaultMapping/index.html#DefaultMappingTest[java$util$PropertiesTest]
        api/javax_xml/bind/JAXBContext/java2schema/DefaultMapping/index.html#DefaultMappingTest[java$security$ProviderTest]
        api/javax_xml/bind/JAXBContext/java2schema/DefaultMapping/index.html#DefaultMappingTest[java$awt$RenderingHintsTest]
        api/javax_xml/bind/JAXBContext/java2schema/DefaultMapping/index.html#DefaultMappingTest[javax$management$openmbean$TabularDataSupportTest]
        api/javax_xml/bind/JAXBContext/java2schema/DefaultMapping/index.html#DefaultMappingTest[java$util$TreeMapTest]
        api/javax_xml/bind/JAXBContext/java2schema/DefaultMapping/index.html#DefaultMappingTest[javax$swing$UIDefaultsTest]
        api/javax_xml/bind/JAXBContext/java2schema/DefaultMapping/index.html#DefaultMappingTest[java$util$WeakHashMapTest]
        api/javax_xml/validation/Validator/index.html#Validate[Validate005]
        api/javax_xml/validation/Validator/index.html#Validate[Validate007]
        api/javax_xml/validation/Validator/index.html#Validate[Validate018]

              joehw Joe Wang
              lkuskov Leonid Kuskov
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: