Hello,
I’m having some issues with the DBJoin module of CloverETL.
Everything seems to be fine until I kick off the graph. The query gets validated, there are no transformation issues, I can even click on “View” and see the results of my query.
Here is what my DBJoin looks like:
<!\[CDATA\[//#CTL2// Transforms input record into output record.
function integer transform() {
$0.UNIV_FISCAL_YR = $0.UNIV_FISCAL_YR;
$0.FIN_COA_CD = $0.FIN_COA_CD;
$0.ACCOUNT_NBR = $0.ACCOUNT_NBR;
$0.SUB_ACCT_NBR = $0.SUB_ACCT_NBR;
$0.FIN_OBJECT_CD = $0.FIN_OBJECT_CD;
$0.FIN_SUB_OBJ_CD = $0.FIN_SUB_OBJ_CD;
$0.FIN_BALANCE_TYP_CD = $0.FIN_BALANCE_TYP_CD;
$0.FIN_OBJ_TYP_CD = $0.FIN_OBJ_TYP_CD;
$0.UNIV_FISCAL_PRD_CD = $0.UNIV_FISCAL_PRD_CD;
$0.FDOC_TYP_CD = $0.FDOC_TYP_CD;
$0.FS_ORIGIN_CD = $0.FS_ORIGIN_CD;
$0.FDOC_NBR = $0.FDOC_NBR;
$0.TRN_ENTR_SEQ_NBR = $0.TRN_ENTR_SEQ_NBR;
$0.TRN_LDGR_ENTR_DESC = $0.TRN_LDGR_ENTR_DESC;
$0.TRN_LDGR_ENTR_AMT = $0.TRN_LDGR_ENTR_AMT;
$0.TRN_DEBIT_CRDT_CD = $0.TRN_DEBIT_CRDT_CD;
$0.TRANSACTION_DT = $0.TRANSACTION_DT;
$0.ORG_DOC_NBR = $0.ORG_DOC_NBR;
$0.PROJECT_CD = $0.PROJECT_CD;
$0.ORG_REFERENCE_ID = $0.ORG_REFERENCE_ID;
$0.FDOC_REF_TYP_CD = $0.FDOC_REF_TYP_CD;
$0.FS_REF_ORIGIN_CD = $0.FS_REF_ORIGIN_CD;
$0.FDOC_REF_NBR = $0.FDOC_REF_NBR;
$0.FDOC_REVERSAL_DT = $0.FDOC_REVERSAL_DT;
$0.TRN_ENCUM_UPDT_CD = $0.TRN_ENCUM_UPDT_CD;
$0.TRN_POST_DT = $0.TRN_POST_DT;
$0.TIMESTAMP = $0.TIMESTAMP;
$0.TRN_LDGR_ENTR_AMTSERV = $1.TRN_LDGR_ENTR_AMT;
return ALL;
}
I get a whole bunch of these warnings on startup:
WARN [main] - Cannot evaluate expression: gl_entry_t
org.jetel.interpreter.ParseException: variable [gl_entry_t] is not declared
at org.jetel.interpreter.TransformLangParser.VarExp(TransformLangParser.java:2466)
at org.jetel.interpreter.TransformLangParser.PrimaryExpression(TransformLangParser.java:1936)
at org.jetel.interpreter.TransformLangParser.PostfixExpression(TransformLangParser.java:1705)
at org.jetel.interpreter.TransformLangParser.UnaryExpression(TransformLangParser.java:1852)
at org.jetel.interpreter.TransformLangParser.MultiplicativeExpression(TransformLangParser.java:1558)
at org.jetel.interpreter.TransformLangParser.AdditiveExpression(TransformLangParser.java:1478)
at org.jetel.interpreter.TransformLangParser.RelationalExpression(TransformLangParser.java:1358)
at org.jetel.interpreter.TransformLangParser.EqualityExpression(TransformLangParser.java:1278)
at org.jetel.interpreter.TransformLangParser.ConditionalAndExpression(TransformLangParser.java:1236)
at org.jetel.interpreter.TransformLangParser.ConditionalOrExpression(TransformLangParser.java:1194)
at org.jetel.interpreter.TransformLangParser.StartExpression(TransformLangParser.java:341)
at org.jetel.interpreter.CTLExpressionEvaluator.evaluate(CTLExpressionEvaluator.java:49)
at org.jetel.util.property.PropertyRefResolver.evaluateExpressions(PropertyRefResolver.java:326)
at org.jetel.util.property.PropertyRefResolver.resolveRef(PropertyRefResolver.java:269)
at org.jetel.util.property.PropertyRefResolver.resolveRef(PropertyRefResolver.java:227)
at org.jetel.util.property.PropertyRefResolver.resolveRef(PropertyRefResolver.java:185)
at org.jetel.util.property.ComponentXMLAttributes.getString(ComponentXMLAttributes.java:185)
at org.jetel.component.DBJoin.fromXML(DBJoin.java:558)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jetel.component.ComponentFactory.createComponent(ComponentFactory.java:131)
at org.jetel.graph.TransformationGraphXMLReaderWriter.instantiateNodes(TransformationGraphXMLReaderWriter.java:496)
at org.jetel.graph.TransformationGraphXMLReaderWriter.instantiatePhases(TransformationGraphXMLReaderWriter.java:459)
at org.jetel.graph.TransformationGraphXMLReaderWriter.read(TransformationGraphXMLReaderWriter.java:374)
at org.jetel.graph.TransformationGraphXMLReaderWriter.read(TransformationGraphXMLReaderWriter.java:294)
at org.jetel.graph.TransformationGraphXMLReaderWriter.loadGraph(TransformationGraphXMLReaderWriter.java:223)
at org.jetel.main.runGraph.main(runGraph.java:325)
Once it actually hits the DBJoin I get the following exception:
ERROR [WatchDog] - Node DBJOIN0 finished with status: ERROR caused by: java.sql.SQLException: Parameter index out of range (1 > number of parameters, which is 0). with field ‘ACCOUNT_NBR’
ERROR [WatchDog] - Node DBJOIN0 error details:
java.lang.RuntimeException: java.sql.SQLException: Parameter index out of range (1 > number of parameters, which is 0). with field ‘ACCOUNT_NBR’
at org.jetel.lookup.DBLookup.seek(DBLookupTable.java:587)
at org.jetel.component.DBJoin.execute(DBJoin.java:239)
at org.jetel.graph.Node.run(Node.java:425)
at java.lang.Thread.run(Unknown Source)
Caused by: java.sql.SQLException: Parameter index out of range (1 > number of parameters, which is 0). with field ‘ACCOUNT_NBR’
at org.jetel.connection.jdbc.CopySQLData.jetel2sql(CopySQLData.java:186)
at org.jetel.connection.jdbc.SQLCloverStatement.executeQuery(SQLCloverStatement.java:466)
at org.jetel.lookup.DBLookup.seekInDB(DBLookupTable.java:598)
at org.jetel.lookup.DBLookup.seekInCache(DBLookupTable.java:629)
at org.jetel.lookup.DBLookup.seek(DBLookupTable.java:579)
… 3 more
Caused by: java.sql.SQLException: Parameter index out of range (1 > number of parameters, which is 0).
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1073)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:987)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:982)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:927)
at com.mysql.jdbc.PreparedStatement.checkBounds(PreparedStatement.java:3717)
at com.mysql.jdbc.PreparedStatement.setInternal(PreparedStatement.java:3701)
at com.mysql.jdbc.PreparedStatement.setString(PreparedStatement.java:4552)
at org.jetel.connection.jdbc.CopySQLData$CopyString.setSQL(CopySQLData.java:1007)
at org.jetel.connection.jdbc.CopySQLData.jetel2sql(CopySQLData.java:184)
… 7 more
Any help would be appreciated.
Thanks