You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Andriy Redko (Jira)" <ji...@apache.org> on 2022/01/11 00:45:00 UTC

[jira] [Resolved] (CXFXJC-41) Regression with JAXB 2.3.5 / 3.x: "http://schemas.xmlsoap.org/wsdl/" is not a part of this compilation

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

Andriy Redko resolved CXFXJC-41.
--------------------------------
    Resolution: Fixed

> Regression with JAXB 2.3.5 / 3.x: "http://schemas.xmlsoap.org/wsdl/" is not a part of this compilation
> ------------------------------------------------------------------------------------------------------
>
>                 Key: CXFXJC-41
>                 URL: https://issues.apache.org/jira/browse/CXFXJC-41
>             Project: CXF XJC Utils
>          Issue Type: Bug
>    Affects Versions: 3.3.1
>            Reporter: Andriy Redko
>            Assignee: Andriy Redko
>            Priority: Major
>             Fix For: 4.0.0, 3.3.2
>
>
> Interesting regression has been observed with JAXB 2.3.5 and 3.x: the CXF builds are failing with :
>  
> {noformat}
> [ERROR] rt\wsdl\src\test\resources\schemas\wsdl\test-conf.xjb [25:88]: "http://schemas.xmlsoap.org/wsdl/" is not a part of this compilation. Is this a mistake for "file:core/src/main/resources/schemas/wsdl/wsdl.xsd"?                                                                                
> com.sun.istack.SAXParseException2; systemId: file:/rt/wsdl/src/test/resources/schemas/wsdl/test-conf.xjb; lineNumber: 25; columnNumber: 88; "http://schemas.xmlsoap.org/wsdl/" is not a part of this compilation. Is this a mistake for "file:core/src/main/resources/schemas/wsdl/wsdl.xsd"?           
>         at com.sun.tools.xjc.reader.internalizer.Internalizer.reportError(Internalizer.java:570)                                                                                                         
>         at com.sun.tools.xjc.reader.internalizer.Internalizer.reportError(Internalizer.java:563)                                                                                                         
>         at com.sun.tools.xjc.reader.internalizer.Internalizer.buildTargetNodeMap(Internalizer.java:206)                                                                                                  
>         at com.sun.tools.xjc.reader.internalizer.Internalizer.buildTargetNodeMap(Internalizer.java:335)                                                                                                  
>         at com.sun.tools.xjc.reader.internalizer.Internalizer.transform(Internalizer.java:116)                                                                                                           
>         at com.sun.tools.xjc.reader.internalizer.Internalizer.transform(Internalizer.java:77)                                                                                                            
>         at com.sun.tools.xjc.reader.internalizer.DOMForest.transform(DOMForest.java:429)                                                                                                                 
>         at com.sun.tools.xjc.ModelLoader.buildDOMForest(ModelLoader.java:286)                                                                                                                            
>         at com.sun.tools.xjc.ModelLoader.loadXMLSchema(ModelLoader.java:318)                                                                                                                             
>         at com.sun.tools.xjc.ModelLoader.load(ModelLoader.java:121)                                                                                                                                      
>         at com.sun.tools.xjc.ModelLoader.load(ModelLoader.java:76)                                                                                                                                       
>         at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)                                                                                                                
>         at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)                                                                                              
>         at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)                                                                                      
>         at java.base/java.lang.reflect.Method.invoke(Method.java:568)                                                                                                                                    
>         at org.apache.cxf.maven_plugin.XSDToJavaRunner.loadModel(XSDToJavaRunner.java:224)                                                                                                               
>         at org.apache.cxf.maven_plugin.XSDToJavaRunner.run(XSDToJavaRunner.java:174)                                                                                                                     
>         at org.apache.cxf.maven_plugin.XSDToJavaRunner.main(XSDToJavaRunner.java:360)                                                                                                                                                                                                         
>         at org.apache.cxf.maven_plugin.XSDToJavaRunner.loadModel(XSDToJavaRunner.java:224)                                                                                                               
>         at org.apache.cxf.maven_plugin.XSDToJavaRunner.run(XSDToJavaRunner.java:174)                                                                                                                     
>         at org.apache.cxf.maven_plugin.XSDToJavaRunner.main(XSDToJavaRunner.java:360)                                                                                                                     {noformat}
> It turned out, it is related to the change of how `systemId` is being passed through: previously, it was passed along with the `InputSource` in `DOMForest` by calling this method:
> {noformat}
>     /**
>      * Parses an XML at the given location (
>      * and XMLs referenced by it) into DOM trees
>      * and stores them to this forest.
>      * 
>      * @return the parsed DOM document object.
>      */
>     public Document parse( String systemId, boolean root ) throws SAXException, IOException {
>         ... 
>         // but we still use the original system Id as the key.
>         return parse( systemId, is, root );
>     } {noformat}
> But the latest runtimes were changed to use this method instead:
> {noformat}
>     public Document parse( InputSource source, boolean root ) throws SAXException {
>         if( source.getSystemId()==null )
>             throw new IllegalArgumentException();
>         
>         return parse( source.getSystemId(), source, root );
>     } {noformat}
> As the result, the `systemId` was stopped to resolve in certain cases.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)