You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by aneesh <a....@gmail.com> on 2012/02/15 14:04:59 UTC

error while parsing shema(s)

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-shema-s-tp5485984p5485984.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: error while parsing shema(s)

Posted by Wayne Fay <wa...@gmail.com>.
> I am using maven for build. while running the maven build i am getting the
> following error

Yes, your build uses Maven, but this error is coming from one of your
plugins. It appears to be coming from...
> at org.jvnet.jaxb2.maven2.RawXJC2Mojo.execute(RawXJC2Mojo.java:147)

Please contact the jaxb2 Maven plugin people for support:
http://java.net/projects/maven-jaxb2-plugin/pages/Home

Wayne

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org