You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Sam Pullara (JIRA)" <ji...@apache.org> on 2010/07/06 02:42:51 UTC

[jira] Created: (AVRO-591) Regression in 1.3.3 from 1.3.2: Removing a field can result in a ClassCastException

Regression in 1.3.3 from 1.3.2: Removing a field can result in a ClassCastException
-----------------------------------------------------------------------------------

                 Key: AVRO-591
                 URL: https://issues.apache.org/jira/browse/AVRO-591
             Project: Avro
          Issue Type: Bug
          Components: java
    Affects Versions: 1.3.3
         Environment: Mac OS X 10.6, JDK 1.6_20
            Reporter: Sam Pullara
             Fix For: 1.4.0


Stored as:

{
  "type":"record",
  "name":"User",
  "namespace":"bagcheck",
  "fields": [
    {
      "name":"firstName",
      "type":"string",
      "default": ""
    },
    {
      "name":"lastName",
      "type":"string",
      "default": ""
    },
    {
      "name":"email",
      "type":"string",
      "default": ""
    },
    {
      "name":"mobile",
      "type":["string", "null"],
      "default": "null"
    }     
  ]
}

Loaded as:

{
  "type":"record",
  "name":"User",
  "namespace":"bagcheck",
  "fields": [
    {
      "name":"firstName",
      "type":"string",
      "default": ""
    },
    {
      "name":"lastName",
      "type":"string",
      "default": ""
    },
    {
      "name":"email",
      "type":"string",
      "default": ""
    }
  ]
}
java.lang.ClassCastException: org.apache.avro.io.parsing.Symbol$Alternative cannot be cast to org.apache.avro.io.parsing.Symbol$UnionAdjustAction
	at org.apache.avro.io.ResolvingDecoder.readIndex(ResolvingDecoder.java:188)
	at org.apache.avro.io.ParsingDecoder.skipTopSymbol(ParsingDecoder.java:66)
	at org.apache.avro.io.parsing.SkipParser.skipTo(SkipParser.java:71)
	at org.apache.avro.io.parsing.SkipParser.skipSymbol(SkipParser.java:93)
	at org.apache.avro.io.ResolvingDecoder.doAction(ResolvingDecoder.java:207)
	at org.apache.avro.io.parsing.Parser.processImplicitActions(Parser.java:116)
	at org.apache.avro.io.ResolvingDecoder.drain(ResolvingDecoder.java:141)
	at org.apache.avro.generic.GenericDatumReader.read(GenericDatumReader.java:72)
	at havrobase.HABTest.testSchemolution(HABTest.java:224)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:64)


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AVRO-591) Regression in 1.3.3 from 1.3.2: Removing a field can result in a ClassCastException

Posted by "Sam Pullara (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AVRO-591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12885408#action_12885408 ] 

Sam Pullara commented on AVRO-591:
----------------------------------

I did a search for classcastexception but didn't see it. Will try trunk. 

Sent from my iPhone 4






