Uploaded image for project: 'Apache Avro'
  1. Apache Avro
  2. AVRO-1445

avro from protobuf write fails on enum with default

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.7.7
    • None
    • None

    Description

      If the protobuf you're attempting to write out as avro has a enum field with a default, the following error occurs:

      Caused by: java.lang.RuntimeException: org.codehaus.jackson.JsonParseException: Unexpected character ('c' (code 99)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')
      at [Source: java.io.StringReader@118a8bef; line: 1, column: 2]
      at org.apache.avro.protobuf.ProtobufData.getDefault(ProtobufData.java:317)
      at org.apache.avro.protobuf.ProtobufData.getSchema(ProtobufData.java:208)
      at org.apache.avro.protobuf.ProtobufData.getNonRepeatedSchema(ProtobufData.java:283)
      at org.apache.avro.protobuf.ProtobufData.getSchema(ProtobufData.java:255)
      at org.apache.avro.protobuf.ProtobufData.getSchema(ProtobufData.java:208)
      at org.apache.avro.protobuf.ProtobufData.getSchema(ProtobufData.java:176)
      ... 36 more
      java.lang.RuntimeException: java.lang.RuntimeException: org.codehaus.jackson.JsonParseException: Unexpected character ('c' (code 99)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')
      at [Source: java.io.StringReader@7d50c032; line: 1, column: 2]
      at org.apache.avro.protobuf.ProtobufData.getSchema(ProtobufData.java:178)

      Attachments

        1. AVRO-1445.patch
          6 kB
          Doug Cutting

        Activity

          People

            cutting Doug Cutting
            gjbaxter@mac.com George Baxter
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: