jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mmjose26 <mmjos...@yahoo.com.mx>
Subject Re: Remote Access by DavEx
Date Wed, 14 Sep 2011 18:34:15 GMT
>>>>but what happens if you just try and get the node again?
>>>>System.out.println("Identifier:"+
session.getNode(path).getIdentifier()); 

different error, but the same problem:

Exception in thread "main" javax.jcr.PathNotFoundException: 
	at
org.apache.jackrabbit.jcr2spi.hierarchy.NodeEntryImpl.getDeepNodeEntry(NodeEntryImpl.java:395)
	at
org.apache.jackrabbit.jcr2spi.hierarchy.HierarchyManagerImpl.getNodeEntry(HierarchyManagerImpl.java:137)
	at
org.apache.jackrabbit.jcr2spi.ItemManagerImpl.getNode(ItemManagerImpl.java:174)
	at org.apache.jackrabbit.jcr2spi.SessionImpl.getNode(SessionImpl.java:510)
	at
test.gob.shcp.client.RepositoryConnection.main(RepositoryConnection.java:31)

however, in base of your idea,  I work around this by loop code:

                String uuid = null;
		while(id == null || attemps > MAX_INT) {
                            try {
                                session.refresh(true);
                                id = session.getNode(path).getIdentifier();
                            } catch(PathNotFoundException e) {
                                attemps++;
                                log.debug("attemp "+attemps+"
PathNotFoundException:" + e);
                            }
                        }

It works, but is an ugly loop code and maybe I'm ignoring the right way to
solve this.

Any suggestions would be appreciated 

thanks for your help! 

--
View this message in context: http://jackrabbit.510166.n4.nabble.com/Remote-Access-by-DavEx-tp3811610p3813762.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.

Mime
View raw message