You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Max Englander (JIRA)" <ji...@apache.org> on 2018/03/09 06:19:00 UTC
[jira] [Created] (AVRO-2157) IDL compiler won't accept the word
"schema" in namespace-qualified type references
Max Englander created AVRO-2157:
-----------------------------------
Summary: IDL compiler won't accept the word "schema" in namespace-qualified type references
Key: AVRO-2157
URL: https://issues.apache.org/jira/browse/AVRO-2157
Project: Avro
Issue Type: Bug
Components: java
Affects Versions: 1.8.2, 1.8.1
Environment: I have produced the error in Ubuntu 16.04, with Java 1.8.0_151, using both the avro-maven-plugin, as well as by modifying the test files in the apache/avro/lang/compiler test suite.
Reporter: Max Englander
The following IDL will not compile:
{code:java}
@namespace("org.avro.example.protocol")
protocol TwoByteSender {
import schema "twobytes.avsc";
record TwoByteReq {
org.avro.example.schema.TwoByte twobyte;
}
void send(org.avro.example.schema.TwoByte twobyte);
void sendReq(TwoByteReq req);
}{code}
(The code below, *twobytes.avsc*, compiles without issue, and is included for completeness.)
{code:java}
{
"name": "TwoBytes",
"namespace": "org.avro.example.schema",
"size": "2",
"type": "fixed"
}{code}
The error thrown by the compiler is:
{noformat}
org.apache.avro.compiler.idl.ParseException: Encountered " "schema" "schema "" at line 34, column 14.
Was expecting one of:
"array" ...
"boolean" ...
"double" ...
"enum" ...
"error" ...
{noformat}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)