[ 
https://issues.apache.org/jira/browse/APEXMALHAR-2239?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15843119#comment-15843119
 ] 

Dongming Liang commented on APEXMALHAR-2239:
--------------------------------------------

[~Hitesh_]I do need some help. I'm not sure if the following will reproduce the 
problem. I tried to change the column name
in JdbcPojoOperatorTest.java
from STARTDATE to STARTDATE1
    fieldInfos.add(new FieldInfo("STARTDATE1", "startDate1", null));

It gives a different error though:

java.lang.RuntimeException: java.sql.SQLSyntaxErrorException: user lacks 
privilege or object not found: STARTDATE1

        at 
com.datatorrent.lib.db.jdbc.JdbcPOJOInputOperator.setup(JdbcPOJOInputOperator.java:147)
        at 
com.datatorrent.lib.db.jdbc.JdbcPojoOperatorTest.testJdbcPojoInputOperator(JdbcPojoOperatorTest.java:635)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at 
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
        at 
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
        at 
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
        at 
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
        at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
        at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
        at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
        at 
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
        at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
        at 
com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
        at 
com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:234)
        at 
com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:74)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
Caused by: java.sql.SQLSyntaxErrorException: user lacks privilege or object not 
found: STARTDATE1
        at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source)
        at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source)
        at org.hsqldb.jdbc.JDBCPreparedStatement.<init>(Unknown Source)
        at org.hsqldb.jdbc.JDBCConnection.prepareStatement(Unknown Source)
        at 
com.datatorrent.lib.db.jdbc.JdbcPOJOInputOperator.setup(JdbcPOJOInputOperator.java:142)
        ... 28 more

Could you advise if this the right way to investigate?

> 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)

Reply via email to