jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Klimetschek <aklim...@day.com>
Subject Re: Questions on SessionImpl.getItem and itemExists
Date Tue, 21 Apr 2009 16:07:58 GMT
On Tue, Apr 21, 2009 at 5:43 PM, Ryan Kruse <ryan@kruseonline.net> wrote:
> I am puzzled by some behavior in the SessionImpl class.  See attached for a
> screenshot of my repo structure.

Apache mailing lists don't support attachments.

>
> This works...
> session.getItem("/h9:analytics/h9:notes");
>
> But this throws PathNotFoundException.  Any ideas why?  I can plug that same
> path in my JCR Browser plugin and it finds the node.
> session.getItem("/h9:analytics/h9:notes/d51ea95d-4d31-49a9-a0c8-b2d2bec4ca58");

Both examples are getItem() calls. From your mail's subject I would
guess you mean one is session.itemExists and one is session.getItem.
Could you clarify?

Anyway, both methods only handle paths based on node names and not on
UUIDs (the second example looks like the last part is a UUID). For
UUID-based resolving, use session.getNodeByUUID().

Regards,
Alex

-- 
Alexander Klimetschek
alexander.klimetschek@day.com

Mime
View raw message