[
https://issues.apache.org/jira/browse/APEXMALHAR-2239?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15843981#comment-15843981
]
Hitesh Kapoor commented on APEXMALHAR-2239:
-------------------------------------------
[~d9liang] you are getting this error because column 'STARTDATE1' is not
present in the table and you are trying to access it.
[~venkateshkkothapalli] I had a look at the code and tried few scenarios and I
don't think you will get the stack trace as mentioned in the description if
(only) field names do not match in POJO and table. However after a code walk
through I was able to get the mentioned stack trace if we set a query to fetch
rows and have additional columns in fieldInfos.
I will be attaching the code changes for testJdbcPojoInputOperator() in
JdbcPojoOperatorTest.java to get a repro of the mentioned scenario.
[~venkateshkkothapalli] please confirm if this is the required scenario so that
[~d9liang] can proceed further if not please give us a repro scenario or some
additional details so that we can try to re create it.
> Null pointer exception in JDBCPojoInputOperator when the field names do not
> match in Pojo, table
> ------------------------------------------------------------------------------------------------
>
> Key: APEXMALHAR-2239
> URL: https://issues.apache.org/jira/browse/APEXMALHAR-2239
> Project: Apache Apex Malhar
> Issue Type: Bug
> Affects Versions: 3.5.0
> Reporter: Venkatesh Kottapalli
> Assignee: Dongming Liang
> Priority: Minor
>
> The following exception is thrown in JDBCPojoInputOperator when the field
> names for the table provided in the FieldInfo mapping don't match with the
> column names of the table.
> Exception:
> Abandoning deployment due to setup failure. java.lang.NullPointerException
> at
> com.datatorrent.lib.db.jdbc.JdbcPOJOInputOperator.activate(JdbcPOJOInputOperator.java:366)
> at
> com.datatorrent.lib.db.jdbc.JdbcPOJOInputOperator.activate(JdbcPOJOInputOperator.java:67)
> at com.datatorrent.stram.engine.Node.activate(Node.java:619)
> at
> com.datatorrent.stram.engine.StreamingContainer.setupNode(StreamingContainer.java:1336)
> at
> com.datatorrent.stram.engine.StreamingContainer.access$100(StreamingContainer.java:130)
> at
> com.datatorrent.stram.engine.StreamingContainer$2.run(StreamingContainer.java:1388)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)