[ 
https://issues.apache.org/jira/browse/GORA-63?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13160137#comment-13160137
 ] 

Lewis John McGibbney commented on GORA-63:
------------------------------------------

Hi Enis. I am not using Git, but when I applied your changes to my SVN working 
copy I get the following

{code}

lewis@lewis-desktop:~/ASF/gora_trunk$ bin/compile-examples.sh
Compiling gora-core/src/examples/avro/employee.json
Compiling gora-core/src/examples/avro/tokendatum.json
Compiling gora-core/src/examples/avro/webpage.json
Exception in thread "main" org.apache.avro.AvroRuntimeException: Not a map: 
{"type":"array","items":"string"}
        at org.apache.avro.Schema.getValueType(Schema.java:274)
        at org.apache.gora.compiler.GoraCompiler.compile(GoraCompiler.java:327)
        at org.apache.gora.compiler.GoraCompiler.compile(GoraCompiler.java:123)
        at 
org.apache.gora.compiler.GoraCompiler.compileSchema(GoraCompiler.java:63)
        at org.apache.gora.compiler.GoraCompiler.main(GoraCompiler.java:448)

{code}

When I view the changes to my files locally, I get the following, quite strange 
output.

{code}
lewis@lewis-desktop:~/ASF/gora_trunk$ svn status
M       gora-core/src/main/java/org/apache/gora/compiler/GoraCompiler.java
M       
gora-core/src/examples/java/org/apache/gora/examples/generated/WebPage.java
{code} 

Then finally when I look at the changes to WebPage.java I get

{code}
Index: 
gora-core/src/examples/java/org/apache/gora/examples/generated/WebPage.java
===================================================================
--- 
gora-core/src/examples/java/org/apache/gora/examples/generated/WebPage.java(revision
 1205345)
+++ 
gora-core/src/examples/java/org/apache/gora/examples/generated/WebPage.java(working
 copy)
@@ -93,33 +93,3 @@
   public void setContent(ByteBuffer value) {
     put(1, value);
   }
-  public GenericArray<Utf8> getParsedContent() {
-    return (GenericArray<Utf8>) get(2);
-  }
-  public void addToParsedContent(Utf8 element) {
-    getStateManager().setDirty(this, 2);
-    parsedContent.add(element);
-  }
-  public Map<Utf8, Utf8> getOutlinks() {
-    return (Map<Utf8, Utf8>) get(3);
-  }
-  public Utf8 getFromOutlinks(Utf8 key) {
-    if (outlinks == null) { return null; }
-    return outlinks.get(key);
-  }
-  public void putToOutlinks(Utf8 key, Utf8 value) {
-    getStateManager().setDirty(this, 3);
-    outlinks.put(key, value);
-  }
-  public Utf8 removeFromOutlinks(Utf8 key) {
-    if (outlinks == null) { return null; }
-    getStateManager().setDirty(this, 3);
-    return outlinks.remove(key);
-  }
-  public Metadata getMetadata() {
-    return (Metadata) get(4);
-  }
-  public void setMetadata(Metadata value) {
-    put(4, value);
-  }
-}


{code}
                
> bin/compile-examples.sh does not work
> -------------------------------------
>
>                 Key: GORA-63
>                 URL: https://issues.apache.org/jira/browse/GORA-63
>             Project: Gora
>          Issue Type: Bug
>            Reporter: Enis Soztutar
>         Attachments: GORA-63_v1.patch
>
>
> As reported by Lewis at gora-dev, bin/compile-examples.sh does not work. The 
> reported exception is: 
> {code}
> lewis@lewis-01:~/ASF/gora$ bin/compile-examples.sh
> Compiling gora-core/src/examples/avro/employee.json
> Compiling gora-core/src/examples/avro/tokendatum.json
> Compiling gora-core/src/examples/avro/webpage.json
> Exception in thread "main" org.apache.avro.SchemaParseException: Map has no
> values type: {"type":"map","items":"string"}
>    at org.apache.avro.Schema.parse(Schema.java:938)
>    at org.apache.avro.Schema.parse(Schema.java:912)
>    at org.apache.avro.Schema.parse(Schema.java:796)
>    at
> org.apache.gora.compiler.GoraCompiler.compileSchema(GoraCompiler.java:62)
>    at org.apache.gora.compiler.GoraCompiler.main(GoraCompiler.java:448)
> Compiling gora-core/src/examples/avro/webpage.json~
> Exception in thread "main" org.apache.avro.SchemaParseException: Array has
> no items type: {"type":"array","values":"string"}
>    at org.apache.avro.Schema.parse(Schema.java:933)
>    at org.apache.avro.Schema.parse(Schema.java:912)
>    at org.apache.avro.Schema.parse(Schema.java:796)
>    at
> org.apache.gora.compiler.GoraCompiler.compileSchema(GoraCompiler.java:62)
>    at org.apache.gora.compiler.GoraCompiler.main(GoraCompiler.java:448)
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to