Help Center/ Data Lake Insight/ FAQs/ Datasource Connections/ Datasource Connection O&M/ Null Pointer Error Is Displayed When the System Creates a Datasource RDS Table
Updated on 2023-05-19 GMT+08:00

Null Pointer Error Is Displayed When the System Creates a Datasource RDS Table

Symptom

The system failed to create a datasource RDS table, and null pointer error was reported.

Cause Analysis

The following table creation statement was used:

CREATE TABLE IF NOT EXISTS dli_to_rds
 USING JDBC OPTIONS (
 'url'='jdbc:mysql://to-rds-1174405119-oLRHAGE7.datasource.com:5432/postgreDB',
 'driver'='org.postgresql.Driver',
 'dbtable'='pg_schema.test1',
 'passwdauth' = 'xxx',
 'encryption' = 'true');

The RDS database is in a PostGre cluster, and the protocol header in the URL is invalid.

Procedure

Change the URL to url'='jdbc:postgresql://to-rds-1174405119-oLRHAGE7.datasource.com:5432/postgreDB and run the creation statement. The datasource table is successfully created.

For details about the syntax for creating a datasource RDS table, see Creating a DLI Table and Associating It with RDS in Data Lake Insight SQL Syntax Reference.