[
https://issues.apache.org/jira/browse/GORA-332?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14009639#comment-14009639
]
Damien Raude-Morvan commented on GORA-332:
------------------------------------------
Hi [~renato2099],
- At first, my "test" folder is absolutly empty.
This "test" directory is just created to allow "goracompiler" to generate
Java source code from avsc schema.
- I've extracted this minimal classpath (gore-core + avro + jackson) for
purpose of this bugreport :)
YMMV, but I prefer submitting the easiest test case for my bug report to
avoid any side effect.
I've reproduced the very same issue using "full classpath" as defined inside
gora pom.xml so I do not think classpath is related
Regards,
> Gora 0.4 compiler generate invalid Java code
> --------------------------------------------
>
> Key: GORA-332
> URL: https://issues.apache.org/jira/browse/GORA-332
> Project: Apache Gora
> Issue Type: Bug
> Components: gora-compiler
> Affects Versions: 0.4, 0.5
> Reporter: Damien Raude-Morvan
>
> Pursuing my journey on GORA-199 I've detected another issue with Gora
> compiler.if there is a "bytes" type field inside a record.
> {noformat}
> {
> "name": "RecordWityBytes",
> "namespace": "com.drazzib.com",
> "type": "record",
> "fields": [
> {
> "name": "type",
> "type": {
> "name": "MyData",
> "type": "bytes"
> }
> }
> ]
> }
> {noformat}
> Gora 0.4 will generate java code without crashing but if you try to compile
> generated code with javac, you'll get the following error :
> {noformat}
> $> ./bin/gora goracompiler record_with_bytes.avsc test/
> Compiling: /home/drazzib/incoming/apache-gora-0.4/record_with_bytes.avsc
> Compiled into: /home/drazzib/incoming/apache-gora-0.4/test
> Compiler executed SUCCESSFULL.
> $> find test/ -name *.java | xargs javac -cp
> gora-core/target/classes/:gora-core/lib/avro-1.7.4.jar:gora-core/lib/jackson-core-asl-1.6.9.jar
> -d test/
> test/com/drazzib/com/RecordWityBytes.java:92: error: cannot find symbol
> this.type = deepCopyToReadOnlyBuffer(value);
> ^
> symbol: method deepCopyToReadOnlyBuffer(ByteBuffer)
> location: class RecordWityBytes
> 1 error
> {noformat}
> You can clone this gist
> [https://gist.github.com/drazzib/263da2ec0dc46afac0d0] to easily reproduce
> this issue.
--
This message was sent by Atlassian JIRA
(v6.2#6252)