jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mohinder Singh" <msi...@swri.org>
Subject Deleting Version
Date Thu, 15 Oct 2009 20:56:01 GMT
I am trying to remove the latest version and getting exception thrown.

 

Code is:

      VersionHistory vh = fileNode.getVersionHistory();

      VersionIterator vi = vh.getAllVersions();

      while(vi.hasNext())

            latestVersion = vi.nextVersion();

            

      vh.removeVersion(latestVersion.getName());

 

Exception is:

 

javax.jcr.ReferentialIntegrityException: Unable to remove version. At least
once referenced.

 

Any clues?

Thanks,

Mohinder

 

-----Original Message-----
From: Alexander Klimetschek [mailto:aklimets@day.com] 
Sent: Friday, October 09, 2009 2:50 AM
To: users@jackrabbit.apache.org
Subject: Re: Aborting Checkout

 

On Thu, Oct 8, 2009 at 20:40, Mohinder Singh <msingh@swri.org> wrote:

> If I checkout() a node, then its non-versionable tree becomes
write-enabled.

> How do I abort (don't want to make changes) this checkout() so that nodes

> tree is read-only again.

> I do not want to create another version by checkin().

 

I'd say don't change anything (session.refresh()), checkin() and

delete the unnecessary version.

 

Regards,

Alex

 

-- 

Alexander Klimetschek

alexander.klimetschek@day.com


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message