[
https://issues.apache.org/jira/browse/APEXMALHAR-2330?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15651332#comment-15651332
]
ASF GitHub Bot commented on APEXMALHAR-2330:
--------------------------------------------
GitHub user deepak-narkhede reopened a pull request:
https://github.com/apache/apex-malhar/pull/489
APEXMALHAR-2330 JdbcPOJOPollInputOperator fails with NullPointerExcep…
**Problem:**
JdbcPOJOPollInputOperator fails with NullPointerException using PostgreSQL
driver.
**Problem Description:**
1) When JdbcPOJOPollInputOperator tries to populateColumnDataTypes, column
names retrieved from resultmetadata from database ( this case : Postgres) are
all lowercase.
2) Whereas columnDatatypes specified in fieldinfos might be in same case.
3) Internally hashmap ( nameToType) is used which mismatches if column name
and fieldinfo are not in same case. Hence columnDataTypes is empty which causes
null exception in activate call.
**Solution:**
Using similar case for hashmap and column names irrespective of any
database used for JdbcPOJOPollInputOperator.
**Testing:**
Tested with Database-to-hdfs app also with instrumented logs.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/deepak-narkhede/apex-malhar APEXMALHAR-2330
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/apex-malhar/pull/489.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #489
----
commit 58812c41bcff437db97853e5c5b628a9f9f5dbc4
Author: deepak-narkhede <[email protected]>
Date: 2016-11-09T13:37:10Z
APEXMALHAR-2330 JdbcPOJOPollInputOperator fails with NullPointerException
when PostgreSQL driver.
Using similar case for hashmap and column names irrespective of any
database used for JdbcPOJOPollInputOperator.
----
> JdbcPOJOPollInputOperator fails with NullPointerException when PostgreSQL
> driver
> --------------------------------------------------------------------------------
>
> Key: APEXMALHAR-2330
> URL: https://issues.apache.org/jira/browse/APEXMALHAR-2330
> Project: Apache Apex Malhar
> Issue Type: Bug
> Reporter: Deepak Narkhede
> Assignee: Deepak Narkhede
>
> Here is the description:
> Problem:
> JdbcPOJOPollInputOperator fails with NullPointerException when PostgreSQL
> driver.
> Problem Description:
> 1) When JdbcPOJOPollInputOperator tries to populateColumnDataTypes, column
> names retrieved from resultmetadata from database ( this case : Postgres) are
> all lowercase.
> 2) Whereas columnDatatypes specified in fieldinfos might be in same case.
> 3) Internally hashmap ( nameToType) is used which mismatches if column name
> and fieldinfo are not in same case. Hence columnDataTypes is empty which
> causes null exception in activate call.
> Proposed Solution:
> Using similar case for hashmap and column names irrespective of any database
> used for JdbcPOJOPollInputOperator.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)