Return-Path: X-Original-To: apmail-jackrabbit-users-archive@minotaur.apache.org Delivered-To: apmail-jackrabbit-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7937E1056B for ; Mon, 17 Jun 2013 08:45:04 +0000 (UTC) Received: (qmail 97955 invoked by uid 500); 17 Jun 2013 08:45:04 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 97673 invoked by uid 500); 17 Jun 2013 08:45:03 -0000 Mailing-List: contact users-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@jackrabbit.apache.org Delivered-To: mailing list users@jackrabbit.apache.org Received: (qmail 97665 invoked by uid 99); 17 Jun 2013 08:45:03 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Jun 2013 08:45:03 +0000 X-ASF-Spam-Status: No, hits=0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE X-Spam-Check-By: apache.org Received-SPF: error (athena.apache.org: local policy) Received: from [81.169.146.162] (HELO mo-p00-ob.rzone.de) (81.169.146.162) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Jun 2013 08:44:58 +0000 X-RZG-AUTH: :KmMWYE27W/ilSTaLlIhIv4iEzodG2oTTmFjMWMkzBbe/NY5q5OLgvjR0tz8= X-RZG-CLASS-ID: mo00 Received: from patina.store (com4.strato.de [81.169.145.237]) by smtp.strato.de (joses mo39) (RZmta 31.27 AUTH) with (RC4-MD5 encrypted) ESMTPA id q06270p5H8DnLw for ; Mon, 17 Jun 2013 10:44:16 +0200 (CEST) Date: Mon, 17 Jun 2013 10:44:16 +0200 (CEST) From: Ulrich Reply-To: Ulrich To: jackrabbit Message-ID: <580215121.304333.1371458656285.open-xchange@com4.strato.de> In-Reply-To: <1324617394.293657.1371456085527.open-xchange@com4.strato.de> References: <1324617394.293657.1371456085527.open-xchange@com4.strato.de> Subject: Re: JCR-JQOM: JOIN returns Message: WARN NodeIteratorImpl - Exception retrieving Node with Id: null MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Priority: 3 Importance: Medium X-Mailer: Open-Xchange Mailer v7.2.0-Rev8 X-Virus-Checked: Checked by ClamAV on apache.org I tried the same example with JCR-SQL2. This fails for another reason - but may help to understand what I try to do: queryString = "select * from [nt:file] as parent " + "inner join [nt:resource] as child on ISCHILDNODE(child,parent)" + "WHERE ISDESCENDANTNODE([descendant],/content/testit)"; Here I get an Exception; there is probably a syntax error in the queryString. (I'm not familiar with the syntax). Exception in thread "main" javax.jcr.query.InvalidQueryException: Query: select * from [nt:file] as parent inner join [nt:resource] as child on ISCHILDNODE(child,parent)WHERE ISDESCENDANTNODE([descendant],/content(*)/testit); expected: ) Ulrich > Ulrich hat am 17. Juni 2013 um 10:01 geschrieben: > > > Still fighting with JCR-JQOM: > I need to retrieve "jcr:lastModified" from jcr:contend-childnode of every > nt:file-Node. My approach is: > > Selector ntFileSelector = qomf.selector("nt:file", "Parent"); > Selector jcrContentSelector = qomf.selector("nt:resource", "Child"); > Join join = qomf.join(ntFileSelector, jcrContentSelector, > QueryObjectModelFactory.JCR_JOIN_TYPE_INNER, > qomf.childNodeJoinCondition(jcrContentSelector.getSelectorName(), > ntFileSelector.getSelectorName())); > Constraint getSubtree = qomf.descendantNode(ntFileSelector.getSelectorName(), > subtree); > QueryObjectModel qom = qomf.createQuery(join, getSubtree, null, null); > QueryResult queryResult = qom.execute(); > nodeIterator = queryResult.getNodes(); > > From this I get four times the message: > WARN NodeIteratorImpl - Exception retrieving Node with Id: null > This means I get this message for every node which I expected to be selected > within the subtree. > > If I run the query without the "JOIN": > QueryObjectModel qom = qomf.createQuery(ntFileSelector, getSubtree, null, > null); > it is fine. > > brdgs, > Ulrich