[ 
https://issues.apache.org/jira/browse/FLINK-19771?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Timo Walther closed FLINK-19771.
--------------------------------
    Fix Version/s: 1.12.2
                   1.11.4
                   1.13.0
       Resolution: Fixed

Fixed in 1.13.0: 2bbac78b9eaa812b113cfc34f57c14ef3a3c35bc
Fixed in 1.12.2: d11137ea1f68a0480ada713e65065c092b281e1e
Fixed in 1.11.4: 428c67369bb1863e0d5e67b7b197fbd73f140e42

> NullPointerException when accessing null array from postgres in JDBC Connector
> ------------------------------------------------------------------------------
>
>                 Key: FLINK-19771
>                 URL: https://issues.apache.org/jira/browse/FLINK-19771
>             Project: Flink
>          Issue Type: Bug
>          Components: Connectors / JDBC
>    Affects Versions: 1.11.2
>            Reporter: Dylan Forciea
>            Assignee: Dylan Forciea
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.13.0, 1.11.4, 1.12.2
>
>
> When trying to utilize the JDBC Connector for Postgres, I tried to read in a 
> text array. When a row that was null was attempted to be read in, the 
> connector threw an exception and execution stopped. It appears looking at the 
> source code that if the row is null that it will still attempt to grab the 
> contents out: 
> [https://github.com/apache/flink/blob/release-1.11.2/flink-connectors/flink-connector-jdbc/src/main/java/org/apache/flink/connector/jdbc/internal/converter/PostgresRowConverter.java#L97]
> The stack trace is as follows:
> {code:java}
> [error] Caused by: java.io.IOException: Couldn't access resultSet
> [error]   at 
> org.apache.flink.connector.jdbc.table.JdbcRowDataInputFormat.nextRecord(JdbcRowDataInputFormat.java:266)
> [error]   at 
> org.apache.flink.connector.jdbc.table.JdbcRowDataInputFormat.nextRecord(JdbcRowDataInputFormat.java:57)
> [error]   at 
> org.apache.flink.streaming.api.functions.source.InputFormatSourceFunction.run(InputFormatSourceFunction.java:91)
> [error]   at 
> org.apache.flink.streaming.api.operators.StreamSource.run(StreamSource.java:100)
> [error]   at 
> org.apache.flink.streaming.api.operators.StreamSource.run(StreamSource.java:63)
> [error]   at 
> org.apache.flink.streaming.runtime.tasks.SourceStreamTask$LegacySourceFunctionThread.run(SourceStreamTask.java:213)
> [error] Caused by: java.lang.NullPointerException
> [error]   at 
> org.apache.flink.connector.jdbc.internal.converter.PostgresRowConverter.lambda$createPostgresArrayConverter$c06ce9f4$2(PostgresRowConverter.java:97)
> [error]   at 
> org.apache.flink.connector.jdbc.internal.converter.AbstractJdbcRowConverter.toInternal(AbstractJdbcRowConverter.java:79)
> [error]   at 
> org.apache.flink.connector.jdbc.table.JdbcRowDataInputFormat.nextRecord(JdbcRowDataInputFormat.java:259)
> [error]   ... 5 more {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to