> Regression in 1.3.3 from 1.3.2: Removing a field can result in a ClassCastException
> -----------------------------------------------------------------------------------
>
>                 Key: AVRO-591
>                 URL: https://issues.apache.org/jira/browse/AVRO-591
>             Project: Avro
>          Issue Type: Bug
>          Components: java
>    Affects Versions: 1.3.3
>         Environment: Mac OS X 10.6, JDK 1.6_20
>            Reporter: Sam Pullara
>            Assignee: Thiruvalluvan M. G.
>             Fix For: 1.4.0
>
>
> Stored as:
> {
>   "type":"record",
>   "name":"User",
>   "namespace":"bagcheck",
>   "fields": [
>     {
>       "name":"firstName",
>       "type":"string",
>       "default": ""
>     },
>     {
>       "name":"lastName",
>       "type":"string",
>       "default": ""
>     },
>     {
>       "name":"email",
>       "type":"string",
>       "default": ""
>     },
>     {
>       "name":"mobile",
>       "type":["string", "null"],
>       "default": "null"
>     }     
>   ]
> }
> Loaded as:
> {
>   "type":"record",
>   "name":"User",
>   "namespace":"bagcheck",
>   "fields": [
>     {
>       "name":"firstName",
>       "type":"string",
>       "default": ""
>     },
>     {
>       "name":"lastName",
>       "type":"string",
>       "default": ""
>     },
>     {
>       "name":"email",
>       "type":"string",
>       "default": ""
>     }
>   ]
> }
> java.lang.ClassCastException: org.apache.avro.io.parsing.Symbol$Alternative cannot be cast to org.apache.avro.io.parsing.Symbol$UnionAdjustAction
> 	at org.apache.avro.io.ResolvingDecoder.readIndex(ResolvingDecoder.java:188)
> 	at org.apache.avro.io.ParsingDecoder.skipTopSymbol(ParsingDecoder.java:66)
> 	at org.apache.avro.io.parsing.SkipParser.skipTo(SkipParser.java:71)
> 	at org.apache.avro.io.parsing.SkipParser.skipSymbol(SkipParser.java:93)
> 	at org.apache.avro.io.ResolvingDecoder.doAction(ResolvingDecoder.java:207)
> 	at org.apache.avro.io.parsing.Parser.processImplicitActions(Parser.java:116)
> 	at org.apache.avro.io.ResolvingDecoder.drain(ResolvingDecoder.java:141)
> 	at org.apache.avro.generic.GenericDatumReader.read(GenericDatumReader.java:72)
> 	at havrobase.HABTest.testSchemolution(HABTest.java:224)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
> 	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
> 	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
> 	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
> 	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
> 	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
> 	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
> 	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
> 	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
> 	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
> 	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
> 	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
> 	at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
> 	at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
> 	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:64)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (AVRO-591) Regression in 1.3.3 from 1.3.2: Removing a field can result in a ClassCastException

Posted by "Thiruvalluvan M. G. (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AVRO-591?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thiruvalluvan M. G. resolved AVRO-591.
--------------------------------------

    Resolution: Duplicate

Thanks Sam for reporting this.

The issue has been reported and fixed a few days back in JIRA AVRO-589. Is it possible for you to try the latest from the trunk?

> Regression in 1.3.3 from 1.3.2: Removing a field can result in a ClassCastException
> -----------------------------------------------------------------------------------
>
>                 Key: AVRO-591
>                 URL: https://issues.apache.org/jira/browse/AVRO-591
>             Project: Avro
>          Issue Type: Bug
>          Components: java
>    Affects Versions: 1.3.3
>         Environment: Mac OS X 10.6, JDK 1.6_20
>            Reporter: Sam Pullara
>             Fix For: 1.4.0
>
>
> Stored as:
> {
>   "type":"record",
>   "name":"User",
>   "namespace":"bagcheck",
>   "fields": [
>     {
>       "name":"firstName",
>       "type":"string",
>       "default": ""
>     },
>     {
>       "name":"lastName",
>       "type":"string",
>       "default": ""
>     },
>     {
>       "name":"email",
>       "type":"string",
>       "default": ""
>     },
>     {
>       "name":"mobile",
>       "type":["string", "null"],
>       "default": "null"
>     }     
>   ]
> }
> Loaded as:
> {
>   "type":"record",
>   "name":"User",
>   "namespace":"bagcheck",
>   "fields": [
>     {
>       "name":"firstName",
>       "type":"string",
>       "default": ""
>     },
>     {
>       "name":"lastName",
>       "type":"string",
>       "default": ""
>     },
>     {
>       "name":"email",
>       "type":"string",
>       "default": ""
>     }
>   ]
> }
> java.lang.ClassCastException: org.apache.avro.io.parsing.Symbol$Alternative cannot be cast to org.apache.avro.io.parsing.Symbol$UnionAdjustAction
> 	at org.apache.avro.io.ResolvingDecoder.readIndex(ResolvingDecoder.java:188)
> 	at org.apache.avro.io.ParsingDecoder.skipTopSymbol(ParsingDecoder.java:66)
> 	at org.apache.avro.io.parsing.SkipParser.skipTo(SkipParser.java:71)
> 	at org.apache.avro.io.parsing.SkipParser.skipSymbol(SkipParser.java:93)
> 	at org.apache.avro.io.ResolvingDecoder.doAction(ResolvingDecoder.java:207)
> 	at org.apache.avro.io.parsing.Parser.processImplicitActions(Parser.java:116)
> 	at org.apache.avro.io.ResolvingDecoder.drain(ResolvingDecoder.java:141)
> 	at org.apache.avro.generic.GenericDatumReader.read(GenericDatumReader.java:72)
> 	at havrobase.HABTest.testSchemolution(HABTest.java:224)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
> 	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
> 	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
> 	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
> 	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
> 	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
> 	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
> 	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
> 	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
> 	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
> 	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
> 	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
> 	at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
> 	at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
> 	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:64)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (AVRO-591) Regression in 1.3.3 from 1.3.2: Removing a field can result in a ClassCastException

