Details
-
Wish
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
-
Unknown
Description
This Jira is mostly an FIY that jaxb-ri 4.0.0.x has broken CXF.
This issues has been filed with jaxb-ri https://github.com/eclipse-ee4j/jaxb-ri/issues/1608
Pre-4.0.x jaxb-ri versions handling schema such as
<simpleType name="ResponseMechanismEnum">
<restriction base="anyURI">
would generate a BIGlobalBinding.enumBaseType of
enumBaseType =
anyURI
4.0.0x code generates
enumBaseType =
string.
This breaks generation of code in CXF services/xkms/xkms-common/.
Un-generated class files are ResultMajorEnum, ResultMinorEnum, ReasonEnum
to name a few. This is the file that declares these classes,
cxf/services/xkms/xkms-common/src/main/model/xkms.xsd
In comparing the thread dump between version in CXF master and 4.0.0x
jaxb-ri 4.0.0x scans the DOM and returns to com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl
line 254 and then executes 261
at com.sun.xml.bind.unmarshaller.DOMScanner.visit(DOMScanner.java:214)
at com.sun.xml.bind.unmarshaller.DOMScanner.visit(DOMScanner.java:251)
at com.sun.xml.bind.unmarshaller.DOMScanner.visit(DOMScanner.java:220)
at com.sun.xml.bind.unmarshaller.DOMScanner.scan(DOMScanner.java:97)
at com.sun.tools.xjc.reader.internalizer.DOMForestScanner.scan(DOMForestScanner.java:62)
at com.sun.tools.xjc.reader.internalizer.DOMForestScanner.scan(DOMForestScanner.java:70)
at com.sun.tools.xjc.reader.internalizer.DOMForestParser.parse(DOMForestParser.java:74)
at com.sun.tools.xjc.ModelLoader$XMLSchemaParser.parse(ModelLoader.java:210)
at com.sun.xml.xsom.impl.parser.NGCCRuntimeEx.parseEntity(NGCCRuntimeEx.java:351)
at com.sun.xml.xsom.impl.parser.ParserContext.parse(ParserContext.java:98)
at com.sun.xml.xsom.parser.XSOMParser.parse(XSOMParser.java:141)
at com.sun.xml.xsom.parser.XSOMParser.parse(XSOMParser.java:130)
at com.sun.tools.xjc.ModelLoader.createXSOM(ModelLoader.java:475)
at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:240)
at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:67)
at org.apache.cxf.tools.wsdlto.databinding.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:445)
The older jaxb-ri version scan the DOM through line 214 and continues processing
all the way to StructureLoader
at com.sun.xml.bind.v2.runtime.unmarshaller.StructureLoader.startElement(StructureLoader.java:149)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext._startElement(UnmarshallingContext.java:545)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.startElement(UnmarshallingContext.java:524)
at com.sun.xml.bind.v2.runtime.unmarshaller.InterningXmlVisitor.startElement(InterningXmlVisitor.java:45)
at com.sun.xml.bind.v2.runtime.unmarshaller.SAXConnector.startElement(SAXConnector.java:137)
at org.xml.sax.helpers.XMLFilterImpl.startElement(XMLFilterImpl.java:539)
at com.sun.tools.xjc.reader.xmlschema.bindinfo.ForkingFilter.startElement(ForkingFilter.java:120)
at com.sun.tools.xjc.reader.xmlschema.bindinfo.AnnotationParserFactoryImpl$1$1.startElement(AnnotationParserFactoryImpl.java:83)
at com.sun.xml.xsom.impl.parser.state.NGCCRuntime.redirectSubtree(NGCCRuntime.java:455)
at com.sun.xml.xsom.impl.parser.state.annotation.action0(annotation.java:60)
at com.sun.xml.xsom.impl.parser.state.annotation.enterElement(annotation.java:84)
at com.sun.xml.xsom.impl.parser.state.NGCCRuntime.sendEnterElement(NGCCRuntime.java:392)
at com.sun.xml.xsom.impl.parser.state.NGCCHandler.spawnChildFromEnterElement(NGCCHandler.java:84)
at com.sun.xml.xsom.impl.parser.state.Schema.enterElement(Schema.java:395)
at com.sun.xml.xsom.impl.parser.state.NGCCRuntime.sendEnterElement(NGCCRuntime.java:392)
at com.sun.xml.xsom.impl.parser.state.NGCCHandler.revertToParentFromEnterElement(NGCCHandler.java:121)
at com.sun.xml.xsom.impl.parser.state.importDecl.enterElement(importDecl.java:115)
at com.sun.xml.xsom.impl.parser.state.NGCCRuntime.startElement(NGCCRuntime.java:233)
at org.xml.sax.helpers.XMLFilterImpl.startElement(XMLFilterImpl.java:539)
at com.sun.tools.xjc.util.SubtreeCutter.startElement(SubtreeCutter.java:78)
at com.sun.tools.xjc.reader.ExtensionBindingChecker.startElement(ExtensionBindingChecker.java:120)
at org.xml.sax.helpers.XMLFilterImpl.startElement(XMLFilterImpl.java:539)
at com.sun.tools.xjc.reader.xmlschema.parser.IncorrectNamespaceURIChecker.startElement(IncorrectNamespaceURIChecker.java:98)
at org.xml.sax.helpers.XMLFilterImpl.startElement(XMLFilterImpl.java:539)
at com.sun.tools.xjc.reader.xmlschema.parser.CustomizationContextChecker.startElement(CustomizationContextChecker.java:163)
at org.xml.sax.helpers.XMLFilterImpl.startElement(XMLFilterImpl.java:539)
at com.sun.tools.xjc.reader.internalizer.DOMForestScanner$LocationResolver.startElement(DOMForestScanner.java:117)
at com.sun.xml.bind.unmarshaller.DOMScanner.visit(DOMScanner.java:214)
at com.sun.xml.bind.unmarshaller.DOMScanner.visit(DOMScanner.java:251)
at com.sun.xml.bind.unmarshaller.DOMScanner.visit(DOMScanner.java:220)
at com.sun.xml.bind.unmarshaller.DOMScanner.scan(DOMScanner.java:97)
at com.sun.tools.xjc.reader.internalizer.DOMForestScanner.scan(DOMForestScanner.java:62)
at com.sun.tools.xjc.reader.internalizer.DOMForestScanner.scan(DOMForestScanner.java:70)
at com.sun.tools.xjc.reader.internalizer.DOMForestParser.parse(DOMForestParser.java:74)
at com.sun.tools.xjc.ModelLoader$XMLSchemaParser.parse(ModelLoader.java:210)
at com.sun.xml.xsom.impl.parser.NGCCRuntimeEx.parseEntity(NGCCRuntimeEx.java:351)
at com.sun.xml.xsom.impl.parser.ParserContext.parse(ParserContext.java:98)
at com.sun.xml.xsom.parser.XSOMParser.parse(XSOMParser.java:141)
at com.sun.xml.xsom.parser.XSOMParser.parse(XSOMParser.java:130)
at com.sun.tools.xjc.ModelLoader.createXSOM(ModelLoader.java:475)
at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:240)
at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:67)
at org.apache.cxf.tools.wsdlto.databinding.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:445)
You should be able to reproduce the failure by the following steps
- editing cxf/parent/pom.xml. changing the property cxf.jaxb.runtime.version
- compile
- cd services/xkms/xkms-common/
- mvn clean install -DskipTests
Attachments
Issue Links
- is related to
-
CXF-8671 Support Jakarta EE 10
- Resolved