【发布时间】:2016-06-29 05:46:58
【问题描述】:
我正在尝试在 pentaho 水壶的用户定义 Java 类对象中声明 ArrayList 对象。我正在User Defined Java Class:
import java.util.List;
import java.util.ArrayList;
List<String> where = new ArrayList<String>();
public boolean processRow(StepMetaInterface smi, StepDataInterface sdi) throws KettleException
{
return true;
}
但是当我测试这个类时,我得到一个错误:
Line 4, Column 6: Identifier expected
可能是什么问题?如果我注释掉 List<String> where = new ArrayList<String>(); 行,代码运行良好。
【问题讨论】:
-
我没有看到你的班级声明在哪里?
-
Kettle 的
User Defined Java Class步骤中不需要定义类。在运行转换时,Kettle 已经在其环境中做到了这一点。如果我写private String where而不是List<String> where = new ArrayList<String>();,代码运行良好。
标签: java pentaho kettle pentaho-spoon