- 
    Type:
Bug
 - 
    Resolution: Fixed
 - 
    Priority:
  P3                     
     - 
    Affects Version/s: 9
 - 
    Component/s: xml
 
- 
        b135
 
                    javax/xml/jaxp/unittest/transform/XSLTFunctionsTest.java failed with the following error if security manager is present:
javax.xml.transform.TransformerConfigurationException: Cannot find external method 'transform.DocumentExtFunc.test' (must be public).
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTemplates(java.xml@9-internal/TransformerFactoryImpl.java:1026)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTransformer(java.xml@9-internal/TransformerFactoryImpl.java:797)
at transform.XSLTFunctionsTest.testDocument(XSLTFunctionsTest.java:70)
 
xlan doesn’t use TCCL if sm is present, and then it can’t load the customized class with bootstrap loader.
The test failed even when enabling feature ENABLE_EXTENSION_FUNCTIONS. It may be related to
the following code in TransformerFactoryImpl.java
if (System.getSecurityManager() != null) {
_isSecureMode = true;
_isNotSecureProcessing = false;
_featureManager.setValue(FeatureManager.Feature.ORACLE_ENABLE_EXTENSION_FUNCTION,
FeaturePropertyBase.State.FSP, XalanConstants.FEATURE_FALSE);
}
            
javax.xml.transform.TransformerConfigurationException: Cannot find external method 'transform.DocumentExtFunc.test' (must be public).
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTemplates(java.xml@9-internal/TransformerFactoryImpl.java:1026)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTransformer(java.xml@9-internal/TransformerFactoryImpl.java:797)
at transform.XSLTFunctionsTest.testDocument(XSLTFunctionsTest.java:70)
xlan doesn’t use TCCL if sm is present, and then it can’t load the customized class with bootstrap loader.
The test failed even when enabling feature ENABLE_EXTENSION_FUNCTIONS. It may be related to
the following code in TransformerFactoryImpl.java
if (System.getSecurityManager() != null) {
_isSecureMode = true;
_isNotSecureProcessing = false;
_featureManager.setValue(FeatureManager.Feature.ORACLE_ENABLE_EXTENSION_FUNCTION,
FeaturePropertyBase.State.FSP, XalanConstants.FEATURE_FALSE);
}