You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by "Danijel Schiavuzzi (JIRA)" <ji...@apache.org> on 2014/05/22 18:29:03 UTC

[jira] [Commented] (STORM-71) java.util.Date isn't serializable.

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

Danijel Schiavuzzi commented on STORM-71:
-----------------------------------------

You can register the Date serializer using Storm's Config:

{noformat}
conf.registerSerialization(Date.class, DefaultSerializers.DateSerializer.class);
{noformat}

> java.util.Date isn't serializable.
> ----------------------------------
>
>                 Key: STORM-71
>                 URL: https://issues.apache.org/jira/browse/STORM-71
>             Project: Apache Storm (Incubating)
>          Issue Type: Bug
>            Reporter: James Xu
>            Priority: Minor
>
> https://github.com/nathanmarz/storm/issues/316
> I've got a following exception not when I add conf.registerSerialization(java.util.Date.class);
> 2012-08-30 04:49:15 executor [ERROR] 
> java.lang.RuntimeException: com.esotericsoftware.kryo.KryoException: java.lang.IllegalArgumentException: Class is not registered: java.util.Date
> Note: To register this class use: kryo.register(java.util.Date.class);
> Serialization trace:
> ...
> Date is one of the default serializers in kryo.
> http://code.google.com/p/kryo/#Default_serializers
> But it seems not to be registered in getKryo().
> https://github.com/nathanmarz/storm/blob/master/src/jvm/backtype/storm/serialization/SerializationFactory.java



--
This message was sent by Atlassian JIRA
(v6.2#6252)