[
https://issues.apache.org/jira/browse/ARTEMIS-3903?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17570834#comment-17570834
]
Robbie Gemmell edited comment on ARTEMIS-3903 at 7/25/22 1:58 PM:
------------------------------------------------------------------
That test doesnt seem to actually be using xalan. For the integration-tests
module xalan isnt even shown as being on the classpath (the other areas its
still present were as optional deps, and so that means it doesnt get passed on
as an actual dep for any users).
The integration-tests module depends the 5.x activemq-broker in order to get a
filter class from it that the 5.x activemq-client module requires when doing
xpath, and though that class has Xalan in the class name, the class itself
doesnt seem to reference xalan directly, only JAXP factories, and it is
identical (besides name) to another filter class the 5.x broker has that only
has JAXP in the name, JAXPXPathEvaluator.
Running the JMSXPathSelectorTest test with the JAXP debug logging on
(-Djaxp.debug=1) seems to show its only using the JDKs built in impls:
{noformat}
JAXP: find factoryId =javax.xml.parsers.DocumentBuilderFactory
JAXP: loaded from fallback value:
com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl
JAXP: created new instance of class
com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl using
ClassLoader: null
JAXP: using thread context class loader
(jdk.internal.loader.ClassLoaders$AppClassLoader@5bc2b487) for search
JAXP: Looking up system property
'javax.xml.xpath.XPathFactory:http://java.sun.com/jaxp/xpath/dom'
JAXP: The property is undefined.
JAXP: found null in $java.home/conf/jaxp.properties
JAXP: attempting to use the platform default W3C DOM XPath lib
JAXP: factory 'com.sun.org.apache.xpath.internal.jaxp.XPathFactoryImpl' was
found for http://java.sun.com/jaxp/xpath/dom
JAXP: find factoryId =javax.xml.parsers.DocumentBuilderFactory
JAXP: loaded from fallback value:
com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl
JAXP: created new instance of class
com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl using
ClassLoader: null
JAXP: using thread context class loader
(jdk.internal.loader.ClassLoaders$AppClassLoader@5bc2b487) for search
JAXP: Looking up system property
'javax.xml.xpath.XPathFactory:http://java.sun.com/jaxp/xpath/dom'
JAXP: The property is undefined.
JAXP: found null in $java.home/conf/jaxp.properties
JAXP: attempting to use the platform default W3C DOM XPath lib
JAXP: factory 'com.sun.org.apache.xpath.internal.jaxp.XPathFactoryImpl' was
found for http://java.sun.com/jaxp/xpath/dom
{noformat}
was (Author: gemmellr):
That test doesnt seem to actually be using xalan. For the integration-tests
module xalan isnt even shown as being on the classpath (the other areas its
still present were as optional deps, and so that means it doesnt get passed on
as an actual dep for any users).
The integration-tests module depends the 5.x activemq-broker in order to get a
filter class from it that the 5.x activemq-client module requires when doing
xpath, and though that class has Xalan in the class name, the class itself
doesnt seem to reference xalan directly, only JAXP factories, and it is
identical (besides name) to another filter class the 5.x broker has that only
has JAXP in the name.
Running the JMSXPathSelectorTest test with the JAXP debug logging on
(-Djaxp.debug=1) seems to show its only using the JDKs built in impls:
{noformat}
JAXP: find factoryId =javax.xml.parsers.DocumentBuilderFactory
JAXP: loaded from fallback value:
com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl
JAXP: created new instance of class
com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl using
ClassLoader: null
JAXP: using thread context class loader
(jdk.internal.loader.ClassLoaders$AppClassLoader@5bc2b487) for search
JAXP: Looking up system property
'javax.xml.xpath.XPathFactory:http://java.sun.com/jaxp/xpath/dom'
JAXP: The property is undefined.
JAXP: found null in $java.home/conf/jaxp.properties
JAXP: attempting to use the platform default W3C DOM XPath lib
JAXP: factory 'com.sun.org.apache.xpath.internal.jaxp.XPathFactoryImpl' was
found for http://java.sun.com/jaxp/xpath/dom
JAXP: find factoryId =javax.xml.parsers.DocumentBuilderFactory
JAXP: loaded from fallback value:
com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl
JAXP: created new instance of class
com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl using
ClassLoader: null
JAXP: using thread context class loader
(jdk.internal.loader.ClassLoaders$AppClassLoader@5bc2b487) for search
JAXP: Looking up system property
'javax.xml.xpath.XPathFactory:http://java.sun.com/jaxp/xpath/dom'
JAXP: The property is undefined.
JAXP: found null in $java.home/conf/jaxp.properties
JAXP: attempting to use the platform default W3C DOM XPath lib
JAXP: factory 'com.sun.org.apache.xpath.internal.jaxp.XPathFactoryImpl' was
found for http://java.sun.com/jaxp/xpath/dom
{noformat}
> Remove Xalan already optional dependency
> ----------------------------------------
>
> Key: ARTEMIS-3903
> URL: https://issues.apache.org/jira/browse/ARTEMIS-3903
> Project: ActiveMQ Artemis
> Issue Type: Task
> Affects Versions: 2.24.0
> Reporter: Clebert Suconic
> Priority: Major
> Time Spent: 10m
> Remaining Estimate: 0h
>
> We have already removed Xalan usage from the codebase since
> https://github.com/apache/activemq-artemis/commit/eb26f67ab6913a490f92c426efa76e35252dceb1
> However there are still a few optional dependencies that should be removed.
> There's only one test dependency needed for one specific openWire old version
> test that would stay for now. (The test is validating a server's XPath
> operation but using an older openwire client. The test dependency will stay
> but we should not have any other dependency).
> The test in question is:
> org.apache.activemq.artemis.tests.integration.amqp.JMSXPathSelectorTest#testJMSSelectorsAMQPProducerOpenWireConsumer
--
This message was sent by Atlassian Jira
(v8.20.10#820010)