Can you send the definition of the ant task that you're using to parse it? -Joey
On Tue, Jan 6, 2015 at 1:50 PM, Lewis John Mcgibbney <lewis.mcgibb...@gmail.com> wrote: > Hi Folks, > I have the following small schema > > { > "name": "Host", > "type": "record", > "namespace": "org.apache.nutch.storage", > "doc": "Host represents a store of webpages or other data which resides on > a server or other computer so that it can be accessed over the Internet", > "fields": [ > { > "name": "metadata", > "type": { > "type": "map", > "values": ["null","bytes"] > }, > "doc": "A multivalued metadata container used for storing a wide > variety of host metadata such as structured web server characterists etc", > "default": { > > } > }, > { > "name": "outlinks", > "type": { > "type": "map", > "values": ["null","string"] > }, > "doc": "Hyperlinks which direct outside of the current host domain > these can used in a histogram style manner to generate host statistics", > "default": { > > } > }, > { > "name": "inlinks", > "type": { > "type": "map", > "values": ["null","string"] > }, > "doc": "Hyperlinks which link to pages within the current host domain > these can used in a histogram style manner to generate host statistics", > "default": { > > } > } > ] > } > > > When I use Avro 1.7.6 to parse it via an Ant task, I am getting the > following parse exception > > [java] Caused by: org.apache.avro.SchemaParseException: No protocol > name specified: > {"name":"Host","type":"record","namespace":"org.apache.nutch.storage","doc":"Host > represents a store of webpages or other data which resides on a server or > other computer so that it can be accessed over the > Internet","fields":[{"name":"metadata","type":{"type":"map","values":["null","bytes"]},"doc":"A > multivalued metadata container used for storing a wide variety of host > metadata such as structured web server characterists > etc","default":{}},{"name":"outlinks","type":{"type":"map","values":["null","string"]},"doc":"Hyperlinks > which direct outside of the current host domain these can used in a > histogram style manner to generate host > statistics","default":{}},{"name":"inlinks","type":{"type":"map","values":["null","string"]},"doc":"Hyperlinks > which link to pages within the current host domain these can used in a > histogram style manner to generate host statistics","default":{}}]} > [java] at org.apache.avro.Protocol.parseName(Protocol.java:426) > [java] at org.apache.avro.Protocol.parse(Protocol.java:399) > [java] at org.apache.avro.Protocol.parse(Protocol.java:390) > [java] at org.apache.avro.Protocol.parse(Protocol.java:361) > [java] at > org.apache.avro.compiler.specific.SpecificCompiler.compileProtocol(SpecificCompiler.java:248) > [java] at > org.apache.avro.compiler.specific.SpecificCompiler.compileProtocol(SpecificCompiler.java:238) > [java] at > org.apache.avro.compiler.specific.SpecificCompiler.main(SpecificCompiler.java:719) > [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native > Method) > [java] at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) > [java] at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > [java] at java.lang.reflect.Method.invoke(Method.java:606) > [java] at > org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:217) > [java] at > org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:152) > [java] ... 20 more > [java] Java Result: -1 > > The thing is that I do not wish this to be a Protocol as such, it is merely > a simple Schema. Can anyone help me out to debug this? > Thank you > Lewis > > -- > Lewis -- Joey Echeverria