Stollenwerk

Absent Member.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2009-11-20
08:22
1515 views
OTA QC9.2: Interop ILinkable.BugLinkFactory (Requirement <=> Bug)
Hi,
I got the following problem when linking requirements to defects with OTA:
Creating several "requirement to bug" links over OTA only works for the first time accessing the IRequirement.BugLinkFactory object. The links are visible in the QC-GUI and the db entries look exactly like the ones created from the QC-GUI.
When I try to add another "requirement to bug" link to the same requirement and different defect, I got an exception telling me "Your Quality Center session has been disconnected. Contact your system administrator for more information" (Unknown error).
IMPORTANT FACT: That only happens if I reconnect between adding links with OTA. Within one connection it is possible to add several bugs to an requirement - Same requirement but different instances.
Here's the snippet:
[1] IBug bug = ...
[2] IReq2 requirement = ...
[3] ILinkable linkable = (ILinkable) requirement;
[4] ILinkFactory linkFactory = (ILinkFactory) [5] linkable.BugLinkFactory;
[6] ILink link = (ILink) linkFactory.AddItem (bug);
[7] link.Post ();
[8] //Reconnect and start with [1] (second bug)
On [6] the exception is thrown (after reconnect). I also tried linkFactory.AddItem (bug.Id) and linkFactory.AddItem (System.DBNull.Value) followed by setting the TargetEntity - no luck.
Adding the first buglink with QC-GUI and (reconnect) adding the second buglink with OTA works. (reconnect) Adding a third buglink with OTA results in the exception.
Adding the first buglink with OTA and adding the second and third buglink with QC-GUI works. (reconnect) Adding another buglink with OTA results in the exception.
It looks like the modified requirement BugLinkFactory is corrupt or maybe locked after adding links to it. As I mentioned before only reconnecting causes the problem.
Any help would be appreciated.
Thanks in advance and best regards,
Thomas
I got the following problem when linking requirements to defects with OTA:
Creating several "requirement to bug" links over OTA only works for the first time accessing the IRequirement.BugLinkFactory object. The links are visible in the QC-GUI and the db entries look exactly like the ones created from the QC-GUI.
When I try to add another "requirement to bug" link to the same requirement and different defect, I got an exception telling me "Your Quality Center session has been disconnected. Contact your system administrator for more information" (Unknown error).
IMPORTANT FACT: That only happens if I reconnect between adding links with OTA. Within one connection it is possible to add several bugs to an requirement - Same requirement but different instances.
Here's the snippet:
[1] IBug bug = ...
[2] IReq2 requirement = ...
[3] ILinkable linkable = (ILinkable) requirement;
[4] ILinkFactory linkFactory = (ILinkFactory) [5] linkable.BugLinkFactory;
[6] ILink link = (ILink) linkFactory.AddItem (bug);
[7] link.Post ();
[8] //Reconnect and start with [1] (second bug)
On [6] the exception is thrown (after reconnect). I also tried linkFactory.AddItem (bug.Id) and linkFactory.AddItem (System.DBNull.Value) followed by setting the TargetEntity - no luck.
Adding the first buglink with QC-GUI and (reconnect) adding the second buglink with OTA works. (reconnect) Adding a third buglink with OTA results in the exception.
Adding the first buglink with OTA and adding the second and third buglink with QC-GUI works. (reconnect) Adding another buglink with OTA results in the exception.
It looks like the modified requirement BugLinkFactory is corrupt or maybe locked after adding links to it. As I mentioned before only reconnecting causes the problem.
Any help would be appreciated.
Thanks in advance and best regards,
Thomas
5 Replies
Suleena Sharma

Absent Member.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2010-06-28
16:38
I am trying to link a posted requirement to a defect , but it fails the first time as well. This is because I do not have the requirement id .
Are you able to create a link between a requirement and defect with just the requirement object or name via vbscript? If yes please let me know
thanks
Stollenwerk

Absent Member.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2010-06-29
07:00
Linking requirements and defects works fine for me. My problem seems to occur after the reconnect.
The following should link a requirement object with a bug (not translated to vbscript):
ILinkable linkable = (ILinkable) YourReqObj;
ILink link = (ILink) YourReqObj.BugLinkFactory.AddItem (YourBugObj);
link.Post ();
Hope this might help.
Regards,
Tom
The following should link a requirement object with a bug (not translated to vbscript):
ILinkable linkable = (ILinkable) YourReqObj;
ILink link = (ILink) YourReqObj.BugLinkFactory.AddItem (YourBugObj);
link.Post ();
Hope this might help.
Regards,
Tom
Suleena Sharma

Absent Member.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2010-06-29
10:23
Thanks a lot. The problem is that vbscript is not implememting Ilinkable or link object . I could only create the Bug, req and Linkfactory objects.
maybe I am missing something, not sure what.
fachexot

Absent Member.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2013-10-17
15:13
I know that the original first post is from 2009, but I decided to try my luck. Maybe there is some answer out there waiting for me 🙂
I got nearly the same problem.
My BugLinkFactory object does not create a NewList("") after a reconnect. In one session, everything is working fine, but when I reconnect (in my case by cancelling the operation and starting it again) the QC connection, it fails and throws an exception respectively access violation in OTAClient.dll (literally like: "access violation at 0x00000000")
Is there any hint, why this happens only when reconnecting and only with BugLinkFactory? For example TestFactory is working fine....
Thank you in advance,
fachexot


Absent Member..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2013-10-17
16:09
Please psot couple of statements in your code (before and after the statement wher it errors) or you closing and reconnecting statement. Thanks!