You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@gora.apache.org by "Kazuomi Kashii (JIRA)" <ji...@apache.org> on 2012/05/16 17:59:02 UTC

[jira] [Created] (GORA-133) GoraCompiler cannot compile array type.

Kazuomi Kashii created GORA-133:
-----------------------------------

             Summary: GoraCompiler cannot compile array type.
                 Key: GORA-133
                 URL: https://issues.apache.org/jira/browse/GORA-133
             Project: Apache Gora
          Issue Type: Bug
          Components: schema
            Reporter: Kazuomi Kashii
         Attachments: GORA-133.patch

test.json has:
    { "name": "arrayString", "type": { "type" : "array", "items" : "string" } },
bin/gora compile test.json .
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/gora/compiler/GoraCompiler
Caused by: java.lang.ClassNotFoundException: org.apache.gora.compiler.GoraCompiler
	at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:247)

Here is the path to fix this issue:

diff --git gora-core/src/main/java/org/apache/gora/compiler/GoraCompiler.java gora-core/src/main/java/org/apache/gora/compiler/GoraCompiler.java
index cf0ca83..ec1e53d 100644
--- gora-core/src/main/java/org/apache/gora/compiler/GoraCompiler.java
+++ gora-core/src/main/java/org/apache/gora/compiler/GoraCompiler.java
@@ -324,7 +324,7 @@ public class GoraCompiler {
             break;
           case ARRAY:
             unboxed = unbox(fieldSchema.getElementType());
-            fieldType = type(fieldSchema.getValueType());
+            fieldType = type(fieldSchema.getElementType());
             line(1, "public GenericArray<"+fieldType+"> get"+camelKey+"() {");
             line(2, "return (GenericArray<"+fieldType+">) get("+i+");");
             line(1, "}");


--
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

        

[jira] [Updated] (GORA-133) GoraCompiler cannot compile array type.

Posted by "Kazuomi Kashii (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GORA-133?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kazuomi Kashii updated GORA-133:
--------------------------------

    Description: 
test.json has:
    { "name": "arrayString", "type": { "type" : "array", "items" : "string" } },
bin/gora compile test.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)

Here is the path to fix this issue:

diff --git gora-core/src/main/java/org/apache/gora/compiler/GoraCompiler.java gora-core/src/main/java/org/apache/gora/compiler/GoraCompiler.java
index cf0ca83..ec1e53d 100644
--- gora-core/src/main/java/org/apache/gora/compiler/GoraCompiler.java
+++ gora-core/src/main/java/org/apache/gora/compiler/GoraCompiler.java
@@ -324,7 +324,7 @@ public class GoraCompiler {
             break;
           case ARRAY:
             unboxed = unbox(fieldSchema.getElementType());
-            fieldType = type(fieldSchema.getValueType());
+            fieldType = type(fieldSchema.getElementType());
             line(1, "public GenericArray<"+fieldType+"> get"+camelKey+"() {");
             line(2, "return (GenericArray<"+fieldType+">) get("+i+");");
             line(1, "}");


  was:
test.json has:
    { "name": "arrayString", "type": { "type" : "array", "items" : "string" } },
bin/gora compile test.json .
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/gora/compiler/GoraCompiler
Caused by: java.lang.ClassNotFoundException: org.apache.gora.compiler.GoraCompiler
	at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:247)

Here is the path to fix this issue:

