flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Fabian Hueske (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (FLINK-4108) NPE in Row.productArity
Date Sat, 15 Oct 2016 07:55:20 GMT

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

Fabian Hueske resolved FLINK-4108.
----------------------------------
       Resolution: Fixed
    Fix Version/s: 1.1.4
                   1.2.0

Fixed for 1.1.4 with 9f7269808f3694815bba1e4dbf050db2a2dfe15f
Fixed for 1.2.0 with dc99deb43fb876400615b0b77cf3471768482646

> NPE in Row.productArity
> -----------------------
>
>                 Key: FLINK-4108
>                 URL: https://issues.apache.org/jira/browse/FLINK-4108
>             Project: Flink
>          Issue Type: Bug
>          Components: Batch Connectors and Input/Output Formats, Type Serialization System
>    Affects Versions: 1.1.0
>            Reporter: Martin Scholl
>            Assignee: Timo Walther
>             Fix For: 1.2.0, 1.1.4
>
>
> [this is my first issue request here, please apologize if something is missing]
>  JDBCInputFormat of flink 1.1-SNAPSHOT fails with an NPE in Row.productArity:
> {quote}
> java.io.IOException: Couldn't access resultSet
>         at org.apache.flink.api.java.io.jdbc.JDBCInputFormat.nextRecord(JDBCInputFormat.java:288)
>         at org.apache.flink.api.java.io.jdbc.JDBCInputFormat.nextRecord(JDBCInputFormat.java:98)
>         at org.apache.flink.runtime.operators.DataSourceTask.invoke(DataSourceTask.java:162)
>         at org.apache.flink.runtime.taskmanager.Task.run(Task.java:588)
>         at java.lang.Thread.run(Thread.java:745)
> Caused by: java.lang.NullPointerException
>         at org.apache.flink.api.table.Row.productArity(Row.scala:28)
>         at org.apache.flink.api.java.io.jdbc.JDBCInputFormat.nextRecord(JDBCInputFormat.java:279)
>         ... 4 more
> {quote}
> The code reproduce this can be found in this gist: https://gist.github.com/zeitgeist/b91a60460661618ca4585e082895c616
> The reason for the NPE, I believe, is the way through which Flink creates Row instances
through Kryo. As Row expects the number of fields to allocate as a parameter, which Kryo does
not provide, the ‘fields’ member of Row ends up being null. As I’m neither a reflection
nor a Kryo expert, I rather leave a true analysis to more knowledgable programmers.
> Part of the aforementioned example is a not very elegant workaround though a custom type
and a cast (function {{jdbcNoIssue}} + custom Row type {{MyRow}}) to serve as a further hint
towards my theory.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message