[
https://issues.apache.org/jira/browse/CXF-2973?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12906264#action_12906264
]
Benson Margulies commented on CXF-2973:
---------------------------------------
The problem here is two copies of JAX-B, one in the webapp, one not, causing
JAX-B to fail to locate its annotations.
interface com.sun.xml.txw2.annotation.XmlNamespace
is being straddled between the webapp class loader and the system class loader.
I'm debugging my way into JAX-B schema generation. I have this failing
environment. In it, JAXB creates XML Schema DOM documents with no namespaces.
The immediate cause is seen in com.sun.xml.txw2.TXW.getTagName(Class<?>).
It goes looking for the package-info.java annotation on
com.sun.xml.bind.v2.schemagen.xmlschema. The annotation isn't there.
The package object seems to be pointing at the copy of JAX-B in the classes.jar
that Apple passes along from Sun. There is a package-info.class in there.
com/sun/xml/internal/bind/v2/schemagen/xmlschema/package-info.class
Inside the code to fetch the annotation,
annotations is:
{interface
com.sun.xml.txw2.annotation.xmlnamespa...@com.sun.xml.txw2.annotation.xmlnamespace(value=http://www.w3.org/2001/XMLSchema)}
> Schema with broken namespaces in JAXB
> -------------------------------------
>
> Key: CXF-2973
> URL: https://issues.apache.org/jira/browse/CXF-2973
> Project: CXF
> Issue Type: Bug
> Components: JAXB Databinding
> Affects Versions: 2.2.10
> Reporter: Benson Margulies
>
> Under some complex set of conditions that I have not yet diagnosed, the
> JAXBDataBinding will, with 'help' from JAXB (the version of JAXB built into
> the Apple 1.6 JDK, at least) create a schema DOM document that looks,
> roughly, like:
> {code}
> <schema xmlns:xs="......">
> <import .../>
> ...
> </schema>
> {code}
> That is, the elements are created with no namespace at all.
> I have not been able to isolate a test case, but I am opening this issue to
> track with.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.