[
https://issues.apache.org/jira/browse/CXF-8661?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17496388#comment-17496388
]
Andriy Redko commented on CXF-8661:
-----------------------------------
Thanks [[email protected]] ,
> which dependencies are also not given for JDK9+? A list of missing
> dependencies would be great!
The list is pretty much there [1], if you need CORBA (which I doubt), there
would be more to include
> May be the class {{org.apache.cxf.feature.AbstractFeature}} shouldn't belong
> to core this could be a solution too.
I believe the initial idea was to allow reusing same features across JAX-WS and
JAX-RS (I am not the author so could be mistaken), but as you rightly
mentioned, it should have it place where it belongs. This is a breaking change
[2] scheduled for 4.0.0 (not sure about 3.6) to break those.
[~dnl] I think I understand the issue now, are you using Gradle? The Apache
Maven properly makes the right dependency choices since they are driven by
profile:
- project is built using JDK-8 (importing `cxf-core:3.5.0`)
{noformat}
INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ cxf-deps ---
[INFO] com.krankenhouse:cxf-deps:jar:0.0.1-SNAPSHOT
[INFO] \- org.apache.cxf:cxf-core:jar:3.5.0:compile
[INFO] +- org.glassfish.jaxb:jaxb-runtime:jar:2.3.5:compile
[INFO] | +- org.glassfish.jaxb:txw2:jar:2.3.5:compile
[INFO] | +- com.sun.istack:istack-commons-runtime:jar:3.0.12:compile
[INFO] | \- com.sun.activation:jakarta.activation:jar:1.2.2:runtime
[INFO] +- com.fasterxml.woodstox:woodstox-core:jar:6.2.7:compile
[INFO] | \- org.codehaus.woodstox:stax2-api:jar:4.2.1:compile
[INFO] +- org.apache.ws.xmlschema:xmlschema-core:jar:2.3.0:compile
[INFO] \- jakarta.xml.bind:jakarta.xml.bind-api:jar:2.3.3:compile
[INFO] \- jakarta.activation:jakarta.activation-api:jar:1.2.2:compile
[INFO] ------------------------------------------------------------------------
{noformat}
- project is built using JDK-11 (importing `cxf-core:3.5.0`)
{noformat}
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ cxf-deps ---
[INFO] com.krankenhouse:cxf-deps:jar:0.0.1-SNAPSHOT
[INFO] \- org.apache.cxf:cxf-core:jar:3.5.0:compile
[INFO] +- org.glassfish.jaxb:jaxb-runtime:jar:2.3.5:compile
[INFO] | +- org.glassfish.jaxb:txw2:jar:2.3.5:compile
[INFO] | \- com.sun.istack:istack-commons-runtime:jar:3.0.12:compile
[INFO] +- com.fasterxml.woodstox:woodstox-core:jar:6.2.7:compile
[INFO] | \- org.codehaus.woodstox:stax2-api:jar:4.2.1:compile
[INFO] +- org.apache.ws.xmlschema:xmlschema-core:jar:2.3.0:compile
[INFO] +- jakarta.xml.bind:jakarta.xml.bind-api:jar:2.3.3:compile
[INFO] | \- jakarta.activation:jakarta.activation-api:jar:1.2.2:compile
[INFO] +- jakarta.annotation:jakarta.annotation-api:jar:1.3.5:compile
[INFO] +- jakarta.xml.ws:jakarta.xml.ws-api:jar:2.3.3:compile
[INFO] +- jakarta.jws:jakarta.jws-api:jar:2.1.0:compile
[INFO] +- jakarta.xml.soap:jakarta.xml.soap-api:jar:1.4.2:compile
[INFO] +- com.sun.activation:jakarta.activation:jar:1.2.2:compile
[INFO] +- com.sun.xml.messaging.saaj:saaj-impl:jar:1.5.3:runtime
[INFO] | \- org.jvnet.staxex:stax-ex:jar:1.8.3:runtime
[INFO] \- org.apache.geronimo.specs:geronimo-jta_1.1_spec:jar:1.1.1:compile
{noformat}
Gradle is oblivious to Apache Maven profiles [3] with respect to JDK
conditions, project is built using JDK-8/11 (importing `cxf-core:3.5.0` as
implementation), no differences:
{noformat}
compileClasspath - Compile classpath for source set 'main'.
\--- org.apache.cxf:cxf-core:3.5.0
+--- org.glassfish.jaxb:jaxb-runtime:2.3.5
| +--- jakarta.xml.bind:jakarta.xml.bind-api:2.3.3
| | \--- jakarta.activation:jakarta.activation-api:1.2.2
| +--- org.glassfish.jaxb:txw2:2.3.5
| \--- com.sun.istack:istack-commons-runtime:3.0.12
+--- com.fasterxml.woodstox:woodstox-core:6.2.7
| \--- org.codehaus.woodstox:stax2-api:4.2.1
+--- org.apache.ws.xmlschema:xmlschema-core:2.3.0
\--- jakarta.xml.bind:jakarta.xml.bind-api:2.3.3 (*){noformat}
Is that the case?
[1] https://github.com/apache/cxf/blob/master/parent/pom.xml#L2227
[2] https://issues.apache.org/jira/browse/CXF-8147
[3] https://blog.gradle.org/maven-pom-profiles
> JAX WS Compile Dependency missing
> ---------------------------------
>
> Key: CXF-8661
> URL: https://issues.apache.org/jira/browse/CXF-8661
> Project: CXF
> Issue Type: Bug
> Components: Core
> Affects Versions: 3.5.0, 3.4.5
> Environment: * CXF Core 3.4.5
> * Tomcat 9.0.45
> * Oracle JDK 11.0.13
> * Spring 5.2.15.RELEASE
> Reporter: Daniel Meier
> Priority: Major
>
> The {{org.apache.cxf.feature.AbstractFeature}} class in CXF Core extends the
> {{WebServiceFeature}} of the JAX WS API. The CXF Core Artifact does not
> declare it as a Compile Dependency though (see [Maven
> Central|https://mvnrepository.com/artifact/org.apache.cxf/cxf-core/3.5.0]).
> This leads to a {{NoClassDefFoundError}} in a Spring Application using XML
> Configuration in a Java 11 environment, since the
> {{org.apache.cxf.bus.spring.NamespaceHandler}} imports
> {{org.apache.cxf.feature.LoggingFeature}}, an {{AbstractFeature}}
> implementation.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)