Hi

Questions like these are better suited for the users mailing list.

You are not giving us anything to go on: which version of Maven, which
plugin(s) you are using to do schema stuff, what command you issued
when you got the error.

On Wed, Feb 15, 2012 at 2:03 PM, aneesh <[email protected]> wrote:
> Hi,
>
> I am using maven for build. while running the maven build i am getting the
> following error
>
> [ERROR] Error while parsing schema(s).Location [
> file:/C:/aneesh/test/test-schemas-jar/src/main/resources/Domain/XML_V0100.xsd{19,88}].
> org.xml.sax.SAXParseException: src-resolve: Cannot resolve the name
> 'u:Service_Request' to a(n) 'element declaration' 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.xs.traversers.XSDHandler.reportSchemaError(Unknown
> Source)
> at org.apache.xerces.impl.xs.traversers.XSDHandler.getGlobalDecl(Unknown
> Source)
> at
> org.apache.xerces.impl.xs.traversers.XSDElementTraverser.traverseLocal(Unknown
> Source)
> at
> org.apache.xerces.impl.xs.traversers.XSDHandler.traverseLocalElements(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
> com.sun.tools.xjc.reader.xmlschema.parser.SchemaConstraintChecker.check(SchemaConstraintChecker.java:106)
> at com.sun.tools.xjc.ModelLoader.loadXMLSchema(ModelLoader.java:358)
> at com.sun.tools.xjc.ModelLoader.load(ModelLoader.java:172)
> at com.sun.tools.xjc.ModelLoader.load(ModelLoader.java:118)
> at org.jvnet.mjiip.v_2_2.XJC22Mojo.loadModel(XJC22Mojo.java:45)
> at org.jvnet.mjiip.v_2_2.XJC22Mojo.doExecute(XJC22Mojo.java:35)
> at org.jvnet.mjiip.v_2_2.XJC22Mojo.doExecute(XJC22Mojo.java:22)
> at org.jvnet.jaxb2.maven2.RawXJC2Mojo.doExecute(RawXJC2Mojo.java:282)
> at org.jvnet.jaxb2.maven2.RawXJC2Mojo.execute(RawXJC2Mojo.java:147)
> at
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:105)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:577)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:324)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:247)
> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:104)
> at org.apache.maven.cli.MavenCli.execute(MavenCli.java:427)
> at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:157)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:121)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
> at java.lang.reflect.Method.invoke(Method.java:611)
> at
> org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
> at
> org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
> at
> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
> at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
> xsd snapshot as follows:
> <xs:choice>
> <xs:element ref="u:Service_Request" minOccurs="0"/>
> <xs:element ref="u:Service_Response" minOccurs="0"/>
> </xs:choice>
>
> and the namespace is correctly defined. i have validated the same using xml
> spy. validation was successfuly. I am not sure why it is failing when
> running the maven build. Could you please help meout.
>
> Regards,
> Aneesh
>
> --
> View this message in context: 
> http://maven.40175.n5.nabble.com/Error-while-parsing-schema-tp5485975p5485975.html
> Sent from the Maven Developers mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>



-- 
Dennis Lundberg

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to