cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Grzegorz Grzybek (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CXF-7055) JAXB generation problems with java9
Date Tue, 13 Sep 2016 06:29:20 GMT

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

Grzegorz Grzybek commented on CXF-7055:
---------------------------------------

{noformat}
$ java -version
java version "9-ea"
Java(TM) SE Runtime Environment (build 9-ea+135-jigsaw-nightly-h5480-20160909)
Java HotSpot(TM) 64-Bit Server VM (build 9-ea+135-jigsaw-nightly-h5480-20160909, mixed mode)
{noformat}


> JAXB generation problems with java9
> -----------------------------------
>
>                 Key: CXF-7055
>                 URL: https://issues.apache.org/jira/browse/CXF-7055
>             Project: CXF
>          Issue Type: Sub-task
>    Affects Versions: 3.1.7
>            Reporter: Grzegorz Grzybek
>
> I was trying to do a full build of CXF, {{master-java9}} branch, but it complained about
missing classes which were supposed to be generated by org.apache.cxf:cxf-xjc-plugin/xsdtojava.
> I saw that:
> {code:xml}
> <jaxb:bindings version="2.1"
>   xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" 
>   xmlns:xs="http://www.w3.org/2001/XMLSchema" 
>   xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc">
>     <jaxb:bindings schemaLocation="ws-addr-wsdl.xsd">
>         <jaxb:schemaBindings>
>             <jaxb:package name="org.apache.cxf.ws.addressing.wsdl"/>
>         </jaxb:schemaBindings>
>     </jaxb:bindings>
> </jaxb:bindings>
> {code}
> binding file was not taken into account and classes were generated to {{org.w3._2006._05.addressing.wsdl}}
package.
> I started debugging everything with JDK8 and JDK9 and I saw, that, when we were at this
state:
> {noformat}
> "main@1" prio=5 tid=0x1 nid=NA runnable
>   java.lang.Thread.State: RUNNABLE
> 	  at com.sun.xml.bind.v2.runtime.JAXBContextImpl.selectRootLoader(JAXBContextImpl.java:625)
> 	  at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.selectRootLoader(UnmarshallingContext.java:458)
> 	  at com.sun.xml.bind.v2.runtime.unmarshaller.WildcardLoader.selectLoader(WildcardLoader.java:75)
> 	  at com.sun.xml.bind.v2.runtime.unmarshaller.ProxyLoader.startElement(ProxyLoader.java:58)
> 	  at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext._startElement(UnmarshallingContext.java:576)
> 	  at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.startElement(UnmarshallingContext.java:555)
> 	  at com.sun.xml.bind.v2.runtime.unmarshaller.InterningXmlVisitor.startElement(InterningXmlVisitor.java:75)
> 	  at com.sun.xml.bind.v2.runtime.unmarshaller.SAXConnector.startElement(SAXConnector.java:168)
> 	  at org.xml.sax.helpers.XMLFilterImpl.startElement(XMLFilterImpl.java:551)
> 	  at com.sun.tools.xjc.reader.xmlschema.bindinfo.ForkingFilter.startElement(ForkingFilter.java:150)
> 	  at com.sun.tools.xjc.reader.xmlschema.bindinfo.AnnotationParserFactoryImpl$1$1.startElement(AnnotationParserFactoryImpl.java:113)
> 	  at com.sun.xml.xsom.impl.parser.state.NGCCRuntime.startElement(NGCCRuntime.java:253)
> 	  at org.xml.sax.helpers.XMLFilterImpl.startElement(XMLFilterImpl.java:551)
> 	  at com.sun.tools.xjc.util.SubtreeCutter.startElement(SubtreeCutter.java:108)
> 	  at com.sun.tools.xjc.reader.ExtensionBindingChecker.startElement(ExtensionBindingChecker.java:150)
> 	  at org.xml.sax.helpers.XMLFilterImpl.startElement(XMLFilterImpl.java:551)
> 	  at com.sun.tools.xjc.reader.xmlschema.parser.IncorrectNamespaceURIChecker.startElement(IncorrectNamespaceURIChecker.java:128)
> 	  at org.xml.sax.helpers.XMLFilterImpl.startElement(XMLFilterImpl.java:551)
> 	  at com.sun.tools.xjc.reader.xmlschema.parser.CustomizationContextChecker.startElement(CustomizationContextChecker.java:193)
> 	  at org.xml.sax.helpers.XMLFilterImpl.startElement(XMLFilterImpl.java:551)
> 	  at com.sun.tools.xjc.reader.internalizer.DOMForestScanner$LocationResolver.startElement(DOMForestScanner.java:147)
> 	  at com.sun.xml.bind.unmarshaller.DOMScanner.visit(DOMScanner.java:244)
> 	  at com.sun.xml.bind.unmarshaller.DOMScanner.visit(DOMScanner.java:281)
> 	  at com.sun.xml.bind.unmarshaller.DOMScanner.visit(DOMScanner.java:250)
> 	  at com.sun.xml.bind.unmarshaller.DOMScanner.visit(DOMScanner.java:281)
> 	  at com.sun.xml.bind.unmarshaller.DOMScanner.visit(DOMScanner.java:250)
> 	  at com.sun.xml.bind.unmarshaller.DOMScanner.visit(DOMScanner.java:281)
> 	  at com.sun.xml.bind.unmarshaller.DOMScanner.visit(DOMScanner.java:250)
> 	  at com.sun.xml.bind.unmarshaller.DOMScanner.scan(DOMScanner.java:127)
> 	  at com.sun.tools.xjc.reader.internalizer.DOMForestScanner.scan(DOMForestScanner.java:92)
> 	  at com.sun.tools.xjc.reader.internalizer.DOMForestScanner.scan(DOMForestScanner.java:100)
> 	  at com.sun.tools.xjc.reader.internalizer.DOMForestParser.parse(DOMForestParser.java:104)
> 	  at com.sun.tools.xjc.ModelLoader$XMLSchemaParser.parse(ModelLoader.java:269)
> 	  at com.sun.xml.xsom.impl.parser.NGCCRuntimeEx.parseEntity(NGCCRuntimeEx.java:347)
> 	  at com.sun.xml.xsom.impl.parser.ParserContext.parse(ParserContext.java:128)
> 	  at com.sun.xml.xsom.parser.XSOMParser.parse(XSOMParser.java:171)
> 	  at com.sun.xml.xsom.parser.XSOMParser.parse(XSOMParser.java:160)
> 	  at com.sun.tools.xjc.ModelLoader.createXSOM(ModelLoader.java:534)
> 	  at com.sun.tools.xjc.ModelLoader.loadXMLSchema(ModelLoader.java:378)
> 	  at com.sun.tools.xjc.ModelLoader.load(ModelLoader.java:174)
> 	  at com.sun.tools.xjc.ModelLoader.load(ModelLoader.java:119)
> 	  at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(NativeMethodAccessorImpl.java:-1)
> 	  at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> 	  at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	  at java.lang.reflect.Method.invoke(Method.java:535)
> 	  at org.apache.cxf.maven_plugin.XSDToJavaRunner.loadModel(XSDToJavaRunner.java:231)
> 	  at org.apache.cxf.maven_plugin.XSDToJavaRunner.run(XSDToJavaRunner.java:169)
> 	  at org.apache.cxf.maven_plugin.AbstractXSDToJavaMojo.run(AbstractXSDToJavaMojo.java:336)
> 	  at org.apache.cxf.maven_plugin.AbstractXSDToJavaMojo.execute(AbstractXSDToJavaMojo.java:238)
> 	  at org.apache.cxf.maven_plugin.XSDToJavaMojo.execute(XSDToJavaMojo.java:41)
> 	  at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
> 	  at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
> 	  at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
> 	  at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
> 	  at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
> 	  at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
> 	  at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
> 	  at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
> 	  at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
> 	  at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
> 	  at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
> 	  at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
> 	  at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
> 	  at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
> 	  at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(NativeMethodAccessorImpl.java:-1)
> 	  at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> 	  at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	  at java.lang.reflect.Method.invoke(Method.java:535)
> 	  at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
> 	  at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
> 	  at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
> 	  at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
> {noformat}
> (or respective JDK8 state), where tag name was "{{&#123;http://java.sun.com/xml/ns/jaxb&#125;schemaBindings}},
{{com.sun.xml.bind.v2.runtime.JAXBContextImpl#rootMap}} was different:
> JDK8:
> {noformat}
> {
> ["http://java.sun.com/xml/ns/jaxb","class"=com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl@6cf047cf]
> ["http://java.sun.com/xml/ns/jaxb","dom"=com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl@135e49b2]
> ["http://java.sun.com/xml/ns/jaxb","factoryMethod"=com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl@7740b0ab]
> ["http://java.sun.com/xml/ns/jaxb","globalBindings"=com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl@1716c037]
> ["http://java.sun.com/xml/ns/jaxb","inlineBinaryData"=com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl@3eb9c575]
> ["http://java.sun.com/xml/ns/jaxb","javaType"=com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl@3f322610]
> ["http://java.sun.com/xml/ns/jaxb","property"=com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl@1c92a549]
> ["http://java.sun.com/xml/ns/jaxb","schemaBindings"=com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl@708769b7]
> ["http://java.sun.com/xml/ns/jaxb","typesafeEnumClass"=com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl@10b87ff6]
> ["http://java.sun.com/xml/ns/jaxb","typesafeEnumMember"=com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl@79b63325]
> ["http://java.sun.com/xml/ns/jaxb/xjc","dom"=com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl@5bb97fe7]
> ["http://java.sun.com/xml/ns/jaxb/xjc","javaType"=com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl@1e477944]
> ["http://java.sun.com/xml/ns/jaxb/xjc","substitutable"=com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl@323e026d]
> ["http://www.w3.org/2001/XMLSchema","annotation"=com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl@32e830a0]
> }
> {noformat}
> JDK9:
> {noformat}
> {
> ["","class"=com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl@55c03e4]
> ["","dom"=com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl@667a467f]
> ["","factoryMethod"=com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl@26f5e45d]
> ["","globalBindings"=com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl@7a0f06ad]
> ["","inlineBinaryData"=com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl@704c3bdf]
> ["","javaType"=com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl@37986daf]
> ["","property"=com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl@14df5253]
> ["","schemaBindings"=com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl@710afd47]
> ["","typesafeEnumClass"=com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl@1488a861]
> ["","typesafeEnumMember"=com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl@1fa9692b]
> ["http://java.sun.com/xml/ns/jaxb/xjc","dom"=com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl@324e8baa]
> ["http://java.sun.com/xml/ns/jaxb/xjc","javaType"=com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl@c82d925]
> ["http://java.sun.com/xml/ns/jaxb/xjc","substitutable"=com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl@605eb072]
> ["http://www.w3.org/2001/XMLSchema","annotation"=com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl@64420e34]
> }
> {noformat}
> Looks like JAXB initialization problem



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message