On 2017-08-09, Sarika Sinha wrote:
> Eclipse is having issues using Ant 1.10.1 with Java 9
> Bug 520437 -  Running Releng script with JRE 9 fails
> We see that the Java 9
> com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl class having
> method private void transform(Source source, SerializationHandler handler,
> String encoding) throws TransformerException
> has changed from Java 8 and Xalan 2.7.2 and gives error in the presence
> of Security Manager.
> Have created a bug with Ant Bugzilla.
> Bug 61389 - Loading Stylesheet - 'xalan://java.lang.String:replaceAll' is
> not allowed when the secure processing feature is set to true
I'll add the same question I'm going to ask here to
https://bz.apache.org/bugzilla/show_bug.cgi?id=61389 as well. What you
see is very similar to something Ant encountered with its own unit tests
and we managed to deal with it with the help of the JAXP team. As far as
I can tell what we recommend in the xslt task's manual page still works
with the latest JDK9 build we've used on Jenkins (not the RC quite yet).
| Note on XSLT extension functions: when using the default TraX
| implementation of the Java class library and a SecurityManager is active
| - e.g. when running from within an IDE - XSLT extension functions cannot
| be used as "secure processing" is active in Java 7 and above. Ant
| contains a special "hack" that allows XSLT extensions to be used in Java
| 7 and 8, but this hack fails for Java 9. If you want to use extensions
| like the redirect extension that are provided by the Java class library
| itself, you can allow them by enabling the feature
| http://www.oracle.com/xml/jaxp/properties/enableExtensionFunctions in
| Java 9 and above. If you need to use an extension function not provided
| by Java itself you can set the attribute
| jdk.xml.transform.extensionClassLoader to a classloader (reference to an
| Ant PATH-like structure).
So you should be able to make the build work by setting
true. That should be enough for String:replaceAll. Have you tried that?
To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org
For additional commands, e-mail: dev-h...@ant.apache.org