0
我有兩個Java組件。首先是分析MyTree對象並使用JXPathContext來刪除任務。然後任務被髮送到第二個。 第二個組件正在執行任務。在execuction我收到以下錯誤:JXPathException'沒有寫入方法'錯誤
org.apache.commons.jxpath.JXPathException: Exception trying to remove all for xpath /*[action='REMOVE']
; Cannot modify property: my.test.MyTree.bbb; No write method
at org.apache.commons.jxpath.ri.JXPathContextReferenceImpl.removeAll(JXPathContextReferenceImpl.java:572)
at org.apache.commons.jxpath.ri.JXPathCompiledExpression.removeAll(JXPathCompiledExpression.java:128)
...
類結構收起是這樣的:
class MyTree {
public final List<Aaa> aaa = new ArrayList();
public final List<Bbb> bbb = new ArrayList();
public final List<Ccc> ccc = new ArrayList();
}
class Task {
public String action;
}
class Aaa extends Task{
}
class Bbb extends Task{
}
class Ccc extends Task{
}
你有任何想法,爲什麼我得到這個錯誤?