You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@avro.apache.org by Mick <mi...@gmail.com> on 2013/10/29 14:38:06 UTC
Unable to generate-sources with IDL and JSON
Hi,
I use maven plugin with avro to generate classes out of IDL files for
protocol. But for schemas avro suport only JSON as I recon so I decided
to go for avsc. I use import in protocol AVDL file to import AVSC file.
However when in pom.xml I add 'schema' or 'protocol' goals next to
'idl-protocol' so it looks like this:
...
<build>
<plugins>
<plugin>
<groupId>org.apache.avro</groupId>
<artifactId>avro-maven-plugin</artifactId>
<version>${avro.version}</version>
<executions>
<execution>
<id>schemas</id>
<phase>generate-sources</phase>
<goals>
//When i comment out two below lines and use only AVDL all works fine
but when i try tu use avsc i got error
<goal>schema</goal>
<goal>protocol</goal>
//This goal only with only AVDL works fine
<goal>idl-protocol</goal>
</goals>
...
I got an error:
"
[ERROR] Failed to execute goal
org.apache.avro:avro-maven-plugin:1.7.5:schema (schemas) on project
Network: Execution schemas of goal
org.apache.avro:avro-maven-plugin:1.7.5:schema failed:
org.codehaus.jackson.JsonParseException: Unexpected character ('@' (code
64)): expected a valid value (number, String, array, object, 'true',
'false' or 'null')
[ERROR] at [Source:
/home/Mick/workspace/Network/src/main/resources/avro/protocol.avdl;
line: 4, column: 2]
[ERROR] -> [Help 1]
"
Line 4 column 2 is where i got in my avdl file:
@version("1.0.0")
@namespace("com.acme.phd.Network.service.generated")
What is wrong, is it a bug ?