diff --git gora-core/src/main/java/org/apache/gora/compiler/GoraCompiler.java gora-core/src/main/java/org/apache/gora/compiler/GoraCompiler.java
index cf0ca83..ec1e53d 100644
--- gora-core/src/main/java/org/apache/gora/compiler/GoraCompiler.java
+++ gora-core/src/main/java/org/apache/gora/compiler/GoraCompiler.java
@@ -324,7 +324,7 @@ public class GoraCompiler {
             break;
           case ARRAY:
             unboxed = unbox(fieldSchema.getElementType());
-            fieldType = type(fieldSchema.getValueType());
+            fieldType = type(fieldSchema.getElementType());
             line(1, "public GenericArray<"+fieldType+"> get"+camelKey+"() {");
             line(2, "return (GenericArray<"+fieldType+">) get("+i+");");
             line(1, "}");


    
> GoraCompiler cannot compile array type.
> ---------------------------------------
>
>                 Key: GORA-133
>                 URL: https://issues.apache.org/jira/browse/GORA-133
>             Project: Apache Gora
>          Issue Type: Bug
>          Components: schema
>            Reporter: Kazuomi Kashii
>         Attachments: GORA-133.patch
>
>
> test.json has:
>     { "name": "arrayString", "type": { "type" : "array", "items" : "string" } },
> bin/gora compile test.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)
> Here is the path to fix this issue:
> diff --git gora-core/src/main/java/org/apache/gora/compiler/GoraCompiler.java gora-core/src/main/java/org/apache/gora/compiler/GoraCompiler.java
> index cf0ca83..ec1e53d 100644
> --- gora-core/src/main/java/org/apache/gora/compiler/GoraCompiler.java
> +++ gora-core/src/main/java/org/apache/gora/compiler/GoraCompiler.java
> @@ -324,7 +324,7 @@ public class GoraCompiler {
>              break;
>            case ARRAY:
>              unboxed = unbox(fieldSchema.getElementType());
> -            fieldType = type(fieldSchema.getValueType());
> +            fieldType = type(fieldSchema.getElementType());
>              line(1, "public GenericArray<"+fieldType+"> get"+camelKey+"() {");
>              line(2, "return (GenericArray<"+fieldType+">) get("+i+");");
>              line(1, "}");

--
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

        

[jira] [Updated] (GORA-133) GoraCompiler cannot compile array type.

Posted by "Kazuomi Kashii (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GORA-133?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kazuomi Kashii updated GORA-133:
--------------------------------

    Description: 
test.json has:
    { "name": "arrayString", "type": { "type" : "array", "items" : "string" } },
bin/gora compile test.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)

Here is the patch to fix this issue:

diff --git gora-core/src/main/java/org/apache/gora/compiler/GoraCompiler.java gora-core/src/main/java/org/apache/gora/compiler/GoraCompiler.java
index cf0ca83..ec1e53d 100644
--- gora-core/src/main/java/org/apache/gora/compiler/GoraCompiler.java
+++ gora-core/src/main/java/org/apache/gora/compiler/GoraCompiler.java
@@ -324,7 +324,7 @@ public class GoraCompiler {
             break;
           case ARRAY:
             unboxed = unbox(fieldSchema.getElementType());
-            fieldType = type(fieldSchema.getValueType());
+            fieldType = type(fieldSchema.getElementType());
             line(1, "public GenericArray<"+fieldType+"> get"+camelKey+"() {");
             line(2, "return (GenericArray<"+fieldType+">) get("+i+");");
             line(1, "}");


  was:
test.json has:
    { "name": "arrayString", "type": { "type" : "array", "items" : "string" } },
bin/gora compile test.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)

Here is the path to fix this issue:

