Unsolved
This post is more than 5 years old
22 Posts
0
1443
XAM: Delete XSet impossible: Invalid operation exception (xam/operation not allowed (1033)
Hi,
I've wrote a program that writes a file to a Centera using the XAM API (to the US5 public cluster), with no retention applied (so the default one is automatically applied). Once it is done, I use the XUID obtained and try to delete it. I check the Xset is accessible for deletion using:
if(!xSystem.accessXSet(xuID, XSystem.ACCESS_DELETE_OK))
System.out.println("XSet not accessible for deletion.");
else {
if(xSystem.isXSetRetained(xuID))
System.out.println("XSet is under retention.");
else {
System.out.println("Trying to delete XSet");
xSystem.deleteXSet(xuID);
System.out.println("XSet deleted");
}
}
I successfuly go through the "Trying to delete XSet", but an exception is raised on the "xSystem.deleteXSet(xuID)" itself.
The exception is an "InvalidOperationException", message "xam/operation not allowed(1033)"
So I've tried the Samples from the site (StoreContent and DeleteContent) with the same result.
Even with base and event retention set to 0 millesecond (and enabled), I still cannot delete the XSet.
I'm a little confused right now, what am I doing wrong ?
Thanks for your help.
Regards,
David Schreck
David_Schreck
22 Posts
0
September 27th, 2011 22:00
I also have sometime the same kind of error when writing a file using:
InputStream is = TestStore.class.getResourceAsStream("centeratest.pdf");
BufferedInputStream inputStream = new BufferedInputStream(is);
XSet xSet = xSystem.createXSet(XSet.MODE_UNRESTRICTED);
xSet.createProperty("app-vendor", false, appVendor);
xSet.createProperty("app-name", false, appName);
xSet.createProperty("app-version", false, appVersion);
XStream xStream = xSet.createXStream("stream", true, XAMLibrary.DEFAULT_MIME_TYPE);
byte[] buffer = new byte[BUFFER_SIZE];
long bytesRead = 0;
while ((bytesRead = inputStream.read(buffer)) > 0)
{
long bytesPos = 0;
while (bytesPos < bytesRead)
{
long bytesWrite = xStream.write(buffer, bytesPos, bytesRead - bytesPos);
bytesPos += bytesWrite;
}
}
inputStream.close();
xStream.close();
xSet.createProperty("filename", true, "centeratest.pdf");
xuID = xSet.commit();
xSet.close();
And then, I cannot close the connection:
Unable to close XSystem xam/object in use(1034)
mckeown_paul
409 Posts
0
October 10th, 2011 09:00
try using US4, US5 is sick. I made a document post on using US4 here
https://community.emc.com/docs/DOC-12393