0

I have two java components. First one is analysing MyTree object and generating tasks with JXPathContext's to remove. Then tasks are sent to second one. Second component is executing tasks. During execuction I receive following error:

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)
        ...

Structure of classes is moreless like this:

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{
}

Do You have any idea why I get this error ?

osjo
  • 131
  • 6

1 Answers1

0

I resolved the problem. It was caused by different versions of JXPath in components. (1.2 and 1.3)

osjo
  • 131
  • 6