cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Kulp (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (CXF-2599) cxf-codgen-plugin cannot resolve xs:group element referenced in an XSD
Date Tue, 05 Jan 2010 15:52:54 GMT

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

Daniel Kulp resolved CXF-2599.
------------------------------

       Resolution: Fixed
    Fix Version/s: 2.2.6


Confirmed this is now resolved with the latest fixes.

> cxf-codgen-plugin cannot resolve xs:group element referenced in an XSD
> ----------------------------------------------------------------------
>
>                 Key: CXF-2599
>                 URL: https://issues.apache.org/jira/browse/CXF-2599
>             Project: CXF
>          Issue Type: Bug
>          Components: Tooling
>    Affects Versions: 2.2.5
>         Environment: $ mvn --version
> Apache Maven 2.2.1 (r801777; 2009-08-06 14:16:01-0500)
> Java version: 1.6.0
> Java home: D:\Program Files\IBM\RAD75\jdk\jre
> Default locale: en_US, platform encoding: Cp1252
> OS name: "windows xp" version: "5.1 build 2600 service pack 3" arch: "x86" Family: "windows"
>            Reporter: Craig Tataryn
>            Assignee: Daniel Kulp
>            Priority: Critical
>             Fix For: 2.2.6
>
>         Attachments: CXFSchemaRefProblem.zip, runtime schemas.jpg
>
>
> In an attempt to isolate XSDs from WSDLs such that we have one and only one Maven module
containing XSDs I have run into the following problem when running cxf-codegen-plugin from
a module separated from the XSD module:
> {code:title=stack trace}
> [INFO] Schema Error : src-resolve: Cannot resolve the name 'InfrastructureRootElements'
to a(n) 'group' component.
> [INFO] ------------------------------------------------------------------------
> [INFO] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException: Schema Error : src-resolve: Cannot
resolve the name 'InfrastructureRootElements' to a(n) 'group' component.
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
>         at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:45)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
>         at java.lang.reflect.Method.invoke(Method.java:599)
>         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: org.apache.maven.plugin.MojoExecutionException: Schema Error : src-resolve:
Cannot resolve the name 'InfrastructureRootElements' to a(n) 'group' component.
>         at org.apache.cxf.maven_plugin.WSDL2JavaMojo.processWsdl(WSDL2JavaMojo.java:482)
>         at org.apache.cxf.maven_plugin.WSDL2JavaMojo.execute(WSDL2JavaMojo.java:387)
>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
>         ... 17 more
> Caused by: org.apache.cxf.tools.common.ToolException: Schema Error : src-resolve: Cannot
resolve the name 'InfrastructureRootElements' to a(n) 'group' component.
>         at org.apache.cxf.tools.wsdlto.databinding.jaxb.JAXBDataBinding.validateSchema(JAXBDataBinding.java:667)
>         at org.apache.cxf.tools.wsdlto.databinding.jaxb.JAXBDataBinding.addSchemas(JAXBDataBinding.java:399)
>         at org.apache.cxf.tools.wsdlto.databinding.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:313)
>         at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.generateTypes(WSDLToJavaContainer.java:576)
>         at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.processWsdl(WSDLToJavaContainer.java:228)
>         at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:128)
>         at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:271)
>         at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:103)
>         at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:113)
>         at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:86)
>         at org.apache.cxf.maven_plugin.WSDL2JavaMojo.processWsdl(WSDL2JavaMojo.java:479)
>         ... 20 more
> Caused by: org.xml.sax.SAXParseException: src-resolve: Cannot resolve the name 'InfrastructureRootElements'
to a(n) 'group' component.
>         at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown
Source)
>         at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
>         at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
>         at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
>         at org.apache.xerces.impl.xs.traversers.XSDHandler.reportSchemaError(Unknown
Source)
>         at org.apache.xerces.impl.xs.traversers.XSDHandler.getGlobalDecl(Unknown Source)
>         at org.apache.xerces.impl.xs.traversers.XSDGroupTraverser.traverseLocal(Unknown
Source)
>         at org.apache.xerces.impl.xs.traversers.XSDAbstractParticleTraverser.traverseSeqChoice(Unknown
Source)
>         at org.apache.xerces.impl.xs.traversers.XSDAbstractParticleTraverser.traverseSequence(Unknown
Source)
>         at org.apache.xerces.impl.xs.traversers.XSDComplexTypeTraverser.processComplexContent(Unknown
Source)
>         at org.apache.xerces.impl.xs.traversers.XSDComplexTypeTraverser.traverseComplexTypeDecl(Unknown
Source)
>         at org.apache.xerces.impl.xs.traversers.XSDComplexTypeTraverser.traverseGlobal(Unknown
Source)
>         at org.apache.xerces.impl.xs.traversers.XSDHandler.traverseSchemas(Unknown Source)
>         at org.apache.xerces.impl.xs.traversers.XSDHandler.parseSchema(Unknown Source)
>         at org.apache.xerces.impl.xs.XMLSchemaLoader.loadSchema(Unknown Source)
>         at org.apache.xerces.impl.xs.XMLSchemaLoader.loadGrammar(Unknown Source)
>         at org.apache.xerces.impl.xs.XMLSchemaLoader.loadGrammar(Unknown Source)
>         at org.apache.xerces.jaxp.validation.XMLSchemaFactory.newSchema(Unknown Source)
>         at javax.xml.validation.SchemaFactory.newSchema(Unknown Source)
>         at org.apache.cxf.tools.wsdlto.databinding.jaxb.JAXBDataBinding.validateSchema(JAXBDataBinding.java:662)
>         ... 30 more
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 8 minutes 35 seconds
> [INFO] Finished at: Wed Dec 30 12:11:35 CST 2009
> [INFO] Final Memory: 31M/156M
> [INFO] ------------------------------------------------------------------------
> {code}
> If the XSDs are located within the *same* project that is running cxf-codegen-plugin,
everything works fine.  It's only when the XSDs are being referenced from the classpath that
this problem occures.
> The error above originates when parsing FICR_IN110304CA.xsd, it references a schema named
FICR_MT510401.xsd and within that schema (on line 105) there is an xs:group element like so:
> {{<xs:group ref="InfrastructureRootElements"/>}}
> InfrastructureRootElements is supposed to be imported via the statement on line 86 of
that same schema:
> {{<xs:include schemaLocation="../coreschemas/infrastructureRoot.xsd"/>}}
> I've attached a sample project which replicates the problem.  unzip the project and execute
a {{mvn clean install}} within the CXFSchemaRefProblemPom directory.
> I've also attached a variables view of the schema references loaded at runtime from my
IDE when this error occures.  The reference to infrastructureRoot.xsd looks to be proper to
me.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message