Customer Portal

auto-generated key gets null pointer exception with MySQL

Comments 3

  • Avatar
    mzatopek
    0
    Comment actions Permalink
    Hello,

    unfortunately the error message is not too descriptive. But according my investigation, this NPE is thrown in case the second output port is not attached.

    See our DBOutputTable documentation
    http://doc.cloveretl.com/documentation/ ... table.html

    The first output port is used for rejected records and the second port is used for auto-generated data fields and right this port needs to be attached.

    Best regards, Martin
  • Avatar
    bmuller
    0
    Comment actions Permalink
    Yes, that was the problem--I accidentally put the generated output edge onto the first port in reshuffling the components. I corrected that and the graph now works as intended, thanks very much.

    I would suggest adding a bug report to improve detection of the situation. Given that the SQL statement has a RETURNING clause, Clover does know there is an intention to generate keys, so a missing edge on Port 2 should raise a component error saying that a RETURNING clause is incompatible with no edge on Port 2 (rather than the current NPE, which as you say is not very informative).

    Thanks again for your prompt help on this.
  • Avatar
    mzatopek
    0
    Comment actions Permalink
    You are definitely right, I have reported the issue:

    http://bug.javlin.eu/browse/CL-2343

    Martin

Please sign in to leave a comment.