[ 
https://issues.apache.org/jira/browse/AVRO-1054?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13416996#comment-13416996
 ] 

Mike Percy commented on AVRO-1054:
----------------------------------

Worth noting for future reference that when you see this error on the RPC 
client, the Avro RPC server has thrown an uncaught NullPointerException inside 
an RPC handler method.
                
> AvroRuntimeException: Unknown datum type: java.lang.NullPointerException
> ------------------------------------------------------------------------
>
>                 Key: AVRO-1054
>                 URL: https://issues.apache.org/jira/browse/AVRO-1054
>             Project: Avro
>          Issue Type: Bug
>          Components: java
>    Affects Versions: 1.6.3
>         Environment: Linux, Java 1.6
>            Reporter: Sushanth
>
> I have a simple messaging protocol, which sends some data, and receives a 
> response.  
> I am calling 
> notification.setStatus(MessageStatus.DELIVERED);client.notify(notification).  
> I am getting the following error.  
> org.apache.avro.AvroRuntimeException: Unknown datum type: 
> java.lang.NullPointerException
> org.apache.avro.AvroRuntimeException: org.apache.avro.AvroRuntimeException: 
> Unknown datum type: java.lang.NullPointerException
>       at 
> org.apache.avro.ipc.specific.SpecificRequestor.readError(SpecificRequestor.java:126)
>       at 
> org.apache.avro.ipc.Requestor$Response.getResponse(Requestor.java:554)
>       at 
> org.apache.avro.ipc.Requestor$TransceiverCallback.handleResult(Requestor.java:359)
>       at 
> org.apache.avro.ipc.Requestor$TransceiverCallback.handleResult(Requestor.java:322)
>       at 
> org.apache.avro.ipc.NettyTransceiver$NettyClientAvroHandler.messageReceived(NettyTransceiver.java:495)
>       at 
> org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:80)
>       at 
> org.apache.avro.ipc.NettyTransceiver$NettyClientAvroHandler.handleUpstream(NettyTransceiver.java:477)
>       at 
> org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
>       at 
> org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:783)
>       at 
> org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:302)
>       at 
> org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:321)
>       at 
> org.jboss.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:299)
>       at 
> org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:216)
>       at 
> org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:80)
>       at 
> org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
>       at 
> org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559)
>       at 
> org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:274)
>       at 
> org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:261)
>       at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:351)
>       at 
> org.jboss.netty.channel.socket.nio.NioWorker.processSelectedKeys(NioWorker.java:282)
>       at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:202)
>       at 
> org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
>       at 
> org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:44)
>       at 
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>       at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>       at java.lang.Thread.run(Thread.java:662)
> When I do
> notification.setStatus(MessageStatus.READ);client.notify(notification); 
> things are fine.
> my avpr is 
> {"namespace": "com.company.avro.generated",
>  "protocol": "CallResponse",
>  "types": [        
>         {"name": "Notification", "type": "record",
>       "fields": [
>             {"name": "recipientID", "type": "string"},
>             {"name": "message", "type": "string"},
>             {"name": "senderID", "type": "string"},
>             {"name": "messageID", "type": "string"},
>             {"name": "transactionID", "type": "string"},
>             {"name": "submitTimestamp", "type": "string"},
>             {"name": "msgNotification", "type": "string"},
>             {"name": "status", "type": {"type": "enum", "name": 
> "MessageStatus",
>               "symbols": ["DELIVERED", "FAILED", "READ"]}}
>         ]
>         },
>         {"name": "NotificationAck", "type": "record",
>             "fields": [{"name": "response", "type": "string"}]
>         }  
>  ],
>  "messages": {
>      "send": {
>          "request": [{"name": "notification", "type": "Notification"}],
>          "response": "NotificationAck"
>      }
>  }
> }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to