Fedora add datastream Exception

Today, when I deployed my application on a production server and tested it, I received this exception:

fedora.server.errors.GeneralException: Unable to add or modify object (commit canceled)

This is caused by fedora.API-M.addDatastream() method. It turned out that the issue is because I used null value for an alternateid, instead of an empty array of string. This is quite strange because everything works fine on my development machine. Anyway, this is the correct syntax.

apim.addDatastream(“changeme:1”, “DsId”, new String[] {}, …);

This is “NOT QUITE RIGHT”:

apim.addDatastream(“changeme:1”, “DsId”, null, …);

Source: [1], [2].

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: