Last Ant Test Failure with JDK9 - JAXP Secure Processing and XSLT Extensions

Joe Wang huizhe.wang at oracle.com
Thu Sep 8 20:26:05 UTC 2016


Hi Stefan,

It's great to know you've found the solution! Hopefully this is indeed 
the last issue for you with JDK 9 :-)

I've checked in a fix for the redirect failure [1] into the dev repo. It 
would probably be included in the next week's build (b136). Please let 
me know if this doesn't work.


[1] https://bugs.openjdk.java.net/browse/JDK-8165116

Best,
Joe

On 9/1/16, 7:37 AM, Stefan Bodewig wrote:
> On 2016-08-31, Joe Wang wrote:
>
>> On 8/30/16, 9:34 AM, Stefan Bodewig wrote:
>>> On 2016-08-29, Joe Wang wrote:
>>>> If you are using the built-in extension functions, try turning on the
>>>> following feature:
>>>>       private static final String ENABLE_EXTENSION_FUNCTIONS =
>>>> "http://www.oracle.com/xml/jaxp/properties/enableExtensionFunctions";
>>>>       tf.setFeature(ENABLE_EXTENSION_FUNCTIONS, true);
>>> This is not supported by Xalan's TransformerFactoryImpl:
>> True, this is an impl-only feature. But Xalan doesn't need it anyways,
>> you may check the factory instance and skip it if it's Xalan.
> Thanks, you're comment made me take a third look at the test-case in
> question. I was confused by the setup and overlooked that we explicitly
> forced the use of the JDK's factory for just a single test.
>
> By selectively setting both features I can get the test to pass and am
> able to use the redirect extension of a version of Xalan on the
> classloader I specify.
>
> I'll need to add suppport for setting features on the TransformerFactory
> to Ant's<xslt>  task as I'd prefer to not hard-code the features into
> the task - and enable it for<junitreport>  be default.
>
>>> When removing Xalan from the classpath and using the JDK's own
>>> TransformerFactory I get
>>> ,----
>>> | Error! Use of the extension element 'redirect' is not allowed when the
>>> | secure processing feature is set to true.
>>> `----
>>> even with the feature enabled. So "redirect" -
>>> i.e. xmlns:redirect="http://xml.apache.org/xalan/redirect" - which I
>>> assumed to be "built-in" for the JDK's fork of Xalan as well - doesn't
>>> seem to get through with just that.
>> I'll get this fixed in the next 1 or 2
>> build. (https://bugs.openjdk.java.net/browse/JDK-8165116)
> This is great and will simplify things a lot.
>
> Many thanks
>
>       Stefan


More information about the core-libs-dev mailing list