Highlighted
Absent Member.
Absent Member.
1889 views

Change Requirement Description with Java

Jump to solution

Hello,

i tried to change the requirement description of many requirements. In these descriptions are only a link, which is different in one part. All links have the requirement-name in its address.

String param = base.getName();
param = param.substring(0,param.indexOf(' '));
base.lock();
base.getDescription().setText("<html xmlns=\"http://www.w3.org/1999/xhtml\"><head /><body><a href=\"http://fe50000e.com/" + param + ".html\">AC00151</a></body></html>");
base.save();

The output of the different variables are ok, but I can't change the description. I get the following message:

com.starbase.caliber.server.ObjectLockedException: null
    nested exception is:
        Caliber.OBJECT_ALREADY_RESERVED: IDL:Caliber/OBJECT_ALREADY_RESERVED:1.0
        IDL:Caliber/OBJECT_ALREADY_RESERVED:1.0

What's wrong? I also tested with setDescription link described in SDK, but i get a format-error (incompatible types).

Can anybody help me?

Ina

0 Likes
1 Solution

Accepted Solutions
Highlighted
Micro Focus Contributor
Micro Focus Contributor

Hi

The error means there is a lock on the requirements. Add base.unlock(); before base.lock(); in your code. Recycling your Caliber services will also resolve the issue

View solution in original post

0 Likes
2 Replies
Highlighted
Micro Focus Contributor
Micro Focus Contributor

Hi

The error means there is a lock on the requirements. Add base.unlock(); before base.lock(); in your code. Recycling your Caliber services will also resolve the issue

View solution in original post

0 Likes
Highlighted
Absent Member.
Absent Member.

Thanks for helping 🙂

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.