|
From: <lac...@us...> - 2007-10-04 11:24:52
|
Revision: 45
http://td2jira.svn.sourceforge.net/td2jira/?rev=45&view=rev
Author: lacostej
Date: 2007-10-04 04:24:56 -0700 (Thu, 04 Oct 2007)
Log Message:
-----------
workaround a failure to retrieve some attachments from TD. May be a TD issue or some sort of jacob/TD combination problem.
Modified Paths:
--------------
trunk/td2jira/docs/KnownIssues.txt
trunk/td2jira/docs/ReleaseNotes.txt
trunk/td2jira/src/td2jira/sync/SyncUtils.java
Modified: trunk/td2jira/docs/KnownIssues.txt
===================================================================
--- trunk/td2jira/docs/KnownIssues.txt 2007-10-04 11:17:49 UTC (rev 44)
+++ trunk/td2jira/docs/KnownIssues.txt 2007-10-04 11:24:56 UTC (rev 45)
@@ -1,3 +1,10 @@
+* Issue #1: sometimes it is not possible to invoke get attachment on some of the issues.
+ This is repeatable but couldn't identify the problem yet.
+
+ We have to ignore those failures for know at the rest of the synchronization works.
+
+ This problem was encountered against TD v8.2 SP1 using Jacob 1.13 (M5)
+
com.jacob.com.ComFailException: Invoke of: Data
Source:
Description: The Factory failed to create attachment storage object.
@@ -5,7 +12,7 @@
at com.jacob.com.Dispatch.invokev(Native Method)
at com.jacob.com.Dispatch.invokev(Dispatch.java:945)
at com.jacob.com.Dispatch.get(Dispatch.java:1312)
- at td2jira.td.api.dcom.Bug.retrieveAttachmentData(Bug.java:214)
+ at td2jira.td.api.dcomv8.Bug.retrieveAttachmentData(Bug.java:214)
at td2jira.td.TDConnector.getAttachmentData(TDConnector.java:88)
at td2jira.sync.SyncUtils.addAttachment(SyncUtils.java:68)
at td2jira.sync.SyncUtils.syncAttachmentsToJIRA(SyncUtils.java:46)
Modified: trunk/td2jira/docs/ReleaseNotes.txt
===================================================================
--- trunk/td2jira/docs/ReleaseNotes.txt 2007-10-04 11:17:49 UTC (rev 44)
+++ trunk/td2jira/docs/ReleaseNotes.txt 2007-10-04 11:24:56 UTC (rev 45)
@@ -12,5 +12,6 @@
The fixes in dcomv8/Bug.java might need to be backported to v9 support.
* FEATURE Create JIRA issues with the right assignee
* FEATURE allow to switch TD from read-only to read-write (defaults to read-only).
+* WORK-AROUND a failure to retrieve some attachments from TD. May be a TD issue or some sort of jacob/TD combination problem.
Old release
Modified: trunk/td2jira/src/td2jira/sync/SyncUtils.java
===================================================================
--- trunk/td2jira/src/td2jira/sync/SyncUtils.java 2007-10-04 11:17:49 UTC (rev 44)
+++ trunk/td2jira/src/td2jira/sync/SyncUtils.java 2007-10-04 11:24:56 UTC (rev 45)
@@ -56,8 +56,18 @@
List<String> tdAttachments = tc.getAttachmentsNames(pair.getTdIssue());
for (String attachmentName : tdAttachments) {
- if (hasAttachmentInJira(comments, attachmentName)) continue;
- addAttachment(tc, jc, pair, pair.getJiraIssue(), attachmentName);
+ if (hasAttachmentInJira(comments, attachmentName))
+ continue;
+ try {
+ addAttachment(tc, jc, pair, pair.getJiraIssue(), attachmentName);
+ } catch (com.jacob.com.ComFailException e) {
+ // work-around Known Issue #1
+ if (e.getMessage().contains("The Factory failed to create attachment storage object.")) {
+ logger.warn("Ignoring JACOB issue for attachment " + pair + " . To investigate...", e);
+ } else {
+ throw e;
+ }
+ }
}
// List<String> tdAttachments = tc.getAttachmentsNames(pair.getTdIssue());
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|