You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Freeman Yue Fang (Jira)" <ji...@apache.org> on 2026/01/28 18:16:00 UTC

[jira] [Resolved] (CXF-9195) jakarta.xml.bind.PropertyException: name: com.sun.xml.bind.ObjectFactory

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

Freeman Yue Fang resolved CXF-9195.
-----------------------------------
    Fix Version/s: 4.2.0
                   4.1.5
                   4.0.11
       Resolution: Fixed

> jakarta.xml.bind.PropertyException: name: com.sun.xml.bind.ObjectFactory
> ------------------------------------------------------------------------
>
>                 Key: CXF-9195
>                 URL: https://issues.apache.org/jira/browse/CXF-9195
>             Project: CXF
>          Issue Type: Bug
>          Components: JAXB Databinding
>    Affects Versions: 4.0.9
>            Reporter: Mauro Molinari
>            Assignee: Freeman Yue Fang
>            Priority: Major
>             Fix For: 4.2.0, 4.1.5, 4.0.11
>
>
> We're running an application on JBoss 8 EAP. When serving SOAP services, we have a lot of such log entries:
> {code:java}
> 2026-01-28 00:00:41,036 INFO  [org.apache.cxf.jaxb.JAXBDataBinding] (default task-31) PropertyException setting Marshaller properties: jakarta.xml.bind.PropertyException: name: com.sun.xml.bind.ObjectFactory value: com.example.MyClassFactory@58f56cb7
>         at jakarta.xml.bind.api@4.0.2.redhat-00003//jakarta.xml.bind.helpers.AbstractUnmarshallerImpl.setProperty(AbstractUnmarshallerImpl.java:314)
>         at org.glassfish.jaxb@4.0.5.redhat-00001//org.glassfish.jaxb.runtime.v2.runtime.unmarshaller.UnmarshallerImpl.setProperty(UnmarshallerImpl.java:475)
>         at org.apache.cxf.impl//org.apache.cxf.jaxb.io.DataReaderImpl.createUnmarshaller(DataReaderImpl.java:123)
>         at org.apache.cxf.impl//org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:166)
>         at org.apache.cxf.impl//org.apache.cxf.wsdl.interceptors.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:109)
>         at org.apache.cxf@4.0.9.redhat-00002//org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307)
>         at org.apache.cxf@4.0.9.redhat-00002//org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
>         at org.apache.cxf.impl//org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:267)
>         at org.jboss.ws.cxf.jbossws-cxf-server@7.3.6.Final-redhat-00001//org.jboss.wsf.stack.cxf.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:107)
>         at org.jboss.ws.cxf.jbossws-cxf-server@7.3.6.Final-redhat-00001//org.jboss.wsf.stack.cxf.transport.ServletHelper.callRequestHandler(ServletHelper.java:131)
>         at org.jboss.ws.cxf.jbossws-cxf-server@7.3.6.Final-redhat-00001//org.jboss.wsf.stack.cxf.CXFServletExt.invoke(CXFServletExt.java:90)
>         at org.apache.cxf.impl//org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:303)
>         at org.apache.cxf.impl//org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:216)
>         at jakarta.servlet.api@6.0.0.redhat-00007//jakarta.servlet.http.HttpServlet.service(HttpServlet.java:547) {code}
> Indeed, with a JAXB 4 stack, that property should probably be named {{org.glassfish.jaxb.core.ObjectFactory}} instead.
> I see this line of code that I guess it is causing the issue:
> [https://github.com/apache/cxf/blob/main/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBContextInitializer.java#L331]
> Apparently, the service is still working fine, but this log entry is polluting our logs a lot. I'm not even sure there are no consequences at all.
> I searched over the Internet for possible causes, I just found the following message by another user with the same problem:
> [Exception in log: jakarta.xml.bind.PropertyException: name: com.sun.xml.bind.ObjectFactory|https://www.mail-archive.com/users@cxf.apache.org/msg45422.html]
> but unfortunately no answer.
>  
>  



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