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

Query with multiple inner joins results in NullPointerException

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 2.5.0.Beta1
    • 2.4.0.Final
    • JCR, Query
    • None

    Description

      The following query contains a three-way inner join with criteria on two of the three selectors:

      SELECT * from [nt:myfirstnodetype] as myfirstnodetypes 
      INNER JOIN [nt:mysecondnodetype] as mysecondnodetypes 
              ON ISDESCENDANTNODE(myfirstnodetypes, mysecondnodetypes) 
      INNER JOIN [nt:mythirdnodetype] as mythirdnodetypes 
              ON ISDESCENDANTNODE (mysecondnodetypes, mythirdnodetypes) 
      WHERE 
              ( ISDESCENDANTNODE( mythirdnodetypes, '/some/path') OR 
      myfirstnodetypes.active = true) 
      

      This query, when executed, results in a NullPointerException:

      java.lang.NullPointerException
      	at org.modeshape.graph.query.process.SelectComponent$5.satisfiesConstraints(SelectComponent.java:299)
      	at org.modeshape.graph.query.process.SelectComponent$1.satisfiesConstraints(SelectComponent.java:251)
      	at org.modeshape.graph.query.process.SelectComponent.execute(SelectComponent.java:124)
      	at org.modeshape.graph.query.process.ProjectComponent.execute(ProjectComponent.java:48)
      	at org.modeshape.graph.query.process.QueryProcessor.execute(QueryProcessor.java:100)
      	at org.modeshape.graph.query.QueryEngine.execute(QueryEngine.java:111)
      	at org.modeshape.jcr.RepositoryQueryManager$SelfContained.query(RepositoryQueryManager.java:399)
      	at org.modeshape.jcr.JcrQueryManager$SessionQueryContext.execute(JcrQueryManager.java:1426)
      	at org.modeshape.jcr.query.JcrQuery.execute(JcrQuery.java:103)
      

      Attachments

        Activity

          People

            rhauch Randall Hauch (Inactive)
            rhauch Randall Hauch (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: