When using the Java Productivity Layer from emc-dfs-sdk-7.2, I'm coming across a strange error.
I'm attempting to invoke IObjectService.create and pass in the DataPackage, which contains a DataObject with the id, content and properties set according to the reference material. I set the id as follows:
@SuppressWarnings("rawtypes")
ObjectIdentity identity = new ObjectIdentity(repository);
DataObject dataObject = new DataObject(identity, "dm_document");
According to the javadocs for ObjectIdentity:
An ObjectIdentity instance contains a repository name and a unique identifier that can take various forms, specified by ObjectIdentityType
enum constants. When constructing a DataObject to pass to the create operation, or in any case when the DataObject represents a repository object that does not yet exist, the ObjectIdentity need only be populated with a repository name.
Indeed, if I print out identity.getType it shows the type to be UNDEFINED, as one would expect. However, UNDEFINED is not a supported type and neither is STRING_URI (I found this by reading other posts on this forum). The exact error is:
Message: "Create" operation failed for object: [Test.txt] [id =null] PROPERTIES [object_name=Test.txt]. Unsupported ObjectIdentity type: "STRING_URI".
CauseCode: [E_UNSUPPORTED_OBJECT_TYPE] Unsupported ObjectIdentity type: "STRING_URI".>
I'm not sure how the ObjectIdentity type went from UNDEFINED to STRING_URI, but there you have it. Sort of a catch 22 situation. You'd think the PL wouldn't care what the type is on creation, but apparently it does.
Anyone have a fix?