My Oracle Support Banner

Web Workspaces Throws a NullPointer Exception If a JDBCDatastore Uses a Query That Fetches a Null Value for a Date (Doc ID 2829873.1)

Last updated on JUNE 02, 2024

Applies to:

Oracle Utilities Network Management System - Version 2.4.0.1.0 to 2.5.0.1.0 [Release 2.4 to 2.5]
Oracle Network Management for Utilities - DMS - Version 2.4.0.1.0 to 2.5.0.1.0 [Release 2.4 to 2.5]
Information in this document applies to any platform.

Symptoms

On : 2.5.0.1.0 version, Installation

NMS 2.5.0.1 NullPointerException while getting null timestamp from the database

Webworkspace generates a NullPointerException in com.splwg.oms.ejb.session.Session class line 630 while getting the NULL time stamp value from the database

The Session class needs to check for NULLs before converting the values to TIMESTAMP

obj = ((TIMESTAMP)obj).timestampValue();

 

ERROR
-----------------------

2021-12-01 11:00:17,527 [pool-2-thread-16] ERROR com.splwg.oms.jbot.DBConnector: DBConnector.executeQuery: query failed: "select date1, date2, value1, value2 from test_table"
java.lang.RuntimeException: java.lang.NullPointerException
at com.splwg.oms.ejb.session.Session.executeSQLQuery(Session.java:653) ~[?:?]
at com.splwg.oms.ejb.session.Session.executeSQLQuery(Session.java:530) ~[?:?]
at sun.reflect.GeneratedMethodAccessor325.invoke(Unknown Source) ~[?:?]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_251]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_251]
...
Caused by: java.lang.NullPointerException
at com.splwg.oms.ejb.session.Session.executeSQLQuery(Session.java:630) ~[?:?]
... 84 more
2021-12-01 11:00:17,535 [pool-2-thread-16] ERROR com.splwg.oms.jbot.JDBCDataStore: DS_TEST_DATASTORE.populate
java.lang.RuntimeException: java.lang.NullPointerException




The issue can be reproduced at will with the following steps:
1. Create a JDBCDataStore that queries a table with null date fields
2. Observe errors in log when the datastore tries to be populated


Changes

 

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Changes
Cause
Solution
 Fix Description
 Migration
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.