Customer Portal

DBExecute -> Unexpected null value

Comments 6

  • Avatar
    admin
    0
    Comment actions Permalink
    Hi Tom,

    I identified this behavior as bug. Please see https://bug.javlin.eu/browse/CLO-1047 for details and workaround.

    Sorry for any inconveniences!
  • Avatar
    skaszyk
    0
    Comment actions Permalink
    I'm getting two different error messages depending on whether I run the graph from Eclipse or command line.

    Eclipse:
    My graph was working without error until I added a DBExecute at the beginning to truncate the table. DBexecute does not read from a file but uses the SQL Query "truncate table <my_table>;". Now, it fails at varying stages of the the data load but it always gets past the truncation and loads some data before throwing an "Unexpected Null Value" error."

    Command Line:
    When I run the same graph from the command line, I get a "No reference to connected input port found in file URL." error.

    I tried adding the "port:$0.field1:discrete" to the DBExecute Query URL but because I'm already using the SQL Query, it throws a warning and then I get an "Input port is not defined for 'port:$0.field1:discrete'." error.

    Eclipse Error:
    ERROR [WatchDog_0] - Component [Read File:READ_FILE] finished with status ERROR.
    Unexpected null value.
    ERROR [WatchDog_0] - Error details:
    org.jetel.exception.JetelRuntimeException: Component [Read File:READ_FILE] finished with status ERROR.
    at org.jetel.graph.Node.createNodeException(Node.java:543)
    at org.jetel.graph.Node.run(Node.java:522)
    at java.lang.Thread.run(Unknown Source)
    Caused by: java.lang.NullPointerException
    at org.jetel.util.ReadableChannelPortIterator.hasNext(ReadableChannelPortIterator.java:173)
    at org.jetel.util.ReadableChannelIterator.hasNext(ReadableChannelIterator.java:212)
    at org.jetel.util.MultiFileReader.nextSource(MultiFileReader.java:272)
    at org.jetel.util.MultiFileReader.getNext(MultiFileReader.java:432)
    at org.jetel.component.DataReader.execute(DataReader.java:268)
    at org.jetel.graph.Node.run(Node.java:493)
    ... 1 more


    Command Line Error:
    ERROR [WatchDog_0] - Component [UniversalDataReader:UNIVERSAL_DATA_READER] finished with status ERROR. (In0: 0 recs, Out0: 0 recs)
    Component pre-execute initialization failed.
    No reference to connected input port found in file URL.
    ERROR [WatchDog_0] - Error details:
    org.jetel.exception.JetelRuntimeException: Component [UniversalDataReader:UNIVERSAL_DATA_READER] finished with status ERROR. (In0: 0 recs, Out0: 0 recs)
    at org.jetel.graph.Node.createNodeException(Node.java:571)
    at org.jetel.graph.Node.run(Node.java:547)
    at java.lang.Thread.run(Thread.java:744)
    Caused by: Element [UNIVERSAL_DATA_READER:UniversalDataReader]-Component pre-execute initialization failed.
    at org.jetel.graph.Node.run(Node.java:501)
    ... 1 more
    Caused by: [attribute = fileURL]-No reference to connected input port found in file URL.
    at org.jetel.util.ReadableChannelPortIterator.init(ReadableChannelPortIterator.java:90)
    at org.jetel.util.ReadableChannelIterator.initPortFields(ReadableChannelIterator.java:200)
    at org.jetel.util.ReadableChannelIterator.common(ReadableChannelIterator.java:141)
    at org.jetel.util.ReadableChannelIterator.init(ReadableChannelIterator.java:130)
    at org.jetel.util.MultiFileReader.initChannelIterator(MultiFileReader.java:134)
    at org.jetel.util.MultiFileReader.preExecute(MultiFileReader.java:529)
    at org.jetel.component.DataReader.preExecute(DataReader.java:239)
    at org.jetel.graph.Node.run(Node.java:499)
    ... 1 more


    Eclipse using work around:

    ERROR [main] - Error during graph initialization !
    Component [Truncate Positions Table:TRUNCATE_POSITIONS_TABLE] initilization failed.
    Input port is not defined for 'port:$0.field1:discrete'.
    ERROR [main] - Error details:
    Element [TRUNCATE_POSITIONS_TABLE:Truncate Positions Table]-Component [Truncate Positions Table:TRUNCATE_POSITIONS_TABLE] initilization failed.
    at org.jetel.graph.Phase.init(Phase.java:171)
    at org.jetel.graph.TransformationGraph.init(TransformationGraph.java:466)
    at org.jetel.graph.runtime.EngineInitializer.initGraph(EngineInitializer.java:255)
    at org.jetel.graph.runtime.EngineInitializer.initGraph(EngineInitializer.java:235)
    at org.jetel.main.runGraph.runGraph(runGraph.java:413)
    at org.jetel.main.runGraph.main(runGraph.java:381)
    Caused by: Input port is not defined for 'port:$0.field1:discrete'.
    at org.jetel.util.ReadableChannelIterator.prepareFileIterator(ReadableChannelIterator.java:185)
    at org.jetel.util.ReadableChannelIterator.common(ReadableChannelIterator.java:138)
    at org.jetel.util.ReadableChannelIterator.init(ReadableChannelIterator.java:130)
    at org.jetel.component.DBExecute.init(DBExecute.java:365)
    at org.jetel.graph.Phase.init(Phase.java:166)
    ... 5 more
  • Avatar
    imriskal
    0
    Comment actions Permalink
    Hi skaszyk,

    Ad Eclipse) Are truncation and data load performed in the same phase? If so, please try to split them. Truncation should be performed e.g. in phase 0 and data load in phase 1.

    Ad Command line) Please send me your graph and I will take a look on it. It would be easier for me to find the issue this way.

    Regards,
  • Avatar
    skaszyk
    0
    Comment actions Permalink
    Thanks, I tried using multiple phases in Eclipse but got the same error. I also ran the updated graph from the command line and same error there too.

    I've attached a copy of my graph.
  • Avatar
    imriskal
    0
    Comment actions Permalink
    The edge between DBExecute and UniversalDataReader is not necessary because no data flows between them. Please delete it and "No reference to connected input port found in file URL." error should disappear.
  • Avatar
    skaszyk
    0
    Comment actions Permalink
    Awesome, both version work now!

    I come from a background with SSIS which requires everything to be connected.

    Thanks for the quick and accurate replies!

Please sign in to leave a comment.