Customer Portal

DB Lookup KeyMetadata

Comments 3

  • Avatar
    admin
    0
    Comment actions Permalink
    Hi arvind.kuppusamy,

    can you please provide me more information?

    * which product you run? (Server|Designer|Engine)
    * call stack of exception
    * if possible, also graph with all dependencies (you can reduce it to core of problem)

    Thank you.
  • Avatar
    arvind.kuppusamy
    0
    Comment actions Permalink


    * which product you run? (Server|Designer|Engine)

    "kubosj"

    Engine


    * call stack of exception

    "kubosj"

    Element [:GRAPH_1]-Phase 0 can't be initilized.
    at org.jetel.graph.TransformationGraph.init(TransformationGraph.java:469)
    at org.jetel.graph.runtime.EngineInitializer.initGraph(EngineInitializer.java:239)
    at org.jetel.graph.runtime.EngineInitializer.initGraph(EngineInitializer.java:202)
    at org.jetel.main.runGraph.runGraph(runGraph.java:364)
    at org.jetel.main.runGraph.main(runGraph.java:328)
    Caused by: INPUT_PARSER_0 ...FATAL ERROR !
    Reason: DBLookupTable does not provide key metadata.
    at org.jetel.graph.Phase.init(Phase.java:174)
    at org.jetel.graph.TransformationGraph.init(TransformationGraph.java:467)
    ... 4 more
    Caused by: java.lang.UnsupportedOperationException: DBLookupTable does not provide key metadata.
    at org.jetel.lookup.DBLookupTable.getKeyMetadata(DBLookupTable.java:469)
    at com.facorelogic.core.etl.transform.BaseRules.init(BaseRules.java:475)
    at org.jetel.component.DataRecordTransform.init(DataRecordTransform.java:96)


    * if possible, also graph with all dependencies (you can reduce it to core of problem)

    "kubosj"

    In this instance I don't think a graph would be helpful in diagnosing the issue. As mentioned in the description we used to call org.jetel.lookup.DBLookupTable.getKeyMetadata() to get the parameter metadata and now we get this exception. It works fine for a simple lookup but a DBLookup throws the above error. From the source we can see that this method was changed to throw this exception, we would just like to know what is the alternative way of getting this to work because it used to work before.

    Thanks,
    Arvind
  • Avatar
    admin
    0
    Comment actions Permalink
    Hi arvind.kuppusamy,

    I got this information: method getKeyMetadata() is disabled since 3.0.0 release because implementation had issues. This method is not used in any of our commercial products so it was not fixed since them.

    I can give you simplified original implementation:

    DataRecord tmpRecord = new DataRecord(new DataRecordMetadata("_tmp_"));
    tmpRecord.init();

    SQLCloverStatement statement = new SQLCloverStatement(dbConnection, sqlQuery, tmpRecord);
    statement.init();

    ParameterMetaData sqlMetadata = ((PreparedStatement) statement.getStatement()).getParameterMetaData();

    return SQLUtil.dbMetadata2jetel(sqlMetadata, "_dbLookupTable_" + getName(), dbConnection.getJdbcSpecific());


    But it will need some effort from your side to make it running.

Please sign in to leave a comment.