commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Marsh (JIRA)" <>
Subject [jira] [Created] (JXPATH-191) List operations and Predicates do not seem to work
Date Mon, 03 Jul 2017 13:43:00 GMT
David Marsh created JXPATH-191:

             Summary: List operations and Predicates do not seem to work
                 Key: JXPATH-191
             Project: Commons JXPath
          Issue Type: Improvement
            Reporter: David Marsh

This program does not work :-

    public static void main(String[] args) {
        Deal deal = new Deal();

        Quote firstQuote = (Quote)JXPathContext.newContext(deal).

        Quote lastQuote = (Quote)JXPathContext.newContext(deal).


    private static class Deal {
        private List<Quote> quotes = new ArrayList<>();
            quotes.add(new Quote(1));
            quotes.add(new Quote(2));

        public Collection<Quote> getQuotes() {
            return quotes;

    private static class Quote {
        int id;
        public Quote(int id) {
   = id;

Exception in thread "main" org.apache.commons.jxpath.JXPathException: Cannot access property:
com.baml.gmdp.ux.reporting.model.generic.JXPathTest$Deal.quotes; No read method

Most importantly id like to do XPath experessions like "quotes[last()]".

This message was sent by Atlassian JIRA

View raw message