jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ulrich <For...@gombers.de>
Subject Re: JCR-SQL2: JOIN fails with javax.jcr.RepositoryException: Internal Server Error
Date Tue, 18 Jun 2013 06:25:30 GMT
Thank you, but it was a programming error. I'm using a StringArray to maintain
different sample queries and call them then via:
Query q = session.getWorkspace().getQueryManager().createQuery(queryString[6],
Query.JCR_SQL2);
After reordering this array and changing the syntax a little bit (ROT: "Only one
change at one time!"), the queryString[]-index pointed to an empty
array-elemtent; this gave me the error.
Now I got the query running with this syntax:

   "Select * from [nt:file] as parent " +
   "inner join [nt:resource] as child on ISCHILDNODE(child,parent)" +
   "WHERE ISDESCENDANTNODE(parent,[/content/testit])";

But instead of returning the detected nodes I get the message:
   "WARN  NodeIteratorImpl - Exception retrieving Node with Id: null"
as often as there are nodes which are eligible to be detected.

So the JCR-SQL2 gives me the same result as the JCR-JQOM-query decsribed in the
thread
"http://mail-archives.apache.org/mod_mbox/jackrabbit-users/201306.mbox/%3C1324617394.293657.1371456085527.open-xchange%40com4.strato.de%3E".

Thank you for the answer. At least it helped to have a closer look again at the
code. We need no further discussion here - I need to get my original problem
solved, so I think we should stay in the original thread.

Ulrich






> "orlando.p" <orlando.palis@gmail.com> hat am 18. Juni 2013 um 01:49
> geschrieben:
>
>
> Ulrich wrote
> > queryString = "select * from [nt:file] as parent " +
> >               "inner join [nt:resource] as child on
> > ISCHILDNODE(child,parent)" +
> >               "WHERE ISDESCENDANTNODE(descendant,[/content/testit])";
>
> You are missing space before WHERE clause?
>
>
>
> --
> View this message in context:
> http://jackrabbit.510166.n4.nabble.com/JCR-SQL2-JOIN-fails-with-javax-jcr-RepositoryException-Internal-Server-Error-tp4658889p4658893.html
> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.

Mime
View raw message