次の例外が発生します。次のコードjava.math.BigIntegerはjava.lang.Integerにキャストできません
List queryResult = query.list();
for (Iterator<Object[]> it = queryResult.iterator(); it.hasNext();) {
Object[] result = it.next();
Integer childId = (Integer) result[0];
Integer grandChildCount = (Integer) result[1];
CompanyNode childNode = childNodes.get(childId);
childNode.setHasChildren(grandChildCount != 0);
childNode.setIsLeaf(grandChildCount == 0);
}
でjava.math.BigIntegerのは にキャストすることはできませんjava.lang.Integerの
:
とjava.lang.ClassCastException:によって引き起こさ
このラインの
Integer grandChildCount = (Integer) result[1];
誰にも分かりませんか?
ありがとうございました。私は今、生産中に試しています。うまくいけば今すぐ動作します。 –