Feedback
Did this article resolve your question/issue?

   

Article

NullPointerException occurred with Cassandra JDBC driver 6.0 when a column of type DURATION was created

Information

 
TitleNullPointerException occurred with Cassandra JDBC driver 6.0 when a column of type DURATION was created
URL Namenullpointerexception-occurred-with-cassandra-jdbc-driver-6-0-when-a-column-of-type-duration-was-created
Article Number000113117
EnvironmentProduct: Progress DataDirect for JDBC for Apache Cassandra Driver
Version : 6.0.0.000273
OS: JAVA
Database : Cassandra
Application: All supported applications
Question/Problem Description

When a table was created with a column of type DURATION using Cassandra JDBC driver and then "REFRESH MAP" was called, the following NullPointerException occurred.

Steps to ReproduceSample java code snippet used to recreate the problem:

stmt = con.createStatement();
stmt.executeUpdate(" {native (CREATE TABLE pm_test (C1 VARCHAR, C2 DURATION, PRIMARY KEY (C1)))} { refresh }" );
stmt.close();
Clarifying Information
Error Messagejava.sql.SQLException: [DataDirect][Cassandra JDBC Driver][Cassandra]java.lang.NullPointerException java.lang.NullPointerException in statement [ REFRESH MAP ] 2019-11-08 13:54:23.442: Step 1 failed: 2019-11-08 13:54:23.443: java.sql.SQLException: [DataDirect][Cassandra JDBC Driver][Cassandra]java.lang.NullPointerException java.lang.NullPointerException in statement [ REFRESH MAP ]
Defect NumberDefect XDBC-17819
Enhancement Number
Cause
DURATION is a new type which was not handled in the driver code before. Hence the exception, when such type is encountered while working with the native file.
Resolution
The driver has been enhanced to support the Duration data type, which maps to the Varchar JDBC type.
Currently, the Duration type is supported only in simple columns, and not in Collection types.

Fixed in hot fix 6.0.0.000304
Refer to article  Connect for JDBC hot fix download and install instructions , for instructions on how to download and install the hot fix.
Workaround
Notes
Last Modified Date11/20/2020 6:56 AM
Files
Disclaimer The origins of the information on this site may be internal or external to Progress Software Corporation (“Progress”). Progress Software Corporation makes all reasonable efforts to verify this information. However, the information provided is for your information only. Progress Software Corporation makes no explicit or implied claims to the validity of this information.

Any sample code provided on this site is not supported under any Progress support program or service. The sample code is provided on an "AS IS" basis. Progress makes no warranties, express or implied, and disclaims all implied warranties including, without limitation, the implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample code is borne by the user. In no event shall Progress, its employees, or anyone else involved in the creation, production, or delivery of the code be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample code, even if Progress has been advised of the possibility of such damages.