diff --git gora-core/src/main/java/org/apache/gora/compiler/GoraCompiler.java gora-core/src/main/java/org/apache/gora/compiler/GoraCompiler.java
index cf0ca83..ec1e53d 100644
--- gora-core/src/main/java/org/apache/gora/compiler/GoraCompiler.java
+++ gora-core/src/main/java/org/apache/gora/compiler/GoraCompiler.java
@@ -324,7 +324,7 @@ public class GoraCompiler {
             break;
           case ARRAY:
             unboxed = unbox(fieldSchema.getElementType());
-            fieldType = type(fieldSchema.getValueType());
+            fieldType = type(fieldSchema.getElementType());
             line(1, "public GenericArray<"+fieldType+"> get"+camelKey+"() {");
             line(2, "return (GenericArray<"+fieldType+">) get("+i+");");
             line(1, "}");


    
> GoraCompiler cannot compile array type.
> ---------------------------------------
>
>                 Key: GORA-133
>                 URL: https://issues.apache.org/jira/browse/GORA-133
>             Project: Apache Gora
>          Issue Type: Bug
>          Components: schema
>            Reporter: Kazuomi Kashii
>         Attachments: GORA-133.patch
>
>
> test.json has:
>     { "name": "arrayString", "type": { "type" : "array", "items" : "string" } },
> bin/gora compile test.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)
> Here is the patch to fix this issue:
> diff --git gora-core/src/main/java/org/apache/gora/compiler/GoraCompiler.java gora-core/src/main/java/org/apache/gora/compiler/GoraCompiler.java
> index cf0ca83..ec1e53d 100644
> --- gora-core/src/main/java/org/apache/gora/compiler/GoraCompiler.java
> +++ gora-core/src/main/java/org/apache/gora/compiler/GoraCompiler.java
> @@ -324,7 +324,7 @@ public class GoraCompiler {
>              break;
>            case ARRAY:
>              unboxed = unbox(fieldSchema.getElementType());
> -            fieldType = type(fieldSchema.getValueType());
> +            fieldType = type(fieldSchema.getElementType());
>              line(1, "public GenericArray<"+fieldType+"> get"+camelKey+"() {");
>              line(2, "return (GenericArray<"+fieldType+">) get("+i+");");
>              line(1, "}");

--
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

        

[jira] [Updated] (GORA-133) GoraCompiler cannot compile array type.

Posted by "Kazuomi Kashii (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GORA-133?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kazuomi Kashii updated GORA-133:
--------------------------------

    Attachment: GORA-133.patch
    
> GoraCompiler cannot compile array type.
> ---------------------------------------
>
>                 Key: GORA-133
>                 URL: https://issues.apache.org/jira/browse/GORA-133
>             Project: Apache Gora
>          Issue Type: Bug
>          Components: schema
>            Reporter: Kazuomi Kashii
>         Attachments: GORA-133.patch
>
>
> test.json has:
>     { "name": "arrayString", "type": { "type" : "array", "items" : "string" } },
> bin/gora compile test.json .
> Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/gora/compiler/GoraCompiler
> Caused by: java.lang.ClassNotFoundException: org.apache.gora.compiler.GoraCompiler
> 	at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
> 	at java.security.AccessController.doPrivileged(Native Method)
> 	at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
> 	at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
> 	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
> 	at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
> Here is the path to fix this issue:
> diff --git gora-core/src/main/java/org/apache/gora/compiler/GoraCompiler.java gora-core/src/main/java/org/apache/gora/compiler/GoraCompiler.java
> index cf0ca83..ec1e53d 100644
> --- gora-core/src/main/java/org/apache/gora/compiler/GoraCompiler.java
> +++ gora-core/src/main/java/org/apache/gora/compiler/GoraCompiler.java
> @@ -324,7 +324,7 @@ public class GoraCompiler {
>              break;
>            case ARRAY:
>              unboxed = unbox(fieldSchema.getElementType());
> -            fieldType = type(fieldSchema.getValueType());
> +            fieldType = type(fieldSchema.getElementType());
>              line(1, "public GenericArray<"+fieldType+"> get"+camelKey+"() {");
>              line(2, "return (GenericArray<"+fieldType+">) get("+i+");");
>              line(1, "}");

--
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

        

[jira] [Resolved] (GORA-133) GoraCompiler cannot compile array type.

Posted by "Lewis John McGibbney (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GORA-133?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lewis John McGibbney resolved GORA-133.
---------------------------------------

       Resolution: Fixed
    Fix Version/s: 0.3

Committed @revision 1339274 in trunk
Thank you very much for the contribution. This one was well overdue and slipped through the net. 
                
> GoraCompiler cannot compile array type.
> ---------------------------------------
>
>                 Key: GORA-133
>                 URL: https://issues.apache.org/jira/browse/GORA-133
>             Project: Apache Gora
>          Issue Type: Bug
>          Components: schema
>            Reporter: Kazuomi Kashii
>             Fix For: 0.3
>
>         Attachments: GORA-133.patch
>
>
> test.json has:
>     { "name": "arrayString", "type": { "type" : "array", "items" : "string" } },
> bin/gora compile test.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)
> Here is the patch to fix this issue:
> diff --git gora-core/src/main/java/org/apache/gora/compiler/GoraCompiler.java gora-core/src/main/java/org/apache/gora/compiler/GoraCompiler.java
> index cf0ca83..ec1e53d 100644
> --- gora-core/src/main/java/org/apache/gora/compiler/GoraCompiler.java
> +++ gora-core/src/main/java/org/apache/gora/compiler/GoraCompiler.java
> @@ -324,7 +324,7 @@ public class GoraCompiler {
>              break;
>            case ARRAY:
>              unboxed = unbox(fieldSchema.getElementType());
> -            fieldType = type(fieldSchema.getValueType());
> +            fieldType = type(fieldSchema.getElementType());
>              line(1, "public GenericArray<"+fieldType+"> get"+camelKey+"() {");
>              line(2, "return (GenericArray<"+fieldType+">) get("+i+");");
>              line(1, "}");

--
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

        

[jira] [Closed] (GORA-133) GoraCompiler cannot compile array type.

Posted by "Lewis John McGibbney (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GORA-133?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lewis John McGibbney closed GORA-133.
-------------------------------------

    
> GoraCompiler cannot compile array type.
> ---------------------------------------
>
>                 Key: GORA-133
>                 URL: https://issues.apache.org/jira/browse/GORA-133
>             Project: Apache Gora
>          Issue Type: Bug
>          Components: schema
>            Reporter: Kazuomi Kashii
>             Fix For: 0.2.1
>
>         Attachments: GORA-133.patch
>
>
> test.json has:
>     { "name": "arrayString", "type": { "type" : "array", "items" : "string" } },
> bin/gora compile test.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)
> Here is the patch to fix this issue:
> diff --git gora-core/src/main/java/org/apache/gora/compiler/GoraCompiler.java gora-core/src/main/java/org/apache/gora/compiler/GoraCompiler.java
> index cf0ca83..ec1e53d 100644
> --- gora-core/src/main/java/org/apache/gora/compiler/GoraCompiler.java
> +++ gora-core/src/main/java/org/apache/gora/compiler/GoraCompiler.java
> @@ -324,7 +324,7 @@ public class GoraCompiler {
>              break;
>            case ARRAY:
>              unboxed = unbox(fieldSchema.getElementType());
> -            fieldType = type(fieldSchema.getValueType());
> +            fieldType = type(fieldSchema.getElementType());
>              line(1, "public GenericArray<"+fieldType+"> get"+camelKey+"() {");
>              line(2, "return (GenericArray<"+fieldType+">) get("+i+");");
>              line(1, "}");

--
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

        

[jira] [Updated] (GORA-133) GoraCompiler cannot compile array type.

Posted by "Lewis John McGibbney (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GORA-133?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lewis John McGibbney updated GORA-133:
--------------------------------------

    Fix Version/s:     (was: 0.3)
                   0.2.1
    
> GoraCompiler cannot compile array type.
> ---------------------------------------
>
>                 Key: GORA-133
>                 URL: https://issues.apache.org/jira/browse/GORA-133
>             Project: Apache Gora
>          Issue Type: Bug
>          Components: schema
>            Reporter: Kazuomi Kashii
>             Fix For: 0.2.1
>
>         Attachments: GORA-133.patch
>
>
> test.json has:
>     { "name": "arrayString", "type": { "type" : "array", "items" : "string" } },
> bin/gora compile test.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)
> Here is the patch to fix this issue:
> diff --git gora-core/src/main/java/org/apache/gora/compiler/GoraCompiler.java gora-core/src/main/java/org/apache/gora/compiler/GoraCompiler.java
> index cf0ca83..ec1e53d 100644
> --- gora-core/src/main/java/org/apache/gora/compiler/GoraCompiler.java
> +++ gora-core/src/main/java/org/apache/gora/compiler/GoraCompiler.java
> @@ -324,7 +324,7 @@ public class GoraCompiler {
>              break;
>            case ARRAY:
>              unboxed = unbox(fieldSchema.getElementType());
> -            fieldType = type(fieldSchema.getValueType());
> +            fieldType = type(fieldSchema.getElementType());
>              line(1, "public GenericArray<"+fieldType+"> get"+camelKey+"() {");
>              line(2, "return (GenericArray<"+fieldType+">) get("+i+");");
>              line(1, "}");

--
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