[jira] [Created] (CXF-8836) Jaxb Integration with EclipseLink has Error

2023-04-17 Thread Andreas Rusjaev (Jira)
Andreas Rusjaev created CXF-8836:


 Summary: Jaxb Integration with EclipseLink has Error
 Key: CXF-8836
 URL: https://issues.apache.org/jira/browse/CXF-8836
 Project: CXF
  Issue Type: Bug
  Components: Core
Affects Versions: 4.0.0
Reporter: Andreas Rusjaev


Dear CXF developers,
I am using version 4.0.0 of CXF cxf-spring-boot-starter-jaxws.
My CXF jaxws services are wrapped in Spring Boot 3.0. I also use 
akarta.xml.bind-api 4.0.0 and org.eclipse.persistence.moxy 4.0.1.
I generate Java models with cxf-codegen-plugin with the following configuration:


    org.apache.cxf
    cxf-codegen-plugin
    ${cxf.version}
    
        
            org.jvnet.jaxb2_commons
            jaxb2-basics-annotate
            1.1.0
        
        
            org.apache.cxf.xjc-utils
            cxf-xjc-runtime
            ${cxf.version}
        
        
            org.apache.cxf.xjcplugins
            cxf-xjc-ts
            ${cxf.version}
        
        
            javax.xml.bind
            jaxb-api
            2.4.0-b180830.0359
        
    
    
        
            generate-sources
            generate-sources
            
                
${project.build.directory}/generated-sources/cxf
                
                    true
                    
3105839350746982386
                    
                        -xjc-Xannotate
                    
                
                
                    
                        
${basedir}/src/main/resources/wsdl/myservice.wsdl
                        
classpath:wsdl/myservice.wsdl
                        myservice
                        
                            
${basedir}/src/main/resources/wsdl/bindings.xjb
                        
                    
                
            
            
                wsdl2java
            
        
    


Binding file has the following configuration:

https://jakarta.ee/xml/ns/jaxb";
               jaxb:extensionBindingPrefixes="annox xjc"
               xmlns:xs="http://www.w3.org/2001/XMLSchema";
               xmlns:annox="http://annox.dev.java.net";
               xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc";>

    
        
            
            

        
    

    
        
            
@lombok.experimental.SuperBuilder
            
@jakarta.xml.bind.annotation.XmlRootElement
            @lombok.NoArgsConstructor
        
        
            
                
@org.eclipse.persistence.oxm.annotations.XmlNullPolicy(nullRepresentationForXml=
                XmlMarshalNullRepresentation.ABSENT_NODE, 
xsiNilRepresentsNull=false)
            
        
    


Model class generation works fine, nullable properties are marked with 
annotation:

"@XmlNullPolicy(nullRepresentationForXml = 
XmlMarshalNullRepresentation.ABSENT_NODE, xsiNilRepresentsNull = false)".
To start Moxy Runtime use the following settings in main method of Application:

 System.setProperty("jakarta.xml.bind.JAXBContextFactory", 
"org.eclipse.persistence.jaxb.JAXBContextFactory");
 
I use this initialisation because I still need to use Spring Web Service Client 
from Spring WS in parallel.
 
But on startup I get errors:

Caused by: java.lang.reflect.InvocationTargetException: null
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native 
Method) ~[na:na]
    at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
 ~[na:na]
    at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 ~[na:na]
    at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
    at org.apache.cxf.common.jaxb.JAXBUtils$3.run(JAXBUtils.java:1189) 
~[cxf-core-4.0.0.jar:4.0.0]
    at org.apache.cxf.common.jaxb.JAXBUtils$3.run(JAXBUtils.java:1183) 
~[cxf-core-4.0.0.jar:4.0.0]
    at 
java.base/java.security.AccessController.doPrivileged(AccessController.java:569)
 ~[na:na]
    at org.apache.cxf.common.jaxb.JAXBUtils.createContext(JAXBUtils.java:1183) 
~[cxf-core-4.0.0.jar:4.0.0]
    ... 64 common frames omitted
Caused by: jakarta.xml.bind.JAXBException: Property 
"eclipselink.default-target-namespace" is not supported.
    at 
org.glassfish.jaxb.runtime.v2.ContextFactory.createContext(ContextFactory.java:126)
 ~[jaxb-runtime-4.0.1.jar:4.0.1 - a95cb76]
    
