My Oracle Support Banner

Null Pointer Exception When Trying To Retrieve Data From "America/Ciudad_Juarez." Timezone (Doc ID 3047244.1)

Last updated on SEPTEMBER 12, 2024

Applies to:

JDBC - Version 19.19 and later
Information in this document applies to any platform.

Symptoms

JDBC 19.23 and 21.5

When attempting to retrieve a date from the database using the OJDBC driver, the application aborted with a null pointer exception. This issue specifically occurs when the timezone is set to "America/Ciudad_Juarez."

ERROR
-----------------------
Here is an excerpt from the stack trace:
java.lang.NullPointerException: Cannot invoke "String.length()" because "" is null
  at oracle.jdbc.driver.TimestamptzAccessor.getString(TimestamptzAccessor.java:145)
  at oracle.jdbc.driver.GeneratedStatement.getString(GeneratedStatement.java:289)
  at oracle.jdbc.driver.GeneratedScrollableResultSet.getString(GeneratedScrollableResultSet.java:376)
in OraJdbcHelper.createUnparsedValue(OraJdbcHelper.java:108)



STEPS
-----------------------

1) Set the application to retrieve date information from the database.
2) Ensure the timezone is configured as "America/Ciudad_Juarez."
3) Execute the query to retrieve the date.

we can see the error



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
Cause
Solution
References


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