[ 
https://issues.apache.org/jira/browse/CASSANDRA-10891?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sylvain Lebresne resolved CASSANDRA-10891.
------------------------------------------
    Resolution: Invalid

As indicated by the stacktrace, this is a driver exception and you may open a 
ticket on java driver JIRA if you wish to: 
https://datastax-oss.atlassian.net/browse/JAVA.

I will note however that {{null}} values are not supported by CQL so you simply 
cannot do what you are trying to do: you need to make sure you have no nulls. 
Whether the driver should throw a more meaningful exception in that case is 
something I'll left to the drivers maintainer to answer.

> Cassandra driver doesn't allow to insert null as a value in map
> ---------------------------------------------------------------
>
>                 Key: CASSANDRA-10891
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-10891
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Tomasz Szlek
>
> When cassandra has column with type map<text,text> and I try to insert entry 
> with null value cassandra driver throws following exception:
> {code}
> java.lang.NullPointerException
>         at 
> com.datastax.driver.core.TypeCodec$StringCodec.serialize(TypeCodec.java:405)
>         at 
> com.datastax.driver.core.TypeCodec$StringCodec.serialize(TypeCodec.java:350)
>         at 
> com.datastax.driver.core.TypeCodec$MapCodec.serialize(TypeCodec.java:1169)
>         at 
> com.datastax.driver.core.TypeCodec$MapCodec.serialize(TypeCodec.java:1085)
>         at com.datastax.driver.core.DataType.serialize(DataType.java:622)
>         at com.datastax.driver.core.DataType.serializeValue(DataType.java:727)
>         at com.datastax.driver.core.querybuilder.Utils.convert(Utils.java:80)
>         at 
> com.datastax.driver.core.querybuilder.BuiltStatement.getValues(BuiltStatement.java:172)
>         at 
> com.datastax.driver.core.SessionManager.makeRequestMessage(SessionManager.java:496)
>         at 
> com.datastax.driver.core.SessionManager.makeRequestMessage(SessionManager.java:465)
>         at 
> com.datastax.driver.core.SessionManager.executeAsync(SessionManager.java:119)
>         at 
> com.datastax.driver.core.AbstractSession.execute(AbstractSession.java:52)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to