Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
Avro >> mail # user >> Unable to generate-sources with IDL and JSON


Copy link to this message
-
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 ?
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB