Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

CQ Connector is generating StringIndexOutOfBoundsException

I have the synchronization working from RTC to CQ, but no updates from CQ to RTC the interop gateway is reporting 4 errors, and the console shows these 4 errors.

Any suggestions for troubleshooting this further are appreciated :)

-Sean


17 Jul 2009 08:31:02,328 [ContainerBackgroundProcessor[StandardEngine[Catalina]]] DEBUG org.apache.catalina.session.ManagerBase - Start expire sessions StandardManager at 1247837
462328 sessioncount 0
17 Jul 2009 08:31:02,328 [ContainerBackgroundProcessor[StandardEngine[Catalina]]] DEBUG org.apache.catalina.session.ManagerBase - End expire sessions StandardManager processingTi
me 0 expired sessions: 0
17 Jul 2009 08:31:04,281 [CQ Interop Polling] DEBUG com.ibm.rational.interop.level2 - Got connection at 0 for CQ Interop Polling
17 Jul 2009 08:31:04,281 [CQ Interop Polling] DEBUG com.ibm.rational.interop.level2 - Using CQInteropEventHandler-TR-HK/CQ-CQ Interop Polling
17 Jul 2009 08:31:04,312 [CQ Interop Polling] DEBUG com.ibm.rational.interop.level2 - Releasing CQInteropEventHandler-TR-HK/CQ-CQ Interop Polling
17 Jul 2009 08:31:04,312 [CQ Interop Polling] DEBUG com.ibm.rational.interop.level2 - Number of change history records read: 4
java.lang.StringIndexOutOfBoundsException
at java.lang.String.substring(String.java:1088)
at com.ibm.rational.connector.cq.teamapi.common.internal.CQNoteEntry.parseContents(CQNoteEntry.java:131)
at com.ibm.rational.connector.cq.teamapi.common.internal.CQNoteEntry.parseCQContents(CQNoteEntry.java:109)
at com.ibm.rational.connector.cq.gateway.CQInteropPollingManager.formatNotes(CQInteropPollingManager.java:339)
at com.ibm.rational.connector.cq.gateway.CQInteropPollingManager.generatePropertyValue(CQInteropPollingManager.java:299)
at com.ibm.rational.connector.cq.gateway.CQInteropPollingManager.createProperties(CQInteropPollingManager.java:239)
at com.ibm.rational.connector.cq.gateway.CQInteropPollingManager.prepareRecordsForProcessing(CQInteropPollingManager.java:498)
at com.ibm.rational.connector.cq.gateway.CQInteropPollingManager.synchronizeIncoming(CQInteropPollingManager.java:607)
at com.ibm.rational.connector.cq.gateway.polling.PollingThread.pollingIncoming(PollingThread.java:48)
at com.ibm.rational.connector.cq.gateway.polling.PollingThread.run(PollingThread.java:31)
java.lang.StringIndexOutOfBoundsException
at java.lang.String.substring(String.java:1088)
at com.ibm.rational.connector.cq.teamapi.common.internal.CQNoteEntry.parseContents(CQNoteEntry.java:131)
at com.ibm.rational.connector.cq.teamapi.common.internal.CQNoteEntry.parseCQContents(CQNoteEntry.java:109)
at com.ibm.rational.connector.cq.gateway.CQInteropPollingManager.formatNotes(CQInteropPollingManager.java:339)
at com.ibm.rational.connector.cq.gateway.CQInteropPollingManager.generatePropertyValue(CQInteropPollingManager.java:299)
at com.ibm.rational.connector.cq.gateway.CQInteropPollingManager.createProperties(CQInteropPollingManager.java:239)
at com.ibm.rational.connector.cq.gateway.CQInteropPollingManager.prepareRecordsForProcessing(CQInteropPollingManager.java:498)
at com.ibm.rational.connector.cq.gateway.CQInteropPollingManager.synchronizeIncoming(CQInteropPollingManager.java:607)
at com.ibm.rational.connector.cq.gateway.polling.PollingThread.pollingIncoming(PollingThread.java:48)
at com.ibm.rational.connector.cq.gateway.polling.PollingThread.run(PollingThread.java:31)
java.lang.StringIndexOutOfBoundsException
at java.lang.String.substring(String.java:1088)
at com.ibm.rational.connector.cq.teamapi.common.internal.CQNoteEntry.parseContents(CQNoteEntry.java:131)
at com.ibm.rational.connector.cq.teamapi.common.internal.CQNoteEntry.parseCQContents(CQNoteEntry.java:109)
at com.ibm.rational.connector.cq.gateway.CQInteropPollingManager.formatNotes(CQInteropPollingManager.java:339)
at com.ibm.rational.connector.cq.gateway.CQInteropPollingManager.generatePropertyValue(CQInteropPollingManager.java:299)
at com.ibm.rational.connector.cq.gateway.CQInteropPollingManager.createProperties(CQInteropPollingManager.java:239)
at com.ibm.rational.connector.cq.gateway.CQInteropPollingManager.prepareRecordsForProcessing(CQInteropPollingManager.java:498)
at com.ibm.rational.connector.cq.gateway.CQInteropPollingManager.synchronizeIncoming(CQInteropPollingManager.java:607)
at com.ibm.rational.connector.cq.gateway.polling.PollingThread.pollingIncoming(PollingThread.java:48)
at com.ibm.rational.connector.cq.gateway.polling.PollingThread.run(PollingThread.java:31)
java.lang.StringIndexOutOfBoundsException
at java.lang.String.substring(String.java:1088)
at com.ibm.rational.connector.cq.teamapi.common.internal.CQNoteEntry.parseContents(CQNoteEntry.java:131)
at com.ibm.rational.connector.cq.teamapi.common.internal.CQNoteEntry.parseCQContents(CQNoteEntry.java:109)
at com.ibm.rational.connector.cq.gateway.CQInteropPollingManager.formatNotes(CQInteropPollingManager.java:339)
at com.ibm.rational.connector.cq.gateway.CQInteropPollingManager.generatePropertyValue(CQInteropPollingManager.java:299)
at com.ibm.rational.connector.cq.gateway.CQInteropPollingManager.createProperties(CQInteropPollingManager.java:239)
at com.ibm.rational.connector.cq.gateway.CQInteropPollingManager.prepareRecordsForProcessing(CQInteropPollingManager.java:498)
at com.ibm.rational.connector.cq.gateway.CQInteropPollingManager.synchronizeIncoming(CQInteropPollingManager.java:607)
at com.ibm.rational.connector.cq.gateway.polling.PollingThread.pollingIncoming(PollingThread.java:48)
at com.ibm.rational.connector.cq.gateway.polling.PollingThread.run(PollingThread.java:31)
17 Jul 2009 08:31:04,406 [CQ Interop Polling] DEBUG com.ibm.rational.interop.level2 - No changes to TR-HK/CQ
17 Jul 2009 08:31:04,406 [CQ Interop Polling] DEBUG com.ibm.rational.interop.level2 - Number of change history records read: 0
17 Jul 2009 08:31:04,406 [CQ Interop Polling] DEBUG com.ibm.rational.interop.level2 - Number of records processed:0
17 Jul 2009 08:31:04,406 [CQ Interop Polling] DEBUG com.ibm.rational.interop.level2 - Number of records generation errors:4
17 Jul 2009 08:31:04,421 [CQ Interop Polling] DEBUG com.ibm.rational.interop.level2 - Number of records ignored:0
17 Jul 2009 08:31:04,421 [CQ Interop Polling] DEBUG com.ibm.rational.interop.level2 - Number of records suppressed:0
17 Jul 2009 08:31:04,421 [CQ Interop Polling] DEBUG com.ibm.rational.interop.level2 - Number of records deleted:0
17 Jul 2009 08:31:04,421 [CQ Interop Polling] DEBUG com.ibm.rational.interop.level2 - Total Number of records not processed:0

0 votes



8 answers

Permanent link
We've seen this happen when the CQ schema is not using the standard Notes package that comes with CQ. Are you using it, or have you "rolled your own" notes/comments implementation?

This can also happen if your synchronization rule is causing bad data to be written to the Notes_Log field in CQ. What does the property mapping for the Notes_Log field in your sync rule look like? Does it specify use of the Work Item Comments Transformer? The online help topic for configuration synchronization of work item comments with CQ notes is http://publib.boulder.ibm.com/infocenter/rtc/v2r0m0/topic/com.ibm.team.connector.cq.doc/topics/t_mapping_comments.html

Also, what version of RTC and the CQ Connector are you using? In the 2.0 release, some changes were made to deal with unexpected formatting of the Notes_Log field.

0 votes


Permanent link
John,

Thanks again for the quick responses here, this is in fact the Notes 5.1 field but it looks like it is a standard configuration. This is RTC 1.0.1.1 and Gateway M20090225-1543 with CQ 7.1, but the strange thing is that I am not synchronizing any comments right now are they mandatory?

-Sean



<xml>
<syncRule>
<name>sample02.cq.tr-hk.cq.Faults</name>
<externalTypeName>com.ibm.rational.clearquest.Fault</externalTypeName>
<syncItemTypeName>WorkItem</syncItemTypeName>
<syncItemTypeNsURI>com.ibm.team.workitem</syncItemTypeNsURI>
<syncItemTypeQualifier></syncItemTypeQualifier>
<itemManager>com.ibm.team.interop.service.managers.workitem.WorkItemManager</itemManager>
<externalManager>com.ibm.team.interop.service.managers.clearquest.CQExternalManager</externalManager>
<maxCycleCount>0</maxCycleCount>
<syncAllItemStates>false</syncAllItemStates>
<propertyMappings>
<propertyMapping>
<externalPropertyName>project_ref</externalPropertyName>
<itemPropertyName>Category</itemPropertyName>
<incoming>true</incoming>
<outgoing>true</outgoing>
<itemIdentifier>false</itemIdentifier>
<externalIdentifier>false</externalIdentifier>
<externalModifier>false</externalModifier>
<requiredItemProperties></requiredItemProperties>
<requiredExternalProperties></requiredExternalProperties>
<referenceSyncRule>sample02.cq.tr-hk.cq.Projects</referenceSyncRule>
</propertyMapping>
<propertyMapping>
<externalPropertyName>id</externalPropertyName>
<itemPropertyName>attribute:smallString:CQ Id</itemPropertyName>
<incoming>true</incoming>
<outgoing>false</outgoing>
<itemIdentifier>false</itemIdentifier>
<externalIdentifier>true</externalIdentifier>
<externalModifier>false</externalModifier>
<requiredItemProperties></requiredItemProperties>
<requiredExternalProperties></requiredExternalProperties>
</propertyMapping>
<propertyMapping>
<externalPropertyName>title</externalPropertyName>
<itemPropertyName>Summary</itemPropertyName>
<incoming>true</incoming>
<outgoing>true</outgoing>
<itemIdentifier>false</itemIdentifier>
<externalIdentifier>false</externalIdentifier>
<externalModifier>false</externalModifier>
<requiredItemProperties></requiredItemProperties>
<requiredExternalProperties></requiredExternalProperties>
</propertyMapping>
<propertyMapping>
<externalPropertyName>jazz_work_item</externalPropertyName>
<itemPropertyName>Id</itemPropertyName>
<incoming>false</incoming>
<outgoing>true</outgoing>
<itemIdentifier>true</itemIdentifier>
<externalIdentifier>false</externalIdentifier>
<externalModifier>false</externalModifier>
<requiredItemProperties></requiredItemProperties>
<requiredExternalProperties></requiredExternalProperties>
</propertyMapping>
<propertyMapping>
<externalPropertyName>assigned_to</externalPropertyName>
<itemPropertyName>Owner</itemPropertyName>
<incoming>true</incoming>
<outgoing>true</outgoing>
<itemIdentifier>false</itemIdentifier>
<externalIdentifier>false</externalIdentifier>
<externalModifier>false</externalModifier>
<requiredItemProperties></requiredItemProperties>
<requiredExternalProperties></requiredExternalProperties>
<referenceSyncRule>sample02.cq.tr-hk.cq.users</referenceSyncRule>
</propertyMapping>
</propertyMappings>
</syncRule>

0 votes


Permanent link
The error is coming from code that processes all changes that occur to a CQ record when it is saved, before determining which fields are configured for synchronization. (First all the information about which fields were changed is collected, then the changed fields that are configured for synchronization are sent to the Jazz server.) So there seems to be something unusual in the notes data for the records that you are having problems with. Presumably, the problem doesn't occur with records that have no notes? Does it seem to occur with any record that has notes, or only certain ones? Can you copy and paste in all the information from the Notes Log field in the Notes tab of a record which has the problem, so we can see if there is something unusual about it?

0 votes


Permanent link
John,

That is good to know, in this case these are very simple test records. Here none of the 4 records have any notes, could that be part of the problem?

-Sean

0 votes


Permanent link
Hi Sean....

The changes made in CQ are remembered in a record type called JazzConnectorChangeEvents. Could you go into a CQ client and see
if there are records in that table? The easiest way is to write a query (see http://jazz.net/library/technote/89, in the Testing the CQ Connector section.) There should be some records since you saw an error while they were being processed, and therefore, they should not have been deleted.

If so, please use the CQ client's export record facility (File > Export > Records...) to create a "dump" of the records. Pick JazzConnectorChangeEvents as the record type, and select "Export All records". On the next page of the wizard, click on "add all". In the next few screens you can take the defaults, but you might want to direct the export to a particular file.

Send me the results. My email is in my profile....

Rich Piazza
Jazz CQ Connector team

0 votes


Permanent link
Thanks Rich, I just sent you an email, please let me know if these give you any other clues or suggestions that I can try on my side.

-Sean

0 votes


Permanent link
Since there was some custom formatting of the notes field, the 1.0.1.1 notes parser had a parse error. The 2.0 notes parser is more tolerant of the format of the note delimiter. Work item 88628 has been entered to handle this situation more effectively.

Rich
Jazz CQ Connector team

0 votes


Permanent link
Just a follow up, that when I setup RTC 2.x to sync comments it was better at handling the issue, and failed with the error you might expect.

Outgoing at 8/5/09 9:47:36 AM CDT

Error occurred:
java.lang.RuntimeException: com.ibm.team.interop.service.managers.clearquest.common.InteropException: com.ibm.team.interop.service.managers.clearquest.common.InteropException: The contents of the Notes_Log field does not conform to the CQ Notes package formatting. This field cannot be used for comment synchronization.
com.ibm.team.interop.service.managers.clearquest.common.InteropException: com.ibm.team.interop.service.managers.clearquest.common.InteropException: The contents of the Notes_Log field does not conform to the CQ Notes package formatting. This field cannot be used for comment synchronization.


-Sean

0 votes

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details

Question asked: Jul 17 '09, 9:43 a.m.

Question was seen: 6,144 times

Last updated: Jul 17 '09, 9:43 a.m.

Confirmation Cancel Confirm