Posted by "Thiruvalluvan M. G. (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AVRO-591?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thiruvalluvan M. G. reassigned AVRO-591:
----------------------------------------

    Assignee: Thiruvalluvan M. G.

> Regression in 1.3.3 from 1.3.2: Removing a field can result in a ClassCastException
> -----------------------------------------------------------------------------------
>
>                 Key: AVRO-591
>                 URL: https://issues.apache.org/jira/browse/AVRO-591
>             Project: Avro
>          Issue Type: Bug
>          Components: java
>    Affects Versions: 1.3.3
>         Environment: Mac OS X 10.6, JDK 1.6_20
>            Reporter: Sam Pullara
>            Assignee: Thiruvalluvan M. G.
>             Fix For: 1.4.0
>
>
> Stored as:
> {
>   "type":"record",
>   "name":"User",
>   "namespace":"bagcheck",
>   "fields": [
>     {
>       "name":"firstName",
>       "type":"string",
>       "default": ""
>     },
>     {
>       "name":"lastName",
>       "type":"string",
>       "default": ""
>     },
>     {
>       "name":"email",
>       "type":"string",
>       "default": ""
>     },
>     {
>       "name":"mobile",
>       "type":["string", "null"],
>       "default": "null"
>     }     
>   ]
> }
> Loaded as:
> {
>   "type":"record",
>   "name":"User",
>   "namespace":"bagcheck",
>   "fields": [
>     {
>       "name":"firstName",
>       "type":"string",
>       "default": ""
>     },
>     {
>       "name":"lastName",
>       "type":"string",
>       "default": ""
>     },
>     {
>       "name":"email",
>       "type":"string",
>       "default": ""
>     }
>   ]
> }
> java.lang.ClassCastException: org.apache.avro.io.parsing.Symbol$Alternative cannot be cast to org.apache.avro.io.parsing.Symbol$UnionAdjustAction
> 	at org.apache.avro.io.ResolvingDecoder.readIndex(ResolvingDecoder.java:188)
> 	at org.apache.avro.io.ParsingDecoder.skipTopSymbol(ParsingDecoder.java:66)
> 	at org.apache.avro.io.parsing.SkipParser.skipTo(SkipParser.java:71)
> 	at org.apache.avro.io.parsing.SkipParser.skipSymbol(SkipParser.java:93)
> 	at org.apache.avro.io.ResolvingDecoder.doAction(ResolvingDecoder.java:207)
> 	at org.apache.avro.io.parsing.Parser.processImplicitActions(Parser.java:116)
> 	at org.apache.avro.io.ResolvingDecoder.drain(ResolvingDecoder.java:141)
> 	at org.apache.avro.generic.GenericDatumReader.read(GenericDatumReader.java:72)
> 	at havrobase.HABTest.testSchemolution(HABTest.java:224)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
> 	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
> 	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
> 	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
> 	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
> 	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
> 	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
> 	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
> 	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
> 	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
> 	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
> 	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
> 	at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
> 	at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
> 	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:64)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.