Return-Path: X-Original-To: apmail-avro-user-archive@www.apache.org Delivered-To: apmail-avro-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 645CC17CC4 for ; Tue, 6 Jan 2015 22:43:23 +0000 (UTC) Received: (qmail 17577 invoked by uid 500); 6 Jan 2015 22:43:24 -0000 Delivered-To: apmail-avro-user-archive@avro.apache.org Received: (qmail 17486 invoked by uid 500); 6 Jan 2015 22:43:24 -0000 Mailing-List: contact user-help@avro.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@avro.apache.org Delivered-To: mailing list user@avro.apache.org Received: (qmail 17476 invoked by uid 99); 6 Jan 2015 22:43:24 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Jan 2015 22:43:24 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of joey@cloudera.com designates 74.125.82.53 as permitted sender) Received: from [74.125.82.53] (HELO mail-wg0-f53.google.com) (74.125.82.53) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Jan 2015 22:43:18 +0000 Received: by mail-wg0-f53.google.com with SMTP id x13so149873wgg.40 for ; Tue, 06 Jan 2015 14:42:57 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=T6MHxxeGeVP8N9F//jiYRns1N9Y36PRwf+Gpf//uyJU=; b=UxBmYBM3nH8q3qkkcN3GisJNAssPi+JCxLigmLnnomh7oRdpRxbmSjTnlCc035sAcN qC/DPkkCF5XHaN8xR0kVJht9B7DKQoucGMBuutEEtSAkeNcpQ9NN1ap2h+DIV3ftE23x X1aSoqXG55Lqw+jCf+ad4KICmEDZoQf6eLgkUib29weZGbK2HzUBR5pY00C1XZl1F7ao 6IydAYcClvxMLKqRIxe8Gy4NE8Jpf4KoCpCEqzYcwZdOe/W5XODtddP4U0LC3TZgOo17 p5fvaHgRdMInbAuZBnmw1gT55AKt0xbgZdSynQdA+WdVO5WP/kAr5P9B98q91L3gpvz5 YrnQ== X-Gm-Message-State: ALoCoQlMO+ycHMM3V5Ik7/BNGn9a0O2kO50QfQOyaDqdayb4AV/P87nb2/JmrZtF9Ff75NUesV1E MIME-Version: 1.0 X-Received: by 10.180.186.8 with SMTP id fg8mr1054892wic.40.1420584177782; Tue, 06 Jan 2015 14:42:57 -0800 (PST) Received: by 10.194.77.204 with HTTP; Tue, 6 Jan 2015 14:42:57 -0800 (PST) In-Reply-To: References: Date: Tue, 6 Jan 2015 14:42:57 -0800 Message-ID: Subject: Re: Exception No protocol name specified for Record From: Joey Echeverria To: user@avro.apache.org Content-Type: text/plain; charset=UTF-8 X-Virus-Checked: Checked by ClamAV on apache.org 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 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