-
Bug
-
Resolution: Done
-
Major
-
2.0.0.Final
-
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)