[
https://issues.apache.org/jira/browse/CXF-8661?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17494972#comment-17494972
]
Daniel Meier edited comment on CXF-8661 at 2/19/22, 1:28 PM:
-------------------------------------------------------------
Hi [~reta],
I tried to fix the problem by moving the the Jakarta Dependencies from the
{{java9-plus}} profile in the parent POM to the cxf-core POM. While analyzing
the imports in the cxf-core Java Sourcefiles I noticed problems with the
following dependencies:
* {{jakarta.xml.ws:jakarta.xml.ws-api:}}
** the main concern, cause it leads to a {{NoClassDefFoundError}} when loading
the {{AbstractFeature}} class in a Java 9+ Environment
* {{jakarta.annotation:jakarta.annotation-api}}
** only required for the {{PostConstruct}}, {{PreDestroy}} and {{Resource}}
Annotations. Not a huge problem during class loading when these classes are not
found, but would not hurt I think.
*
{{com.sun.activation:jakarta.activation:1.2.2}}/{{jakarta.activation:jakarta.activation-api:1.2.2}}
** brought in transitively by the Glassfish Jakarta XML Bind Implementation and
the Jakarta XML Bind API. An explicit dependency would be benificial though,
because cxf-core contains {{javax.activation.DataSource}} Implementations
The problems might also exist in other CXF modules. I only looked at CXF Core
for now.
was (Author: dnl):
Hi [~reta],
I tried to fix the problem by moving the the Jakarta Dependencies from the
{{java9-plus}} profile in the parent POM to the cxf-core POM. While analyzing
the imports in the cxf-core Java Sourcefiles I noticed problems with the
following dependencies:
* {{jakarta.xml.ws:jakarta.xml.ws-api:}}
** the main concern, cause it leads to a {{NoClassDefFoundError}} when loading
the {{AbstractFeature}} class in a Java 9+ Environment
* {{jakarta.annotation:jakarta.annotation-api}}
** only required for the {{PostConstruct}}, {{PreDestroy}} and {{Resource}}
Annotations. Not a huge problem during class loading when these classes are not
found, but would not hurt I think.
*
{{com.sun.activation:jakarta.activation:1.2.2}}/{{jakarta.activation:jakarta.activation-api:1.2.2}}
** brought in transitively by the Glassfish Jakarta XML Bind Implementation and
the Jakarta XML Bind API. An explicit dependency would be benificial though,
because cxf-core contains {{java.activation.DataSource}} Implementations
The problems might also exist in other CXF modules. I only looked at CXF Core
for now.
> 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)