[ 
https://issues.apache.org/jira/browse/CXF-8960?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17788052#comment-17788052
 ] 

Frederik Zimmer commented on CXF-8960:
--------------------------------------

Hi Andriy,

thanks for the fast answer. The intend of this ticket is not to support Moxy. 
But currently there is partial support for Moxy and this partial Moxy support 
with HAS_MOXY detection prevents the use of CXF when Moxy is the default 
provider even though CXF doesn't use the default provider and explicitly uses 
the glassfish implementation. If CXF explicitly uses the glassfish 
implementation why does it then set some Moxy specific properties and thus 
prevents the glassfish implementation to work?

I could understand it if you always use the default provider and say you have 
to set the default provider to the glassfish implementation. But currently you 
explicitly use the glassfish implementation and if Moxy is the default provider 
then you set some Moxy specific properties which break the glassfish 
implementation.

If you currently always use the glassfish implementation shouldn't you never 
set Moxy specific properties? I see it as a bug that some code already tries to 
support Moxy which then breaks other parts of the code as they always use the 
glassfish implementation which will not work when Moxy specific properties are 
set.

> Error property "eclipselink.default-target-namespace" is not supported when 
> eclipselink is on the classpath
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: CXF-8960
>                 URL: https://issues.apache.org/jira/browse/CXF-8960
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 4.0.3
>            Reporter: Frederik Zimmer
>            Priority: Major
>
> When eclipselink is on the classpath before the glassfish JAXB implementation 
> then the eclipse JAXB provider is the default. 
> org.apache.cxf.common.jaxb.JAXBContextCache then detects the eclipse 
> implementation and sets the HAS_MOXY to true which then results in the JAXB 
> property eclipselink.default-target-namespace being set. In 
> org.eclipse.persistence.jaxb.JAXBUtils then a JAXB context is created not by 
> using the default provider but by explicitly using the 
> org.glassfish.jaxb.runtime.v2.ContextFactory . This then complains about the 
> unknown eclipselink property.
> Only by setting the default JAXB provider to be the glassfish implementation 
> by setting the system property 
> jakarta.xml.bind.JAXBContextFactory=org.glassfish.jaxb.runtime.v2.ContextFactory
>  CXF will work in this setting.
> Please make CXF work even if eclipselink is the default JAXB provider by not 
> using eclipselink specific properties when the glassfish JAXB provider is 
> explicitly requested or support eclipselink as a JAXB provider and use the 
> default JAXB provider and don't explicitly request the glassfish 
> implementation.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to