提前感谢您的支持。
在UDJC步骤中,下面的代码给出了Janino异常,
processRow法
Hashtable hastable=getConfigData() // This method return Hashtable
Set set=hashtable.get("ERROR_2001").keySet(); ---> //hashtable.get("ERROR_2001"), This returns another hashtable异常:名为"keySet“的方法不会在任何封闭类中声明,也不会在任何超级类型中声明,也不会通过静态导入声明。
在论坛上,我找不到扭转的解决方案来解决这个问题。我正在使用JDK 1.7和PDI 5.1 (最新下载)
发布于 2015-12-11 07:48:40
AFAIK,您不能在Janino中使用泛型,因此Janino无法确定hashtable.get("ERROR_2001")方法返回的对象的确切类,因此它假设返回Object,而后者没有定义keySet()方法。尝试将hashtable.get("ERROR_2001")的结果转换为包含在hashtable集合中的value类:
Hashtable errorEntry = (Hashtable) hashtable.get("ERROR_2001");
Set set = errorEntry.keySet(); https://stackoverflow.com/questions/34211217
复制相似问题