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

Freeman Yue Fang reassigned CXF-9195:
-------------------------------------

    Assignee: Freeman Yue Fang

> 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
>
> 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 
> [email protected]//jakarta.xml.bind.helpers.AbstractUnmarshallerImpl.setProperty(AbstractUnmarshallerImpl.java:314)
>         at 
> [email protected]//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 
> [email protected]//org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307)
>         at 
> [email protected]//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 
> [email protected]//org.jboss.wsf.stack.cxf.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:107)
>         at 
> [email protected]//org.jboss.wsf.stack.cxf.transport.ServletHelper.callRequestHandler(ServletHelper.java:131)
>         at 
> [email protected]//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 
> [email protected]//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/[email protected]/msg45422.html]
> but unfortunately no answer.
>  
>  



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

Reply via email to