GeethanadhP / xml-avro

Convert XSD -> AVSC and XML -> AVRO
Apache License 2.0
36 stars 26 forks source link

Does this work? #6

Closed kundeng closed 5 years ago

kundeng commented 6 years ago

I tried it on a schema and it threw exceptions.

$ java -jar xml-avro.jar --debug -b . --toAvsc ../../work_nifi_airwatch/airwatc h.xsd Fri Oct 12 14:45:58 EDT 2018 INFO: Converting: C:\Users\xx\Dropbox\Dev\Tool s\xml-avro.....\work_nifi_airwatch\airwatch.xsd -> C:\Users\xx\Dropbox\D ev\Tools\xml-avro.....\work_nifi_airwatch\airwatch.avsc Exception in thread "main" in.dreamlabs.xmlavro.ConversionException at in.dreamlabs.xmlavro.XSDErrorHandler.check(Supporters.scala:57) at in.dreamlabs.xmlavro.SchemaBuilder.createSchema(SchemaBuilder.scala:5 5) at in.dreamlabs.xmlavro.Converter.convertXSD(Converter.scala:25) at in.dreamlabs.xmlavro.Converter.(Converter.scala:13) at in.dreamlabs.xmlavro.Converter$.apply(Converter.scala:52) at in.dreamlabs.xmlavro.Converter$.main(Converter.scala:49) at in.dreamlabs.xmlavro.Converter.main(Converter.scala) Caused by: ::::95:31:4467:src-resolve: Cannot resolve the name 'Id' to a(n) 'ele ment declaration' component. at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) at org.apache.xerces.impl.xs.traversers.XSDHandler.reportSchemaError(Unk nown Source) at org.apache.xerces.impl.xs.traversers.XSDHandler.reportSchemaError(Unk nown Source) at org.apache.xerces.impl.xs.traversers.XSDHandler.getGlobalDecl(Unknown Source) at org.apache.xerces.impl.xs.traversers.XSDElementTraverser.traverseLoca l(Unknown Source) at org.apache.xerces.impl.xs.traversers.XSDHandler.traverseLocalElements (Unknown Source) at org.apache.xerces.impl.xs.traversers.XSDHandler.parseSchema(Unknown S ource) 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.load(Unknown Source) at in.dreamlabs.xmlavro.SchemaBuilder.createSchema(SchemaBuilder.scala:5 2) ... 5 more

GeethanadhP commented 6 years ago

can you try using the .yml type of config or if you can can you share the xsd i can try to debug and see that the problem could be

GeethanadhP commented 5 years ago

closing as there is no response, please use yml config for anyone who may end up here and if u still get the error let me know