5 Replies Latest reply on Oct 7, 2011 10:18 PM by Island Chen

    Got ArrayIndexOutOfBoundsException while try to call Row.getValue(columnName)

    Island Chen Newbie

      Hi all,

       

      I'm a newbie for Modeshape, what I'm trying to do is to query some properties of parent and child node together, below is the JCR_SQL2:

       

      {code:sql}SELECT parent.title, child.age FROM [nt:unstructured] as parent

                          FULL OUTER JOIN [nt:unstructured] as child ON ISCHILDNODE(child, parent)

                          WHERE child.age =10

      {code}

       

      the QueryResult.getColumnName() returns ["title", "age"], but I got the follow exception while I try to call Row.getValue("title") method

       

      java.lang.ArrayIndexOutOfBoundsException: 14

                at org.modeshape.jcr.query.JcrQueryResult$MultiSelectorQueryResultRow.getValue(JcrQueryResult.java:651)

                at javax.jcr.query.Row$getValue.call(Unknown Source)

       

      Can anyone tell me how to correct it, or show me some codesnip about getting result from "FULL OUTER JOIN" statement, thanks!

       

      flyisland