Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TODO -> IllegalStateException #5

Open
mamereu opened this issue Nov 11, 2018 · 0 comments
Open

TODO -> IllegalStateException #5

mamereu opened this issue Nov 11, 2018 · 0 comments

Comments

@mamereu
Copy link

mamereu commented Nov 11, 2018

I want to generate kotlin code from a xsd schema that is "well formed and valid". There is no registered namespace, so the XmlSlurper constructor is called with true, false. The error messages suggest that the code generation does not cover all use cases:

Warning: validation was turned on but an org.xml.sax.ErrorHandler was not
set, which is probably not what is desired. Parser will use a default
ErrorHandler to print the first 10 errors. Please call
the 'setErrorHandler' method to fix this.
Error: URI=null Line=2: Document root element "xs:schema", must match DOCTYPE root "null".
Error: URI=null Line=2: Document is invalid: no grammar found.
TODO add support to traverseElements() for node type: xs:element
Exception in thread "main" java.lang.IllegalStateException: TODO add support to gatherElements() for node type: xs:element
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:83)
at org.codehaus.groovy.reflection.CachedConstructor.doConstructorInvoke(CachedConstructor.java:77)
at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrap.callConstructor(ConstructorSite.java:84)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:59)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:238)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:250)
at com.javagen.schema.xml.XmlSchemaNormalizer.traverseElements(XmlSchemaNormalizer.groovy:373)
at com.javagen.schema.xml.XmlSchemaNormalizer$traverseElements$2.callCurrent(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:51)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:157)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:169)
at com.javagen.schema.xml.XmlSchemaNormalizer.buildSchema(XmlSchemaNormalizer.groovy:704)
at com.javagen.schema.xml.XmlSchemaNormalizer$buildSchema$0.callCurrent(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:51)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:157)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:177)
at com.javagen.schema.xml.XmlSchemaNormalizer.buildSchema(XmlSchemaNormalizer.groovy:652)
at com.javagen.schema.xml.XmlSchemaNormalizer.buildSchema(XmlSchemaNormalizer.groovy)
at com.javagen.schema.xml.XmlSchemaNormalizer$buildSchema.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:128)
at com.javagen.schema.kotlin.KotlinGen.gen(KotlinGen.groovy:188)
at com.javagen.schema.kotlin.KotlinGen$gen.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120)
at com.javagen.schema.kotlin.KotlinGenMain.main(KotlinGenMain.groovy:65)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants