Uploaded image for project: 'ModeShape'
  1. ModeShape
  2. MODE-829

IllegalArgumentException: The columns argument may not be empty for JOIN query

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 2.1.0.Final
    • 2.0.0.Final
    • JCR, Query
    • None

      In a repository structure as depicted below, the following query results in an IllegalArgumentException:
      SELECT * FROM [nt:base] AS _b
      JOIN [nt:base] AS _d ON ISDESCENDANTNODE(_b, _d)
      WHERE
      (ischildnode(_b,'/a') AND
      (_d.name = 'd2'))

      The issue can be reproduces with repo content like this (depicted as XML)
      <a>
      <b name="b1">
      <c>
      <d name="d1"/>
      <d name="d2"/>
      </c>
      </b>
      <b name="b2">
      <c>
      <d name="d3"/>
      </c>
      </b>
      </a>

      Stacktrace.
      Exception in thread "main" java.lang.IllegalArgumentException: The columns argument may not be empty
      at org.modeshape.common.util.CheckArg.isNotEmpty(CheckArg.java:587)
      at org.modeshape.graph.query.process.QueryResultColumns.<init>(QueryResultColumns.java:94)
      at org.modeshape.graph.query.process.QueryProcessor.createColumnsFor(QueryProcessor.java:380)
      at org.modeshape.graph.query.process.QueryProcessor.createComponent(QueryProcessor.java:228)
      at org.modeshape.graph.query.process.QueryProcessor.createComponent(QueryProcessor.java:298)
      at org.modeshape.graph.query.process.QueryProcessor.createComponent(QueryProcessor.java:298)
      at org.modeshape.graph.query.process.QueryProcessor.createComponent(QueryProcessor.java:286)
      at org.modeshape.graph.query.process.QueryProcessor.execute(QueryProcessor.java:90)
      at org.modeshape.graph.query.QueryEngine.execute(QueryEngine.java:111)
      at org.modeshape.jcr.RepositoryQueryManager$SelfContained.query(RepositoryQueryManager.java:361)
      at org.modeshape.jcr.JcrQueryManager$SessionQueryContext.execute(JcrQueryManager.java:1432)
      at org.modeshape.jcr.query.JcrQuery.execute(JcrQuery.java:102)

            rhauch Randall Hauch (Inactive)
            simon.g Simon Gunzenreiner (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: