Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4680017F8D for ; Tue, 10 Mar 2015 18:47:55 +0000 (UTC) Received: (qmail 39160 invoked by uid 500); 10 Mar 2015 18:47:39 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 39119 invoked by uid 500); 10 Mar 2015 18:47:39 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 39038 invoked by uid 99); 10 Mar 2015 18:47:39 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Mar 2015 18:47:39 +0000 Date: Tue, 10 Mar 2015 18:47:39 +0000 (UTC) From: "Tyler Hobbs (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CASSANDRA-8786) NullPointerException in ColumnDefinition.hasIndexOption MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CASSANDRA-8786?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14355451#comment-14355451 ] Tyler Hobbs commented on CASSANDRA-8786: ---------------------------------------- Okay, I've created CASSANDRA-8941 for the tests. +1 on the patch. > NullPointerException in ColumnDefinition.hasIndexOption > ------------------------------------------------------- > > Key: CASSANDRA-8786 > URL: https://issues.apache.org/jira/browse/CASSANDRA-8786 > Project: Cassandra > Issue Type: Bug > Components: Core > Environment: Cassandra 2.1.2 > Reporter: Mathijs Vogelzang > Assignee: Aleksey Yeschenko > Fix For: 2.1.4 > > Attachments: 8786.txt > > > We have a Cassandra cluster that we've been using through many upgrades, and thus most of our column families have originally been created by Thrift. We are on Cassandra 2.1.2 now. > We've now ported most of our code to use CQL, and our code occasionally tries to recreate tables with "IF NOT EXISTS" to work properly on development / testing environments. > When we issue the CQL statement "CREATE INDEX IF NOT EXISTS index ON "tableName" (accountId)" (this index does exist on that table already), we get a {{DriverInternalError: An unexpected error occurred server side on cass_host/xx.xxx.xxx.xxx:9042: java.lang.NullPointerException}} > The error on the server is: > {noformat} > java.lang.NullPointerException: null > at org.apache.cassandra.config.ColumnDefinition.hasIndexOption(ColumnDefinition.java:489) ~[apache-cassandra-2.1.2.jar:2.1.2] > at org.apache.cassandra.cql3.statements.CreateIndexStatement.validate(CreateIndexStatement.java:87) ~[apache-cassandra-2.1.2.jar:2.1.2] > at org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:224) ~[apache-cassandra-2.1.2.jar:2.1.2] > at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:248) ~[apache-cassandra-2.1.2.jar:2.1.2] > at org.apache.cassandra.transport.messages.QueryMessage.execute(QueryMessage.java:119) ~[apache-cassandra-2.1.2.jar:2.1.2] > {noformat} > This happens every time we run this CQL statement. We've tried to reproduce it in a test cassandra cluster by creating the table according to the exact "DESCRIBE TABLE" specification, but then this NullPointerException doesn't happon upon the CREATE INDEX one. So it seems that the tables on our production cluster (that were originally created through thrift) are still subtly different schema-wise then a freshly created table according to the same creation statement. -- This message was sent by Atlassian JIRA (v6.3.4#6332)