I have examined your code and found that you are using hard coded call to 
"Class factoryClass = 
ClassLoaderUtils.loadClass("org.glassfish.jaxb.runtime.v2.ContextFactory" in 
cxf-core org.apache.cxf.common.jaxb.JAXBUtils

I have experimented a bit and if you can make a few changes in two classes 
everything will work. The classes need to be changed:

1. org.apache.cxf.common.jaxb.JAXBContextCache Method 
getCachedContextAndSchemas in lines 197 to 194 

    old code

        if (defaultNs != null) {
            if (HAS_MOXY) {
                map.put("eclipselink.

[jira] [Updated] (CXF-8836) Jaxb Integration with EclipseLink has Error

2023-04-17 Thread Andreas Rusjaev (Jira)


 [ 
https://issues.apache.org/jira/browse/CXF-8836?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andreas Rusjaev updated CXF-8836:
-
Description: 
Dear CXF developers,
I am using version 4.0.0 of CXF cxf-spring-boot-starter-jaxws.
My CXF jaxws services are wrapped in Spring Boot 3.0. I also use 
akarta.xml.bind-api 4.0.0 and org.eclipse.persistence.moxy 4.0.1.
I generate Java models with cxf-codegen-plugin with the following configuration:

 
{code:java}

    org.apache.cxf
    cxf-codegen-plugin
    ${cxf.version}
    
        
            org.jvnet.jaxb2_commons
            jaxb2-basics-annotate
            1.1.0
        
        
            org.apache.cxf.xjc-utils
            cxf-xjc-runtime
            ${cxf.version}
        
        
            org.apache.cxf.xjcplugins
            cxf-xjc-ts
            ${cxf.version}
        
        
            javax.xml.bind
            jaxb-api
            2.4.0-b180830.0359
        
    
    
        
            generate-sources
            generate-sources
            
                
${project.build.directory}/generated-sources/cxf
                
                    true
                    
3105839350746982386
                    
                        -xjc-Xannotate
                    
                
                
                    
                        
${basedir}/src/main/resources/wsdl/myservice.wsdl
                        
classpath:wsdl/myservice.wsdl
                        myservice
                        
                            
${basedir}/src/main/resources/wsdl/bindings.xjb
                        
                    
                
            
            
                wsdl2java
            
        
    
{code}
 

Binding file has the following configuration:
{code:java}

https://jakarta.ee/xml/ns/jaxb";
               jaxb:extensionBindingPrefixes="annox xjc"
               xmlns:xs="http://www.w3.org/2001/XMLSchema";
               xmlns:annox="http://annox.dev.java.net";
               xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc";>
    
        
            
            
        
    
    
        
            
@lombok.experimental.SuperBuilder
            
@jakarta.xml.bind.annotation.XmlRootElement
            @lombok.NoArgsConstructor
        
        
            
                
@org.eclipse.persistence.oxm.annotations.XmlNullPolicy(nullRepresentationForXml=
                XmlMarshalNullRepresentation.ABSENT_NODE, 
xsiNilRepresentsNull=false)
            
        
    

{code}
 

Model class generation works fine, nullable properties are marked with 
annotation:

"@XmlNullPolicy(nullRepresentationForXml = 
XmlMarshalNullRepresentation.ABSENT_NODE, xsiNilRepresentsNull = false)".
To start Moxy Runtime use the following settings in main method of Application:

 System.setProperty("jakarta.xml.bind.JAXBContextFactory", 
"org.eclipse.persistence.jaxb.JAXBContextFactory");
 
I use this initialisation because I still need to use Spring Web Service Client 
from Spring WS in parallel.
 
But on startup I get errors:

Caused by: java.lang.reflect.InvocationTargetException: null
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native 
Method) ~[na:na]
    at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
 ~[na:na]
    at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 ~[na:na]
    at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
    at org.apache.cxf.common.jaxb.JAXBUtils$3.run(JAXBUtils.java:1189) 
~[cxf-core-4.0.0.jar:4.0.0]
    at org.apache.cxf.common.jaxb.JAXBUtils$3.run(JAXBUtils.java:1183) 
~[cxf-core-4.0.0.jar:4.0.0]
    at 
java.base/java.security.AccessController.doPrivileged(AccessController.java:569)
 ~[na:na]
    at org.apache.cxf.common.jaxb.JAXBUtils.createContext(JAXBUtils.java:1183) 
~[cxf-core-4.0.0.jar:4.0.0]
    ... 64 common frames omitted
Caused by: jakarta.xml.bind.JAXBException: Property 
"eclipselink.default-target-namespace" is not supported.
    at 
org.glassfish.jaxb.runtime.v2.ContextFactory.createContext(ContextFactory.java:126)
 ~[jaxb-runtime-4.0.1.jar:4.0.1 - a95cb76]
    
I have examined your code and found that you are using hard coded call to 
"Class factoryClass = 
ClassLoaderUtils.loadClass("org.glassfish.jaxb.runtime.v2.ContextFactory" in 
cxf-core org.apache.cxf.common.jaxb.JAXBUtils

I have experimented a bit and if you can make a few changes in two classes 
everything will work. The classes need to be changed:

1. org.apache.cxf.common.jaxb.JAXBContextCache Method 
getCachedContextAndSchemas in lines 197 to 194 

    old code

 
{code:java}
        if (defaultNs != null) {
            if (HAS_MOXY)
{                 map.put("eclipselink.default-target-namespace", defaultNs);   
          }
            map.put("org.glassfish.jaxb.defaultNamespaceRemap", 

[jira] [Updated] (CXF-8836) Jaxb Integration with EclipseLink has Error

2023-04-17 Thread Andreas Rusjaev (Jira)


 [ 
https://issues.apache.org/jira/browse/CXF-8836?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andreas Rusjaev updated CXF-8836:
-
Description: 
Dear CXF developers,
I am using version 4.0.0 of CXF cxf-spring-boot-starter-jaxws.
My CXF jaxws services are wrapped in Spring Boot 3.0. I also use 
akarta.xml.bind-api 4.0.0 and org.eclipse.persistence.moxy 4.0.1.
I generate Java models with cxf-codegen-plugin with the following configuration:

 
{code:java}

    org.apache.cxf
    cxf-codegen-plugin
    ${cxf.version}
    
        
            org.jvnet.jaxb2_commons
            jaxb2-basics-annotate
            1.1.0
        
        
            org.apache.cxf.xjc-utils
            cxf-xjc-runtime
            ${cxf.version}
        
        
            org.apache.cxf.xjcplugins
            cxf-xjc-ts
            ${cxf.version}
        
        
            javax.xml.bind
            jaxb-api
            2.4.0-b180830.0359
        
    
    
        
            generate-sources
            generate-sources
            
                
${project.build.directory}/generated-sources/cxf
                
                    true
                    
3105839350746982386
                    
                        -xjc-Xannotate
                    
                
                
                    
                        
${basedir}/src/main/resources/wsdl/myservice.wsdl
                        
classpath:wsdl/myservice.wsdl
                        myservice
                        
                            
${basedir}/src/main/resources/wsdl/bindings.xjb
                        
                    
                
            
            
                wsdl2java
            
        
    
{code}
 

Binding file has the following configuration:
{code:java}

https://jakarta.ee/xml/ns/jaxb";
               jaxb:extensionBindingPrefixes="annox xjc"
               xmlns:xs="http://www.w3.org/2001/XMLSchema";
               xmlns:annox="http://annox.dev.java.net";
               xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc";>
    
        
            
            
        
    
    
        
            
@lombok.experimental.SuperBuilder
            
@jakarta.xml.bind.annotation.XmlRootElement
            @lombok.NoArgsConstructor
        
        
            
                
@org.eclipse.persistence.oxm.annotations.XmlNullPolicy(nullRepresentationForXml=
                XmlMarshalNullRepresentation.ABSENT_NODE, 
xsiNilRepresentsNull=false)
            
        
    

{code}
 

Model class generation works fine, nullable properties are marked with 
annotation:
{code:java}
@XmlNullPolicy(nullRepresentationForXml = 
XmlMarshalNullRepresentation.ABSENT_NODE, xsiNilRepresentsNull = false){code}

To start Moxy Runtime use the following settings in main method of Application:
{code:java}
 System.setProperty("jakarta.xml.bind.JAXBContextFactory", 
"org.eclipse.persistence.jaxb.JAXBContextFactory");{code}

 
I use this initialisation because I still need to use Spring Web Service Client 
from Spring WS in parallel.
 
But on startup I get errors:

Caused by: java.lang.reflect.InvocationTargetException: null
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native 
Method) ~[na:na]
    at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
 ~[na:na]
    at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 ~[na:na]
    at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
    at org.apache.cxf.common.jaxb.JAXBUtils$3.run(JAXBUtils.java:1189) 
~[cxf-core-4.0.0.jar:4.0.0]
    at org.apache.cxf.common.jaxb.JAXBUtils$3.run(JAXBUtils.java:1183) 
~[cxf-core-4.0.0.jar:4.0.0]
    at 
java.base/java.security.AccessController.doPrivileged(AccessController.java:569)
 ~[na:na]
    at org.apache.cxf.common.jaxb.JAXBUtils.createContext(JAXBUtils.java:1183) 
~[cxf-core-4.0.0.jar:4.0.0]
    ... 64 common frames omitted
Caused by: jakarta.xml.bind.JAXBException: Property 
"eclipselink.default-target-namespace" is not supported.
    at 
org.glassfish.jaxb.runtime.v2.ContextFactory.createContext(ContextFactory.java:126)
 ~[jaxb-runtime-4.0.1.jar:4.0.1 - a95cb76]
    
I have examined your code and found that you are using hard coded call to 
"Class factoryClass = 
ClassLoaderUtils.loadClass("org.glassfish.jaxb.runtime.v2.ContextFactory" in 
cxf-core org.apache.cxf.common.jaxb.JAXBUtils

I have experimented a bit and if you can make a few changes in two classes 
everything will work. The classes need to be changed:

1. org.apache.cxf.common.jaxb.JAXBContextCache Method 
getCachedContextAndSchemas in lines 197 to 194 

    old code

 
{code:java}
        if (defaultNs != null) {
            if (HAS_MOXY)
{                 map.put("eclipselink.default-target-namespace", defaultNs);   
          }
            map.put("org.glassf

[jira] [Updated] (CXF-8836) Jaxb Integration with EclipseLink has Error

2023-04-17 Thread Andreas Rusjaev (Jira)


 [ 
https://issues.apache.org/jira/browse/CXF-8836?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andreas Rusjaev updated CXF-8836:
-
Description: 
Dear CXF developers,
I am using version 4.0.0 of CXF cxf-spring-boot-starter-jaxws.
My CXF jaxws services are wrapped in Spring Boot 3.0. I also use 
akarta.xml.bind-api 4.0.0 and org.eclipse.persistence.moxy 4.0.1.
I generate Java models with cxf-codegen-plugin with the following configuration:

 
{code:java}

    org.apache.cxf
    cxf-codegen-plugin
    ${cxf.version}
    
        
            org.jvnet.jaxb2_commons
            jaxb2-basics-annotate
            1.1.0
        
        
            org.apache.cxf.xjc-utils
            cxf-xjc-runtime
            ${cxf.version}
        
        
            org.apache.cxf.xjcplugins
            cxf-xjc-ts
            ${cxf.version}
        
        
            javax.xml.bind
            jaxb-api
            2.4.0-b180830.0359
        
    
    
        
            generate-sources
            generate-sources
            
                
${project.build.directory}/generated-sources/cxf
                
                    true
                    
3105839350746982386
                    
                        -xjc-Xannotate
                    
                
                
                    
                        
${basedir}/src/main/resources/wsdl/myservice.wsdl
                        
classpath:wsdl/myservice.wsdl
                        myservice
                        
                            
${basedir}/src/main/resources/wsdl/bindings.xjb
                        
                    
                
            
            
                wsdl2java
            
        
    
{code}
 

Binding file has the following configuration:
{code:java}

https://jakarta.ee/xml/ns/jaxb";
               jaxb:extensionBindingPrefixes="annox xjc"
               xmlns:xs="http://www.w3.org/2001/XMLSchema";
               xmlns:annox="http://annox.dev.java.net";
               xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc";>
    
        
            
            
        
    
    
        
            
@lombok.experimental.SuperBuilder
            
@jakarta.xml.bind.annotation.XmlRootElement
            @lombok.NoArgsConstructor
        
        
            
                
@org.eclipse.persistence.oxm.annotations.XmlNullPolicy(nullRepresentationForXml=
                XmlMarshalNullRepresentation.ABSENT_NODE, 
xsiNilRepresentsNull=false)
            
        
    

{code}
 

Model class generation works fine, nullable properties are marked with 
annotation:
{code:java}
@XmlNullPolicy(nullRepresentationForXml = 
XmlMarshalNullRepresentation.ABSENT_NODE, xsiNilRepresentsNull = false){code}
To start Moxy Runtime use the following settings in main method of Application:
{code:java}
 System.setProperty("jakarta.xml.bind.JAXBContextFactory", 
"org.eclipse.persistence.jaxb.JAXBContextFactory");{code}
 
I use this initialisation because I still need to use Spring Web Service Client 
from Spring WS in parallel.
 
But on application startup I get errors:

Caused by: java.lang.reflect.InvocationTargetException: null
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native 
Method) ~[na:na]
    at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
 ~[na:na]
    at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 ~[na:na]
    at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
    at org.apache.cxf.common.jaxb.JAXBUtils$3.run(JAXBUtils.java:1189) 
~[cxf-core-4.0.0.jar:4.0.0]
    at org.apache.cxf.common.jaxb.JAXBUtils$3.run(JAXBUtils.java:1183) 
~[cxf-core-4.0.0.jar:4.0.0]
    at 
java.base/java.security.AccessController.doPrivileged(AccessController.java:569)
 ~[na:na]
    at org.apache.cxf.common.jaxb.JAXBUtils.createContext(JAXBUtils.java:1183) 
~[cxf-core-4.0.0.jar:4.0.0]
    ... 64 common frames omitted
Caused by: jakarta.xml.bind.JAXBException: Property 
"eclipselink.default-target-namespace" is not supported.
    at 
org.glassfish.jaxb.runtime.v2.ContextFactory.createContext(ContextFactory.java:126)
 ~[jaxb-runtime-4.0.1.jar:4.0.1 - a95cb76]
    
I have examined your code and found that you are using hard coded call to 
"Class factoryClass = 
ClassLoaderUtils.loadClass("org.glassfish.jaxb.runtime.v2.ContextFactory" in 
cxf-core org.apache.cxf.common.jaxb.JAXBUtils

I have experimented a bit and if you can make a few changes in two classes 
everything will work. The classes need to be changed:

1. org.apache.cxf.common.jaxb.JAXBContextCache Method 
getCachedContextAndSchemas in lines 197 to 194 

    old code

 
{code:java}
        if (defaultNs != null) {
            if (HAS_MOXY)
{                 map.put("eclipselink.default-target-namespace", defaultNs);   
          }
            map.put("

[jira] [Updated] (CXF-8836) Jaxb Integration with EclipseLink has Error

2023-04-17 Thread Andreas Rusjaev (Jira)


 [ 
https://issues.apache.org/jira/browse/CXF-8836?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andreas Rusjaev updated CXF-8836:
-
Description: 
Dear CXF developers,
I am using version 4.0.0 of CXF cxf-spring-boot-starter-jaxws.
My CXF jaxws services are wrapped in Spring Boot 3.0. I also use 
akarta.xml.bind-api 4.0.0 and org.eclipse.persistence.moxy 4.0.1.
I generate Java models with cxf-codegen-plugin with the following configuration:

 
{code:java}

    org.apache.cxf
    cxf-codegen-plugin
    ${cxf.version}
    
        
            org.jvnet.jaxb2_commons
            jaxb2-basics-annotate
            1.1.0
        
        
            org.apache.cxf.xjc-utils
            cxf-xjc-runtime
            ${cxf.version}
        
        
            org.apache.cxf.xjcplugins
            cxf-xjc-ts
            ${cxf.version}
        
        
            javax.xml.bind
            jaxb-api
            2.4.0-b180830.0359
        
    
    
        
            generate-sources
            generate-sources
            
                
${project.build.directory}/generated-sources/cxf
                
                    true
                    
3105839350746982386
                    
                        -xjc-Xannotate
                    
                
                
                    
                        
${basedir}/src/main/resources/wsdl/myservice.wsdl
                        
classpath:wsdl/myservice.wsdl
                        myservice
                        
                            
${basedir}/src/main/resources/wsdl/bindings.xjb
                        
                    
                
            
            
                wsdl2java
            
        
    
{code}
 

Binding file has the following configuration:
{code:java}

https://jakarta.ee/xml/ns/jaxb";
               jaxb:extensionBindingPrefixes="annox xjc"
               xmlns:xs="http://www.w3.org/2001/XMLSchema";
               xmlns:annox="http://annox.dev.java.net";
               xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc";>
    
        
            
            
        
    
    
        
            
@lombok.experimental.SuperBuilder
            
@jakarta.xml.bind.annotation.XmlRootElement
            @lombok.NoArgsConstructor
        
        
            
                
@org.eclipse.persistence.oxm.annotations.XmlNullPolicy(nullRepresentationForXml=
                XmlMarshalNullRepresentation.ABSENT_NODE, 
xsiNilRepresentsNull=false)
            
        
    

{code}
 

Model class generation works fine, nullable properties are marked with 
annotation:
{code:java}
@XmlNullPolicy(nullRepresentationForXml = 
XmlMarshalNullRepresentation.ABSENT_NODE, xsiNilRepresentsNull = false){code}
To start Moxy Runtime use the following settings in main method of Application:
{code:java}
 System.setProperty("jakarta.xml.bind.JAXBContextFactory", 
"org.eclipse.persistence.jaxb.JAXBContextFactory");{code}
 
I use this initialisation because I still need to use Spring Web Service Client 
from Spring WS in parallel.
 
But on application startup I get errors:

Caused by: java.lang.reflect.InvocationTargetException: null
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native 
Method) ~[na:na]
    at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
 ~[na:na]
    at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 ~[na:na]
    at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
    at org.apache.cxf.common.jaxb.JAXBUtils$3.run(JAXBUtils.java:1189) 
~[cxf-core-4.0.0.jar:4.0.0]
    at org.apache.cxf.common.jaxb.JAXBUtils$3.run(JAXBUtils.java:1183) 
~[cxf-core-4.0.0.jar:4.0.0]
    at 
java.base/java.security.AccessController.doPrivileged(AccessController.java:569)
 ~[na:na]
    at org.apache.cxf.common.jaxb.JAXBUtils.createContext(JAXBUtils.java:1183) 
~[cxf-core-4.0.0.jar:4.0.0]
    ... 64 common frames omitted
Caused by: jakarta.xml.bind.JAXBException: Property 
"eclipselink.default-target-namespace" is not supported.
    at 
org.glassfish.jaxb.runtime.v2.ContextFactory.createContext(ContextFactory.java:126)
 ~[jaxb-runtime-4.0.1.jar:4.0.1 - a95cb76]
    
I have examined your code and found that you are using hard coded call to 
"Class factoryClass = 
ClassLoaderUtils.loadClass("org.glassfish.jaxb.runtime.v2.ContextFactory" in 
cxf-core org.apache.cxf.common.jaxb.JAXBUtils

I have experimented a bit and if you can make a few changes in two classes 
everything will work. The classes need to be changed:

1. org.apache.cxf.common.jaxb.JAXBContextCache Method 
getCachedContextAndSchemas in lines 197 to 194 

    old code

 
{code:java}
        if (defaultNs != null) {
            if (HAS_MOXY)
{                 map.put("eclipselink.default-target-namespace", defaultNs);   
          }
            map.put("

[jira] [Updated] (CXF-8836) Jaxb Integration with EclipseLink has Error

2023-04-17 Thread Andreas Rusjaev (Jira)


 [ 
https://issues.apache.org/jira/browse/CXF-8836?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andreas Rusjaev updated CXF-8836:
-
Description: 
Dear CXF developers,
I am using version 4.0.0 of CXF cxf-spring-boot-starter-jaxws.
My CXF jaxws services are wrapped in Spring Boot 3.0. I also use 
akarta.xml.bind-api 4.0.0 and org.eclipse.persistence.moxy 4.0.1.
I generate Java models with cxf-codegen-plugin with the following configuration:

 
{code:java}

    org.apache.cxf
    cxf-codegen-plugin
    ${cxf.version}
    
        
            org.jvnet.jaxb2_commons
            jaxb2-basics-annotate
            1.1.0
        
        
            org.apache.cxf.xjc-utils
            cxf-xjc-runtime
            ${cxf.version}
        
        
            org.apache.cxf.xjcplugins
            cxf-xjc-ts
            ${cxf.version}
        
        
            javax.xml.bind
            jaxb-api
            2.4.0-b180830.0359
        
    
    
        
            generate-sources
            generate-sources
            
                
${project.build.directory}/generated-sources/cxf
                
                    true
                    
3105839350746982386
                    
                        -xjc-Xannotate
                    
                
                
                    
                        
${basedir}/src/main/resources/wsdl/myservice.wsdl
                        
classpath:wsdl/myservice.wsdl
                        myservice
                        
                            
${basedir}/src/main/resources/wsdl/bindings.xjb
                        
                    
                
            
            
                wsdl2java
            
        
    
{code}
 

Binding file has the following configuration:
{code:java}

https://jakarta.ee/xml/ns/jaxb";
               jaxb:extensionBindingPrefixes="annox xjc"
               xmlns:xs="http://www.w3.org/2001/XMLSchema";
               xmlns:annox="http://annox.dev.java.net";
               xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc";>
    
        
            
            
        
    
    
        
            
@lombok.experimental.SuperBuilder
            
@jakarta.xml.bind.annotation.XmlRootElement
            @lombok.NoArgsConstructor
        
        
            
                
@org.eclipse.persistence.oxm.annotations.XmlNullPolicy(nullRepresentationForXml=
                XmlMarshalNullRepresentation.ABSENT_NODE, 
xsiNilRepresentsNull=false)
            
        
    

{code}
 

Model class generation works fine, nullable properties are marked with 
annotation:
{code:java}
@XmlNullPolicy(nullRepresentationForXml = 
XmlMarshalNullRepresentation.ABSENT_NODE, xsiNilRepresentsNull = false){code}
To start Moxy Runtime use the following settings in main method of Application:
{code:java}
 System.setProperty("jakarta.xml.bind.JAXBContextFactory", 
"org.eclipse.persistence.jaxb.JAXBContextFactory");{code}
 
I use this initialisation because I still need to use Spring Web Service Client 
from Spring WS in parallel.
 
But on application startup I get errors:

Caused by: java.lang.reflect.InvocationTargetException: null
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native 
Method) ~[na:na]
    at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
 ~[na:na]
    at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 ~[na:na]
    at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
    at org.apache.cxf.common.jaxb.JAXBUtils$3.run(JAXBUtils.java:1189) 
~[cxf-core-4.0.0.jar:4.0.0]
    at org.apache.cxf.common.jaxb.JAXBUtils$3.run(JAXBUtils.java:1183) 
~[cxf-core-4.0.0.jar:4.0.0]
    at 
java.base/java.security.AccessController.doPrivileged(AccessController.java:569)
 ~[na:na]
    at org.apache.cxf.common.jaxb.JAXBUtils.createContext(JAXBUtils.java:1183) 
~[cxf-core-4.0.0.jar:4.0.0]
    ... 64 common frames omitted
Caused by: jakarta.xml.bind.JAXBException: Property 
"eclipselink.default-target-namespace" is not supported.
    at 
org.glassfish.jaxb.runtime.v2.ContextFactory.createContext(ContextFactory.java:126)
 ~[jaxb-runtime-4.0.1.jar:4.0.1 - a95cb76]
    
I have examined your code and found that you are using hard coded call to 
"Class factoryClass = 
ClassLoaderUtils.loadClass("org.glassfish.jaxb.runtime.v2.ContextFactory" in 
cxf-core org.apache.cxf.common.jaxb.JAXBUtils

I have experimented a bit and if you can make a few changes in two classes 
everything will work. The classes need to be changed:

1. org.apache.cxf.common.jaxb.JAXBContextCache Method 
getCachedContextAndSchemas in lines 197 to 194 

    old code

 
{code:java}
if (defaultNs != null) {
if (HAS_MOXY){                 
  map.put("eclipselink.default-target-namespace", defaultNs);           
  }
   map.put("org.glassfish.j

[jira] [Updated] (CXF-8836) Jaxb Integration with EclipseLink has Error

2023-04-17 Thread Andreas Rusjaev (Jira)


 [ 
https://issues.apache.org/jira/browse/CXF-8836?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andreas Rusjaev updated CXF-8836:
-
Description: 
Dear CXF developers,
I am using version 4.0.0 of CXF cxf-spring-boot-starter-jaxws.
My CXF jaxws services are wrapped in Spring Boot 3.0. I also use 
akarta.xml.bind-api 4.0.0 and org.eclipse.persistence.moxy 4.0.1.
I generate Java models with cxf-codegen-plugin with the following configuration:

 
{code:java}

    org.apache.cxf
    cxf-codegen-plugin
    ${cxf.version}
    
        
            org.jvnet.jaxb2_commons
            jaxb2-basics-annotate
            1.1.0
        
        
            org.apache.cxf.xjc-utils
            cxf-xjc-runtime
            ${cxf.version}
        
        
            org.apache.cxf.xjcplugins
            cxf-xjc-ts
            ${cxf.version}
        
        
            javax.xml.bind
            jaxb-api
            2.4.0-b180830.0359
        
    
    
        
            generate-sources
            generate-sources
            
                
${project.build.directory}/generated-sources/cxf
                
                    true
                    
3105839350746982386
                    
                        -xjc-Xannotate
                    
                
                
                    
                        
${basedir}/src/main/resources/wsdl/myservice.wsdl
                        
classpath:wsdl/myservice.wsdl
                        myservice
                        
                            
${basedir}/src/main/resources/wsdl/bindings.xjb
                        
                    
                
            
            
                wsdl2java
            
        
    
{code}
 

Binding file has the following configuration:
{code:java}

https://jakarta.ee/xml/ns/jaxb";
               jaxb:extensionBindingPrefixes="annox xjc"
               xmlns:xs="http://www.w3.org/2001/XMLSchema";
               xmlns:annox="http://annox.dev.java.net";
               xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc";>
    
        
            
            
        
    
    
        
            
@lombok.experimental.SuperBuilder
            
@jakarta.xml.bind.annotation.XmlRootElement
            @lombok.NoArgsConstructor
        
        
            
                
@org.eclipse.persistence.oxm.annotations.XmlNullPolicy(nullRepresentationForXml=
                XmlMarshalNullRepresentation.ABSENT_NODE, 
xsiNilRepresentsNull=false)
            
        
    

{code}
 

Model class generation works fine, nullable properties are marked with 
annotation:
{code:java}
@XmlNullPolicy(nullRepresentationForXml = 
XmlMarshalNullRepresentation.ABSENT_NODE, xsiNilRepresentsNull = false){code}
To start Moxy Runtime use the following settings in main method of Application:
{code:java}
 System.setProperty("jakarta.xml.bind.JAXBContextFactory", 
"org.eclipse.persistence.jaxb.JAXBContextFactory");{code}
 
I use this initialisation because I still need to use Spring Web Service Client 
from Spring WS in parallel.
 
But on application startup I get errors:

Caused by: java.lang.reflect.InvocationTargetException: null
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native 
Method) ~[na:na]
    at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
 ~[na:na]
    at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 ~[na:na]
    at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
    at org.apache.cxf.common.jaxb.JAXBUtils$3.run(JAXBUtils.java:1189) 
~[cxf-core-4.0.0.jar:4.0.0]
    at org.apache.cxf.common.jaxb.JAXBUtils$3.run(JAXBUtils.java:1183) 
~[cxf-core-4.0.0.jar:4.0.0]
    at 
java.base/java.security.AccessController.doPrivileged(AccessController.java:569)
 ~[na:na]
    at org.apache.cxf.common.jaxb.JAXBUtils.createContext(JAXBUtils.java:1183) 
~[cxf-core-4.0.0.jar:4.0.0]
    ... 64 common frames omitted
Caused by: jakarta.xml.bind.JAXBException: Property 
"eclipselink.default-target-namespace" is not supported.
    at 
org.glassfish.jaxb.runtime.v2.ContextFactory.createContext(ContextFactory.java:126)
 ~[jaxb-runtime-4.0.1.jar:4.0.1 - a95cb76]
    
I have examined your code and found that you are using hard coded call to 
"Class factoryClass = 
ClassLoaderUtils.loadClass("org.glassfish.jaxb.runtime.v2.ContextFactory" in 
cxf-core org.apache.cxf.common.jaxb.JAXBUtils

I have experimented a bit and if you can make a few changes in two classes 
everything will work. The classes need to be changed:

1. org.apache.cxf.common.jaxb.JAXBContextCache Method 
getCachedContextAndSchemas in lines 197 to 194 

    old code

 
{code:java}
if (defaultNs != null) {
if (HAS_MOXY){                 
  map.put("eclipselink.default-target-namespace", defaultNs);           
  
}
    map.put("org.glass

[jira] [Updated] (CXF-8836) Jaxb Integration with EclipseLink has Error

2023-04-17 Thread Andreas Rusjaev (Jira)


 [ 
https://issues.apache.org/jira/browse/CXF-8836?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andreas Rusjaev updated CXF-8836:
-
Description: 
Dear CXF developers,
I am using version 4.0.0 of CXF cxf-spring-boot-starter-jaxws.
My CXF jaxws services are wrapped in Spring Boot 3.0. I also use 
akarta.xml.bind-api 4.0.0 and org.eclipse.persistence.moxy 4.0.1.
I generate Java models with cxf-codegen-plugin with the following configuration:

 
{code:java}

    org.apache.cxf
    cxf-codegen-plugin
    ${cxf.version}
    
        
            org.jvnet.jaxb2_commons
            jaxb2-basics-annotate
            1.1.0
        
        
            org.apache.cxf.xjc-utils
            cxf-xjc-runtime
            ${cxf.version}
        
        
            org.apache.cxf.xjcplugins
            cxf-xjc-ts
            ${cxf.version}
        
        
            javax.xml.bind
            jaxb-api
            2.4.0-b180830.0359
        
    
    
        
            generate-sources
            generate-sources
            
                
${project.build.directory}/generated-sources/cxf
                
                    true
                    
3105839350746982386
                    
                        -xjc-Xannotate
                    
                
                
                    
                        
${basedir}/src/main/resources/wsdl/myservice.wsdl
                        
classpath:wsdl/myservice.wsdl
                        myservice
                        
                            
${basedir}/src/main/resources/wsdl/bindings.xjb
                        
                    
                
            
            
                wsdl2java
            
        
    
{code}
 

Binding file has the following configuration:
{code:java}

https://jakarta.ee/xml/ns/jaxb";
               jaxb:extensionBindingPrefixes="annox xjc"
               xmlns:xs="http://www.w3.org/2001/XMLSchema";
               xmlns:annox="http://annox.dev.java.net";
               xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc";>
    
        
            
            
        
    
    
        
            
@lombok.experimental.SuperBuilder
            
@jakarta.xml.bind.annotation.XmlRootElement
            @lombok.NoArgsConstructor
        
        
            
                
@org.eclipse.persistence.oxm.annotations.XmlNullPolicy(nullRepresentationForXml=
                XmlMarshalNullRepresentation.ABSENT_NODE, 
xsiNilRepresentsNull=false)
            
        
    

{code}
 

Model class generation works fine, nullable properties are marked with 
annotation:
{code:java}
@XmlNullPolicy(nullRepresentationForXml = 
XmlMarshalNullRepresentation.ABSENT_NODE, xsiNilRepresentsNull = false){code}
To start Moxy Runtime use the following settings in main method of Application:
{code:java}
 System.setProperty("jakarta.xml.bind.JAXBContextFactory", 
"org.eclipse.persistence.jaxb.JAXBContextFactory");{code}
 
I use this initialisation because I still need to use Spring Web Service Client 
from Spring WS in parallel.
 
But on application startup I get errors:

Caused by: java.lang.reflect.InvocationTargetException: null
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native 
Method) ~[na:na]
    at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
 ~[na:na]
    at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 ~[na:na]
    at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
    at org.apache.cxf.common.jaxb.JAXBUtils$3.run(JAXBUtils.java:1189) 
~[cxf-core-4.0.0.jar:4.0.0]
    at org.apache.cxf.common.jaxb.JAXBUtils$3.run(JAXBUtils.java:1183) 
~[cxf-core-4.0.0.jar:4.0.0]
    at 
java.base/java.security.AccessController.doPrivileged(AccessController.java:569)
 ~[na:na]
    at org.apache.cxf.common.jaxb.JAXBUtils.createContext(JAXBUtils.java:1183) 
~[cxf-core-4.0.0.jar:4.0.0]
    ... 64 common frames omitted
Caused by: jakarta.xml.bind.JAXBException: Property 
"eclipselink.default-target-namespace" is not supported.
    at 
org.glassfish.jaxb.runtime.v2.ContextFactory.createContext(ContextFactory.java:126)
 ~[jaxb-runtime-4.0.1.jar:4.0.1 - a95cb76]
    
I have examined your code and found that you are using hard coded call to 
"Class factoryClass = 
ClassLoaderUtils.loadClass("org.glassfish.jaxb.runtime.v2.ContextFactory" in 
cxf-core org.apache.cxf.common.jaxb.JAXBUtils

I have experimented a bit and if you can make a few changes in two classes 
everything will work. The classes need to be changed:

1. org.apache.cxf.common.jaxb.JAXBContextCache Method 
getCachedContextAndSchemas in lines 197 to 194 

    old code

 
{code:java}
if (defaultNs != null) {
if (HAS_MOXY){                 
  map.put("eclipselink.default-target-namespace", defaultNs);           
  
}
    map.put("org.glass

[jira] [Updated] (CXF-8836) Jaxb Integration with EclipseLink has Error

2023-04-17 Thread Andreas Rusjaev (Jira)


 [ 
https://issues.apache.org/jira/browse/CXF-8836?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andreas Rusjaev updated CXF-8836:
-
Description: 
Dear CXF developers,
I am using version 4.0.0 of CXF cxf-spring-boot-starter-jaxws.
My CXF jaxws services are wrapped in Spring Boot 3.0. I also use 
akarta.xml.bind-api 4.0.0 and org.eclipse.persistence.moxy 4.0.1.
I generate Java models with cxf-codegen-plugin with the following configuration:

 
{code:java}

    org.apache.cxf
    cxf-codegen-plugin
    ${cxf.version}
    
        
            org.jvnet.jaxb2_commons
            jaxb2-basics-annotate
            1.1.0
        
        
            org.apache.cxf.xjc-utils
            cxf-xjc-runtime
            ${cxf.version}
        
        
            org.apache.cxf.xjcplugins
            cxf-xjc-ts
            ${cxf.version}
        
        
            javax.xml.bind
            jaxb-api
            2.4.0-b180830.0359
        
    
    
        
            generate-sources
            generate-sources
            
                
${project.build.directory}/generated-sources/cxf
                
                    true
                    
3105839350746982386
                    
                        -xjc-Xannotate
                    
                
                
                    
                        
${basedir}/src/main/resources/wsdl/myservice.wsdl
                        
classpath:wsdl/myservice.wsdl
                        myservice
                        
                            
${basedir}/src/main/resources/wsdl/bindings.xjb
                        
                    
                
            
            
                wsdl2java
            
        
    
{code}
 

Binding file has the following configuration:
{code:java}

https://jakarta.ee/xml/ns/jaxb";
               jaxb:extensionBindingPrefixes="annox xjc"
               xmlns:xs="http://www.w3.org/2001/XMLSchema";
               xmlns:annox="http://annox.dev.java.net";
               xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc";>
    
        
            
            
        
    
    
        
            
@lombok.experimental.SuperBuilder
            
@jakarta.xml.bind.annotation.XmlRootElement
            @lombok.NoArgsConstructor
        
        
            
                
@org.eclipse.persistence.oxm.annotations.XmlNullPolicy(nullRepresentationForXml=
                XmlMarshalNullRepresentation.ABSENT_NODE, 
xsiNilRepresentsNull=false)
            
        
    

{code}
 

Model class generation works fine, nullable properties are marked with 
annotation:
{code:java}
@XmlNullPolicy(nullRepresentationForXml = 
XmlMarshalNullRepresentation.ABSENT_NODE, xsiNilRepresentsNull = false){code}
To start Moxy Runtime use the following settings in main method of Application:
{code:java}
 System.setProperty("jakarta.xml.bind.JAXBContextFactory", 
"org.eclipse.persistence.jaxb.JAXBContextFactory");{code}
 
I use this initialisation because I still need to use Spring Web Service Client 
from Spring WS in parallel.
 
But on application startup I get errors:

Caused by: java.lang.reflect.InvocationTargetException: null
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native 
Method) ~[na:na]
    at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
 ~[na:na]
    at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 ~[na:na]
    at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
    at org.apache.cxf.common.jaxb.JAXBUtils$3.run(JAXBUtils.java:1189) 
~[cxf-core-4.0.0.jar:4.0.0]
    at org.apache.cxf.common.jaxb.JAXBUtils$3.run(JAXBUtils.java:1183) 
~[cxf-core-4.0.0.jar:4.0.0]
    at 
java.base/java.security.AccessController.doPrivileged(AccessController.java:569)
 ~[na:na]
    at org.apache.cxf.common.jaxb.JAXBUtils.createContext(JAXBUtils.java:1183) 
~[cxf-core-4.0.0.jar:4.0.0]
    ... 64 common frames omitted
Caused by: jakarta.xml.bind.JAXBException: Property 
"eclipselink.default-target-namespace" is not supported.
    at 
org.glassfish.jaxb.runtime.v2.ContextFactory.createContext(ContextFactory.java:126)
 ~[jaxb-runtime-4.0.1.jar:4.0.1 - a95cb76]
    
I have examined your code and found that you are using hard coded call to 
"Class factoryClass = 
ClassLoaderUtils.loadClass("org.glassfish.jaxb.runtime.v2.ContextFactory" in 
cxf-core org.apache.cxf.common.jaxb.JAXBUtils

I have experimented a bit and if you can make a few changes in two classes 
everything will work. The classes need to be changed:

1. org.apache.cxf.common.jaxb.JAXBContextCache Method 
getCachedContextAndSchemas in lines 197 to 194 

    old code

 
{code:java}
if (defaultNs != null) {
if (HAS_MOXY){                 
  map.put("eclipselink.default-target-namespace", defaultNs);           
  
}
    map.put("org.glass

[jira] [Updated] (CXF-8836) Jaxb Integration with EclipseLink has Error

2023-04-17 Thread Andreas Rusjaev (Jira)


 [ 
https://issues.apache.org/jira/browse/CXF-8836?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andreas Rusjaev updated CXF-8836:
-
Description: 
Dear CXF developers,
I am using version 4.0.0 of CXF cxf-spring-boot-starter-jaxws.
My CXF jaxws services are wrapped in Spring Boot 3.0. I also use 
akarta.xml.bind-api 4.0.0 and org.eclipse.persistence.moxy 4.0.1.
I generate Java models with cxf-codegen-plugin with the following configuration:

 
{code:java}

    org.apache.cxf
    cxf-codegen-plugin
    ${cxf.version}
    
        
            org.jvnet.jaxb2_commons
            jaxb2-basics-annotate
            1.1.0
        
        
            org.apache.cxf.xjc-utils
            cxf-xjc-runtime
            ${cxf.version}
        
        
            org.apache.cxf.xjcplugins
            cxf-xjc-ts
            ${cxf.version}
        
        
            javax.xml.bind
            jaxb-api
            2.4.0-b180830.0359
        
    
    
        
            generate-sources
            generate-sources
            
                
${project.build.directory}/generated-sources/cxf
                
                    true
                    
3105839350746982386
                    
                        -xjc-Xannotate
                    
                
                
                    
                        
${basedir}/src/main/resources/wsdl/myservice.wsdl
                        
classpath:wsdl/myservice.wsdl
                        myservice
                        
                            
${basedir}/src/main/resources/wsdl/bindings.xjb
                        
                    
                
            
            
                wsdl2java
            
        
    
{code}
 

Binding file has the following configuration:
{code:java}

https://jakarta.ee/xml/ns/jaxb";
               jaxb:extensionBindingPrefixes="annox xjc"
               xmlns:xs="http://www.w3.org/2001/XMLSchema";
               xmlns:annox="http://annox.dev.java.net";
               xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc";>
    
        
            
            
        
    
    
        
            
@lombok.experimental.SuperBuilder
            
@jakarta.xml.bind.annotation.XmlRootElement
            @lombok.NoArgsConstructor
        
        
            
                
@org.eclipse.persistence.oxm.annotations.XmlNullPolicy(nullRepresentationForXml=
                XmlMarshalNullRepresentation.ABSENT_NODE, 
xsiNilRepresentsNull=false)
            
        
    

{code}
 

Model class generation works fine, nullable properties are marked with 
annotation:
{code:java}
@XmlNullPolicy(nullRepresentationForXml = 
XmlMarshalNullRepresentation.ABSENT_NODE, xsiNilRepresentsNull = false){code}
To start Moxy Runtime use the following settings in main method of Application:
{code:java}
 System.setProperty("jakarta.xml.bind.JAXBContextFactory", 
"org.eclipse.persistence.jaxb.JAXBContextFactory");{code}
 
I use this initialisation because I still need to use Spring Web Service Client 
from Spring WS in parallel.
 
But on application startup I get errors:

Caused by: java.lang.reflect.InvocationTargetException: null
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native 
Method) ~[na:na]
    at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
 ~[na:na]
    at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 ~[na:na]
    at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
    at org.apache.cxf.common.jaxb.JAXBUtils$3.run(JAXBUtils.java:1189) 
~[cxf-core-4.0.0.jar:4.0.0]
    at org.apache.cxf.common.jaxb.JAXBUtils$3.run(JAXBUtils.java:1183) 
~[cxf-core-4.0.0.jar:4.0.0]
    at 
java.base/java.security.AccessController.doPrivileged(AccessController.java:569)
 ~[na:na]
    at org.apache.cxf.common.jaxb.JAXBUtils.createContext(JAXBUtils.java:1183) 
~[cxf-core-4.0.0.jar:4.0.0]
    ... 64 common frames omitted
Caused by: jakarta.xml.bind.JAXBException: Property 
"eclipselink.default-target-namespace" is not supported.
    at 
org.glassfish.jaxb.runtime.v2.ContextFactory.createContext(ContextFactory.java:126)
 ~[jaxb-runtime-4.0.1.jar:4.0.1 - a95cb76]
    
I have examined your code and found that you are using hard coded call to 
"Class factoryClass = 
ClassLoaderUtils.loadClass("org.glassfish.jaxb.runtime.v2.ContextFactory" in 
cxf-core org.apache.cxf.common.jaxb.JAXBUtils

I have experimented a bit and if you can make a few changes in two classes 
everything will work. The classes need to be changed:

1. org.apache.cxf.common.jaxb.JAXBContextCache Method 
getCachedContextAndSchemas in lines 197 to 194 

    old code

 
{code:java}
if (defaultNs != null) {
if (HAS_MOXY){                 
  map.put("eclipselink.default-target-namespace", defaultNs);           
  
}
    map.put("org.glass

[jira] [Updated] (CXF-8836) Jaxb Integration with EclipseLink has Error

2023-04-17 Thread Andreas Rusjaev (Jira)


 [ 
https://issues.apache.org/jira/browse/CXF-8836?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andreas Rusjaev updated CXF-8836:
-
Description: 
Dear CXF developers,
I am using version 4.0.0 of CXF cxf-spring-boot-starter-jaxws.
My CXF jaxws services are wrapped in Spring Boot 3.0. I also use 
akarta.xml.bind-api 4.0.0 and org.eclipse.persistence.moxy 4.0.1.
I generate Java models with cxf-codegen-plugin with the following configuration:

 
{code:java}

    org.apache.cxf
    cxf-codegen-plugin
    ${cxf.version}
    
        
            org.jvnet.jaxb2_commons
            jaxb2-basics-annotate
            1.1.0
        
        
            org.apache.cxf.xjc-utils
            cxf-xjc-runtime
            ${cxf.version}
        
        
            org.apache.cxf.xjcplugins
            cxf-xjc-ts
            ${cxf.version}
        
        
            javax.xml.bind
            jaxb-api
            2.4.0-b180830.0359
        
    
    
        
            generate-sources
            generate-sources
            
                
${project.build.directory}/generated-sources/cxf
                
                    true
                    
3105839350746982386
                    
                        -xjc-Xannotate
                    
                
                
                    
                        
${basedir}/src/main/resources/wsdl/myservice.wsdl
                        
classpath:wsdl/myservice.wsdl
                        myservice
                        
                            
${basedir}/src/main/resources/wsdl/bindings.xjb
                        
                    
                
            
            
                wsdl2java
            
        
    
{code}
 

Binding file has the following configuration:
{code:java}

https://jakarta.ee/xml/ns/jaxb";
               jaxb:extensionBindingPrefixes="annox xjc"
               xmlns:xs="http://www.w3.org/2001/XMLSchema";
               xmlns:annox="http://annox.dev.java.net";
               xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc";>
    
        
            
            
        
    
    
        
            
@lombok.experimental.SuperBuilder
            
@jakarta.xml.bind.annotation.XmlRootElement
            @lombok.NoArgsConstructor
        
        
            
                
@org.eclipse.persistence.oxm.annotations.XmlNullPolicy(nullRepresentationForXml=
                XmlMarshalNullRepresentation.ABSENT_NODE, 
xsiNilRepresentsNull=false)
            
        
    

{code}
 

Model class generation works fine, nullable properties are marked with 
annotation:
{code:java}
@XmlNullPolicy(nullRepresentationForXml = 
XmlMarshalNullRepresentation.ABSENT_NODE, xsiNilRepresentsNull = false){code}
To start Moxy Runtime use the following settings in main method of Application:
{code:java}
 System.setProperty("jakarta.xml.bind.JAXBContextFactory", 
"org.eclipse.persistence.jaxb.JAXBContextFactory");{code}
 
I use this initialisation because I still need to use Spring Web Service Client 
from Spring WS in parallel.
 
But on application startup I get errors:

Caused by: java.lang.reflect.InvocationTargetException: null
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native 
Method) ~[na:na]
    at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
 ~[na:na]
    at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 ~[na:na]
    at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
    at org.apache.cxf.common.jaxb.JAXBUtils$3.run(JAXBUtils.java:1189) 
~[cxf-core-4.0.0.jar:4.0.0]
    at org.apache.cxf.common.jaxb.JAXBUtils$3.run(JAXBUtils.java:1183) 
~[cxf-core-4.0.0.jar:4.0.0]
    at 
java.base/java.security.AccessController.doPrivileged(AccessController.java:569)
 ~[na:na]
    at org.apache.cxf.common.jaxb.JAXBUtils.createContext(JAXBUtils.java:1183) 
~[cxf-core-4.0.0.jar:4.0.0]
    ... 64 common frames omitted
Caused by: jakarta.xml.bind.JAXBException: Property 
"eclipselink.default-target-namespace" is not supported.
    at 
org.glassfish.jaxb.runtime.v2.ContextFactory.createContext(ContextFactory.java:126)
 ~[jaxb-runtime-4.0.1.jar:4.0.1 - a95cb76]
    
I have examined your code and found that you are using hard coded call to 
"Class factoryClass = 
ClassLoaderUtils.loadClass("org.glassfish.jaxb.runtime.v2.ContextFactory" in 
cxf-core org.apache.cxf.common.jaxb.JAXBUtils

I have experimented a bit and if you can make a few changes in two classes 
everything will work. The classes need to be changed:

1. org.apache.cxf.common.jaxb.JAXBContextCache Method 
getCachedContextAndSchemas in lines 197 to 194 

    old code

 
{code:java}
if (defaultNs != null) {
if (HAS_MOXY){                 
  map.put("eclipselink.default-target-namespace", defaultNs);           
  
}
    map.put("org.glass

[jira] [Updated] (CXF-8836) Jaxb Integration with EclipseLink has Error

2023-04-17 Thread Andreas Rusjaev (Jira)


 [ 
https://issues.apache.org/jira/browse/CXF-8836?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andreas Rusjaev updated CXF-8836:
-
Description: 
Dear CXF developers,
I am using version 4.0.0 of CXF cxf-spring-boot-starter-jaxws.
My CXF jaxws services are wrapped in Spring Boot 3.0. I also use 
akarta.xml.bind-api 4.0.0 and org.eclipse.persistence.moxy 4.0.1.
I generate Java models with cxf-codegen-plugin with the following configuration:

 
{code:java}

    org.apache.cxf
    cxf-codegen-plugin
    ${cxf.version}
    
        
            org.jvnet.jaxb2_commons
            jaxb2-basics-annotate
            1.1.0
        
        
            org.apache.cxf.xjc-utils
            cxf-xjc-runtime
            ${cxf.version}
        
        
            org.apache.cxf.xjcplugins
            cxf-xjc-ts
            ${cxf.version}
        
        
            javax.xml.bind
            jaxb-api
            2.4.0-b180830.0359
        
    
    
        
            generate-sources
            generate-sources
            
                
${project.build.directory}/generated-sources/cxf
                
                    true
                    
3105839350746982386
                    
                        -xjc-Xannotate
                    
                
                
                    
                        
${basedir}/src/main/resources/wsdl/myservice.wsdl
                        
classpath:wsdl/myservice.wsdl
                        myservice
                        
                            
${basedir}/src/main/resources/wsdl/bindings.xjb
                        
                    
                
            
            
                wsdl2java
            
        
    
{code}
 

Binding file has the following configuration:
{code:java}

https://jakarta.ee/xml/ns/jaxb";
               jaxb:extensionBindingPrefixes="annox xjc"
               xmlns:xs="http://www.w3.org/2001/XMLSchema";
               xmlns:annox="http://annox.dev.java.net";
               xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc";>
    
        
            
            
        
    
    
        
            
@lombok.experimental.SuperBuilder
            
@jakarta.xml.bind.annotation.XmlRootElement
            @lombok.NoArgsConstructor
        
        
            
                
@org.eclipse.persistence.oxm.annotations.XmlNullPolicy(nullRepresentationForXml=
                XmlMarshalNullRepresentation.ABSENT_NODE, 
xsiNilRepresentsNull=false)
            
        
    

{code}
 

Model class generation works fine, nullable properties are marked with 
annotation:
{code:java}
@XmlNullPolicy(nullRepresentationForXml = 
XmlMarshalNullRepresentation.ABSENT_NODE, xsiNilRepresentsNull = false){code}
To start Moxy Runtime use the following settings in main method of Application:
{code:java}
 System.setProperty("jakarta.xml.bind.JAXBContextFactory", 
"org.eclipse.persistence.jaxb.JAXBContextFactory");{code}
 
I use this initialisation because I still need to use Spring Web Service Client 
from Spring WS in parallel.
 
But on application startup I get errors:

Caused by: java.lang.reflect.InvocationTargetException: null
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native 
Method) ~[na:na]
    at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
 ~[na:na]
    at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 ~[na:na]
    at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
    at org.apache.cxf.common.jaxb.JAXBUtils$3.run(JAXBUtils.java:1189) 
~[cxf-core-4.0.0.jar:4.0.0]
    at org.apache.cxf.common.jaxb.JAXBUtils$3.run(JAXBUtils.java:1183) 
~[cxf-core-4.0.0.jar:4.0.0]
    at 
java.base/java.security.AccessController.doPrivileged(AccessController.java:569)
 ~[na:na]
    at org.apache.cxf.common.jaxb.JAXBUtils.createContext(JAXBUtils.java:1183) 
~[cxf-core-4.0.0.jar:4.0.0]
    ... 64 common frames omitted
Caused by: jakarta.xml.bind.JAXBException: Property 
"eclipselink.default-target-namespace" is not supported.
    at 
org.glassfish.jaxb.runtime.v2.ContextFactory.createContext(ContextFactory.java:126)
 ~[jaxb-runtime-4.0.1.jar:4.0.1 - a95cb76]
    
I have examined your code and found that you are using hard coded call to 
"Class factoryClass = 
ClassLoaderUtils.loadClass("org.glassfish.jaxb.runtime.v2.ContextFactory" in 
cxf-core org.apache.cxf.common.jaxb.JAXBUtils

I have experimented a bit and if you can make a few changes in two classes 
everything will work. The classes need to be changed:

1. org.apache.cxf.common.jaxb.JAXBContextCache Method 
getCachedContextAndSchemas in lines 197 to 194 

    old code

 
{code:java}
if (defaultNs != null) {
if (HAS_MOXY){                 
  map.put("eclipselink.default-target-namespace", defaultNs);           
  
}
    map.put("org.glass

[jira] [Commented] (CXF-8836) Jaxb Integration with EclipseLink has Error

2023-04-17 Thread Andriy Redko (Jira)


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

Andriy Redko commented on CXF-8836:
---

[~andreas_rusjaev] thanks for the issue, afaik Apache CXF does not support 
EclipseLink Moxy, there is long standing issue to add that (CXF-5131) but it 
not yet resolved.

> Jaxb Integration with EclipseLink has Error
> ---
>
> Key: CXF-8836
> URL: https://issues.apache.org/jira/browse/CXF-8836
> Project: CXF
>  Issue Type: Bug
>  Components: Core
>Affects Versions: 4.0.0
>Reporter: Andreas Rusjaev
>Priority: Major
>
> Dear CXF developers,
> I am using version 4.0.0 of CXF cxf-spring-boot-starter-jaxws.
> My CXF jaxws services are wrapped in Spring Boot 3.0. I also use 
> akarta.xml.bind-api 4.0.0 and org.eclipse.persistence.moxy 4.0.1.
> I generate Java models with cxf-codegen-plugin with the following 
> configuration:
>  
> {code:java}
> 
>     org.apache.cxf
>     cxf-codegen-plugin
>     ${cxf.version}
>     
>         
>             org.jvnet.jaxb2_commons
>             jaxb2-basics-annotate
>             1.1.0
>         
>         
>             org.apache.cxf.xjc-utils
>             cxf-xjc-runtime
>             ${cxf.version}
>         
>         
>             org.apache.cxf.xjcplugins
>             cxf-xjc-ts
>             ${cxf.version}
>         
>         
>             javax.xml.bind
>             jaxb-api
>             2.4.0-b180830.0359
>         
>     
>     
>         
>             generate-sources
>             generate-sources
>             
>                 
> ${project.build.directory}/generated-sources/cxf
>                 
>                     true
>                     
> 3105839350746982386
>                     
>                         -xjc-Xannotate
>                     
>                 
>                 
>                     
>                         
> ${basedir}/src/main/resources/wsdl/myservice.wsdl
>                         
> classpath:wsdl/myservice.wsdl
>                         myservice
>                         
>                             
> ${basedir}/src/main/resources/wsdl/bindings.xjb
>                         
>                     
>                 
>             
>             
>                 wsdl2java
>             
>         
>     
> {code}
>  
> Binding file has the following configuration:
> {code:java}
> 
>                 xmlns:jaxb="https://jakarta.ee/xml/ns/jaxb";
>                jaxb:extensionBindingPrefixes="annox xjc"
>                xmlns:xs="http://www.w3.org/2001/XMLSchema";
>                xmlns:annox="http://annox.dev.java.net";
>                xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc";>
>     
>         
>                                               generateElementProperty="false"
>                                  mapSimpleTypeDef="false"
>                                  fixedAttributeAsConstantProperty="true"
>                                  choiceContentProperty="true"
>                                  typesafeEnumBase="xs:boolean">
>             
>         
>     
>     
>          required="false">
>             
> @lombok.experimental.SuperBuilder
>             
> @jakarta.xml.bind.annotation.XmlRootElement
>             
> @lombok.NoArgsConstructor
>         
>         
>             
>                 
> @org.eclipse.persistence.oxm.annotations.XmlNullPolicy(nullRepresentationForXml=
>                 XmlMarshalNullRepresentation.ABSENT_NODE, 
> xsiNilRepresentsNull=false)
>             
>         
>     
> 
> {code}
>  
> Model class generation works fine, nullable properties are marked with 
> annotation:
> {code:java}
> @XmlNullPolicy(nullRepresentationForXml = 
> XmlMarshalNullRepresentation.ABSENT_NODE, xsiNilRepresentsNull = false){code}
> To start Moxy Runtime use the following settings in main method of 
> Application:
> {code:java}
>  System.setProperty("jakarta.xml.bind.JAXBContextFactory", 
> "org.eclipse.persistence.jaxb.JAXBContextFactory");{code}
>  
> I use this initialisation because I still need to use Spring Web Service 
> Client from Spring WS in parallel.
>  
> But on application startup I get errors:
> Caused by: java.lang.reflect.InvocationTargetException: null
>     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native 
> Method) ~[na:na]
>     at 
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
>  ~[na:na]
>     at 
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>  ~[na:na]
>     at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
>     at org.apache.cxf.common.jaxb.JAXBUtils$3.run(JAXBUtils.java:1189) 
> ~[cxf-core-4.0.0.jar:4.0.0]
>     at org.apache.cxf.co

[jira] [Updated] (CXF-5131) Update CXF's JAXB handling to detect/support Eclipselink Moxy

2023-04-17 Thread Andriy Redko (Jira)


 [ 
https://issues.apache.org/jira/browse/CXF-5131?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andriy Redko updated CXF-5131:
--
Affects Version/s: 4.0.0
   3.5.5
   3.4.10

> Update CXF's JAXB handling to detect/support Eclipselink Moxy
> -
>
> Key: CXF-5131
> URL: https://issues.apache.org/jira/browse/CXF-5131
> Project: CXF
>  Issue Type: Improvement
>  Components: JAXB Databinding
>Affects Versions: 3.4.10, 3.5.5, 4.0.0
>Reporter: Daniel Kulp
>Assignee: Daniel Kulp
>Priority: Major
>
> Eclipselink Moxy has a bunch of extra annotations and such which can provide 
> a more complete mapping for XML.   Also, it's the default JAXB implementation 
> in WebLogic now.   We should try and detect Moxy and provide appropriate 
> behavior (for things like the namespace/prefix maps).



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


[jira] [Closed] (CXF-8836) Jaxb Integration with EclipseLink has Error

2023-04-17 Thread Andriy Redko (Jira)


 [ 
https://issues.apache.org/jira/browse/CXF-8836?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andriy Redko closed CXF-8836.
-
Resolution: Duplicate

> Jaxb Integration with EclipseLink has Error
> ---
>
> Key: CXF-8836
> URL: https://issues.apache.org/jira/browse/CXF-8836
> Project: CXF
>  Issue Type: Bug
>  Components: Core
>Affects Versions: 4.0.0
>Reporter: Andreas Rusjaev
>Priority: Major
>
> Dear CXF developers,
> I am using version 4.0.0 of CXF cxf-spring-boot-starter-jaxws.
> My CXF jaxws services are wrapped in Spring Boot 3.0. I also use 
> akarta.xml.bind-api 4.0.0 and org.eclipse.persistence.moxy 4.0.1.
> I generate Java models with cxf-codegen-plugin with the following 
> configuration:
>  
> {code:java}
> 
>     org.apache.cxf
>     cxf-codegen-plugin
>     ${cxf.version}
>     
>         
>             org.jvnet.jaxb2_commons
>             jaxb2-basics-annotate
>             1.1.0
>         
>         
>             org.apache.cxf.xjc-utils
>             cxf-xjc-runtime
>             ${cxf.version}
>         
>         
>             org.apache.cxf.xjcplugins
>             cxf-xjc-ts
>             ${cxf.version}
>         
>         
>             javax.xml.bind
>             jaxb-api
>             2.4.0-b180830.0359
>         
>     
>     
>         
>             generate-sources
>             generate-sources
>             
>                 
> ${project.build.directory}/generated-sources/cxf
>                 
>                     true
>                     
> 3105839350746982386
>                     
>                         -xjc-Xannotate
>                     
>                 
>                 
>                     
>                         
> ${basedir}/src/main/resources/wsdl/myservice.wsdl
>                         
> classpath:wsdl/myservice.wsdl
>                         myservice
>                         
>                             
> ${basedir}/src/main/resources/wsdl/bindings.xjb
>                         
>                     
>                 
>             
>             
>                 wsdl2java
>             
>         
>     
> {code}
>  
> Binding file has the following configuration:
> {code:java}
> 
>                 xmlns:jaxb="https://jakarta.ee/xml/ns/jaxb";
>                jaxb:extensionBindingPrefixes="annox xjc"
>                xmlns:xs="http://www.w3.org/2001/XMLSchema";
>                xmlns:annox="http://annox.dev.java.net";
>                xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc";>
>     
>         
>                                               generateElementProperty="false"
>                                  mapSimpleTypeDef="false"
>                                  fixedAttributeAsConstantProperty="true"
>                                  choiceContentProperty="true"
>                                  typesafeEnumBase="xs:boolean">
>             
>         
>     
>     
>          required="false">
>             
> @lombok.experimental.SuperBuilder
>             
> @jakarta.xml.bind.annotation.XmlRootElement
>             
> @lombok.NoArgsConstructor
>         
>         
>             
>                 
> @org.eclipse.persistence.oxm.annotations.XmlNullPolicy(nullRepresentationForXml=
>                 XmlMarshalNullRepresentation.ABSENT_NODE, 
> xsiNilRepresentsNull=false)
>             
>         
>     
> 
> {code}
>  
> Model class generation works fine, nullable properties are marked with 
> annotation:
> {code:java}
> @XmlNullPolicy(nullRepresentationForXml = 
> XmlMarshalNullRepresentation.ABSENT_NODE, xsiNilRepresentsNull = false){code}
> To start Moxy Runtime use the following settings in main method of 
> Application:
> {code:java}
>  System.setProperty("jakarta.xml.bind.JAXBContextFactory", 
> "org.eclipse.persistence.jaxb.JAXBContextFactory");{code}
>  
> I use this initialisation because I still need to use Spring Web Service 
> Client from Spring WS in parallel.
>  
> But on application startup I get errors:
> Caused by: java.lang.reflect.InvocationTargetException: null
>     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native 
> Method) ~[na:na]
>     at 
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
>  ~[na:na]
>     at 
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>  ~[na:na]
>     at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
>     at org.apache.cxf.common.jaxb.JAXBUtils$3.run(JAXBUtils.java:1189) 
> ~[cxf-core-4.0.0.jar:4.0.0]
>     at org.apache.cxf.common.jaxb.JAXBUtils$3.run(JAXBUtils.java:1183) 
> ~[cxf-core-4.0.0.jar:4.0.0]
>     at 
> java.base/java.security.AccessController.doPrivileged(AccessController.java:569)
>  ~[na:na]
>     at 
> org.apache.

[jira] [Commented] (CXF-5131) Update CXF's JAXB handling to detect/support Eclipselink Moxy

2023-04-17 Thread Andriy Redko (Jira)


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

Andriy Redko commented on CXF-5131:
---

[~dkulp] do you think you could resume working on this issue? thanks!

> Update CXF's JAXB handling to detect/support Eclipselink Moxy
> -
>
> Key: CXF-5131
> URL: https://issues.apache.org/jira/browse/CXF-5131
> Project: CXF
>  Issue Type: Improvement
>  Components: JAXB Databinding
>Affects Versions: 3.4.10, 3.5.5, 4.0.0
>Reporter: Daniel Kulp
>Assignee: Daniel Kulp
>Priority: Major
>
> Eclipselink Moxy has a bunch of extra annotations and such which can provide 
> a more complete mapping for XML.   Also, it's the default JAXB implementation 
> in WebLogic now.   We should try and detect Moxy and provide appropriate 
> behavior (for things like the namespace/prefix maps).



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


[jira] [Updated] (CXF-8671) Support Jakarta EE 10

2023-04-17 Thread Andriy Redko (Jira)


 [ 
https://issues.apache.org/jira/browse/CXF-8671?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andriy Redko updated CXF-8671:
--
Description: 
Support Jakarta EE 10

Jakarta EE 10 has Landed - 
[https://jakartaee-ambassadors.io/2022/09/22/jakarta-ee-10-released/]

[https://jakarta.ee/release/10/]

[https://www.infoq.com/news/2023/01/glassfish-delivers-support-jdk17/]

 

Specs:
 * Jakarta Activation 2.1*

 * Jakarta Authentication 3.0*

 * Jakarta Authorization 2.1*

 * Jakarta Batch 2.1*

 * Jakarta Bean Validation 3.0

 * Jakarta Common Annotations 2.1*

 * Jakarta Concurrency 3.0*

 * Jakarta Connectors 2.1*

 * Jakarta Contexts and Dependency Injection 4.0*

 * Jakarta Debugging Support for Other Languages 2.0

 * Jakarta Dependency Injection 2.0

 * Jakarta Enterprise Beans 4.0 (except for Jakarta Enterprise Beans entity 
beans and associated Jakarta Enterprise Beans QL, and embedded container, which 
have been made removed)

 * Jakarta Expression Language 5.0*

 * Jakarta Interceptors 2.1*

 * Jakarta JSON Processing 2.1*

 * Jakarta JSON Binding 3.0*

 * Jakarta Mail 2.1*

 * Jakarta Managed Beans 2.0

 * Jakarta Messaging 3.1*

 * Jakarta Persistence 3.1*

 * Jakarta RESTful Web Services 3.1*

 * Jakarta Security 3.0*

 * Jakarta Servlet 6.0*

 * Jakarta Server Faces 4.0*

 * Jakarta Server Pages 3.1*

 * Jakarta Standard Tag Library 3.0*

 * Jakarta Transactions 2.0

 * Jakarta WebSocket 2.1*
 * Jakarta Enterprise Beans 3.2 and earlier entity beans and associated Jakarta 
Enterprise Beans QL

 * Jakarta Enterprise Beans 2.x API group

 * Jakarta Enterprise Web Services 2.0

 * Jakarta SOAP with Attachments 3.0*

 * Jakarta XML Web Services 4.0*

 * Jakarta XML Binding 4.0*

 

Rest Client TCK update:

 - [https://github.com/eclipse/microprofile-rest-client/pull/352]

 

Updates required:

 - Undertow 2.3.x

 - Jetty 12 
([https://github.com/eclipse/jetty.project/releases/tag/jetty-12.0.0.beta0])

 - Hibernate Validator 8 ([https://hibernate.org/validator/releases/8.0/)]

 - Weld 5 ([https://weld.cdi-spec.org/news/2022/04/29/weld-500Final/])

 - Hibernate 6.2.1 ([https://hibernate.org/orm/releases/6.2/], 
[https://in.relation.to/2023/03/30/orm-62-final/, 
https://in.relation.to/2023/04/14/hibernate-orm-621-final/|https://in.relation.to/2023/03/30/orm-62-final/])

 - Spring Boot 3.1 
([https://github.com/spring-projects/spring-boot/releases/tag/v3.1.0-M1)]

 - Spring Security 6.1 
([https://github.com/spring-projects/spring-security/releases/tag/6.1.0-M1])

 - Micrometer 1.11 
([https://github.com/micrometer-metrics/micrometer/releases/tag/v1.11.0-M1])

Microprofile 6.0 
([https://download.eclipse.org/microprofile/microprofile-6.0/microprofile-spec-6.0.html),]
 aligned with JakartaEE 10 core profile:

 - Microprofile OpenAPI 3.1 
([https://github.com/eclipse/microprofile-open-api/releases/tag/3.1])

 - Angus Mail ([https://github.com/eclipse-ee4j/angus-mail/releases/tag/2.0.1])
 - 
[https://github.com/arquillian/arquillian-container-weld/releases/tag/3.0.2.Final]

  was:
Support Jakarta EE 10

Jakarta EE 10 has Landed - 
[https://jakartaee-ambassadors.io/2022/09/22/jakarta-ee-10-released/]

[https://jakarta.ee/release/10/]

[https://www.infoq.com/news/2023/01/glassfish-delivers-support-jdk17/]

 

Specs:
 * Jakarta Activation 2.1*

 * Jakarta Authentication 3.0*

 * Jakarta Authorization 2.1*

 * Jakarta Batch 2.1*

 * Jakarta Bean Validation 3.0

 * Jakarta Common Annotations 2.1*

 * Jakarta Concurrency 3.0*

 * Jakarta Connectors 2.1*

 * Jakarta Contexts and Dependency Injection 4.0*

 * Jakarta Debugging Support for Other Languages 2.0

 * Jakarta Dependency Injection 2.0

 * Jakarta Enterprise Beans 4.0 (except for Jakarta Enterprise Beans entity 
beans and associated Jakarta Enterprise Beans QL, and embedded container, which 
have been made removed)

 * Jakarta Expression Language 5.0*

 * Jakarta Interceptors 2.1*

 * Jakarta JSON Processing 2.1*

 * Jakarta JSON Binding 3.0*

 * Jakarta Mail 2.1*

 * Jakarta Managed Beans 2.0

 * Jakarta Messaging 3.1*

 * Jakarta Persistence 3.1*

 * Jakarta RESTful Web Services 3.1*

 * Jakarta Security 3.0*

 * Jakarta Servlet 6.0*

 * Jakarta Server Faces 4.0*

 * Jakarta Server Pages 3.1*

 * Jakarta Standard Tag Library 3.0*

 * Jakarta Transactions 2.0

 * Jakarta WebSocket 2.1*
 * Jakarta Enterprise Beans 3.2 and earlier entity beans and associated Jakarta 
Enterprise Beans QL

 * Jakarta Enterprise Beans 2.x API group

 * Jakarta Enterprise Web Services 2.0

 * Jakarta SOAP with Attachments 3.0*

 * Jakarta XML Web Services 4.0*

 * Jakarta XML Binding 4.0*

 

Rest Client TCK update:

 - [https://github.com/eclipse/microprofile-rest-client/pull/352]

 

Updates required:

 - Undertow 2.3.x

 - Jetty 12 
([https://github.com/eclipse/jetty.project/releases/tag/jetty-12.0.0.beta0])

 - Hibernate Validator 8 ([https://hibernate.org/validator/releases/8.0/)]

 - Weld 5 ([https://weld.cdi-s

[jira] [Created] (CXF-8837) Allow P11 RSA Keys within JwsUtils

2023-04-17 Thread Jan Bernhardt (Jira)
Jan Bernhardt created CXF-8837:
--

 Summary: Allow P11 RSA Keys within JwsUtils
 Key: CXF-8837
 URL: https://issues.apache.org/jira/browse/CXF-8837
 Project: CXF
  Issue Type: Bug
  Components: JAX-RS Security
Affects Versions: 4.0.0, 3.3.4
Reporter: Jan Bernhardt
Assignee: Jan Bernhardt
 Fix For: 4.0.1


As discussed on the [mailing 
list|[https://lists.apache.org/thread/95hcbjqy7z7m7qhz407y9o36gw2ql2xo],] the 
current implementation within `JwsUtils` only accepts RSA keys coming from a 
local keystore file. RSA keys from other resources like a HSM via PKCS11 
interface are getting rejected currently for no reason.

The code needs some refactoring to not limit the support to local keystores.



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