It's all about the answers!

Ask a question

Getting java.lang.IllegalArgumentException: Item Handle array cannot exceed 2048 elements-when loading file into component in stream


Boopathy Nagaraj (1517) | asked Aug 12 '16, 2:16 a.m.
Hello Jazz Team,

I am getting below exception in RTC when i load a more component(more than 1500..etc) into particular stream. Please provide solution to resolve this issue.

Exception in thread "main" java.lang.IllegalArgumentException: Item Handle array cannot exceed 2048 elements.
        at com.ibm.team.repository.service.internal.RepositoryItemService.fetchItemsPermissionAware(RepositoryItemService.java:796)
        at sun.reflect.GeneratedMethodAccessor305.invoke(null)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
        at java.lang.reflect.Method.invoke(Method.java:611)
    

3 answers



permanent link
Ralph Schoon (63.1k33645) | answered Aug 12 '16, 3:01 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Use more than one arrays with item handles to resolve items?

As far as I can tell, RTC components are not designed to be such fine grained and it also has other severe side effects to have so many components in streams.

See https://jazz.net/help-dev/clm/index.jsp?topic=%2Fcom.ibm.team.scm.doc%2Ftopics%2Ft_component_bestpractices.html

While there is no hard limit to the number of components in a stream, the recommended maximum number of components is 500, with up to 100,000 files and folders per component.


See https://jazz.net/library/article/205

Source Control: We recommend 50K files and folders in a single component and if you have more files to split them into multiple components. We encourage individual users to keep less than 300 change sets suspended. While there is no limitation, there is a tendency for a large suspended set can slow down operations involving the suspended set (suspend, resume, discard) as well as add to some additional costs in refreshing or changing collaborations. We have tested the user experience of working with a large number of components in workspaces and streams. There are no known issues with having hundreds of components in a stream or workspace, and we have tested the user experience with 500 components in a collaboration.

Please also read How should I ask a question in the Forum if I want to receive useful answers? because you don't provide any information really that would allow to answer.



 

Comments
Ralph Schoon commented Aug 17 '16, 9:47 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Apparently there is some kind of limitation for some Item Arrays that cause problems if the number of items is too big.


permanent link
Geoffrey Clemm (30.1k33035) | answered Aug 12 '16, 2:52 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
With the addition of hierarchical components, RTC should be able to handle more that 2000 components in a stream, as long as there are a reasonable number (less than 500, say) and any given level of the hierarchy.

So if you are working with RTC-6.x, please create a component hierarchy, and have no more than 500 components at any given level of the hierarchy.   If this still fails, please submit this as a defect (as a PMR, if you are under IBM support, as a jazz.net defect if you are not).


permanent link
Kevin Ramer (4.5k8183200) | answered Aug 12 '16, 4:30 p.m.
Follow up Question [forgive me for piggy-back ], but when I searched on the message, very few "fresh" things were found. 
[RTC 6.0.2 ifix02 ]
User reports similar message on Deliver operation from workspace that has lagged behind the stream.  This is part of the stack trace:

<com.ibm.team.repository.transport.client.RemoteTeamService spnego-enabled@9.123.135.66> /ccm/service/com.ibm.team.scm.common.IScmService] ERROR com.ibm.team.process.common
 - Item Handle array cannot exceed 2048 elements.
java.lang.IllegalArgumentException: Item Handle array cannot exceed 2048 elements.
        at com.ibm.team.repository.service.internal.RepositoryItemService.fetchItemsPermissionAware(RepositoryItemService.java:796)com.ibm.team.repository.service.internal.ComponentRepositoryItemService.fetchItems(ComponentRepositoryItemService.java:657)
        at com.ibm.team.scm.service.internal.utils.ServerItemProvider.fetchItems(ServerItemProvider.java:90)
        at com.ibm.team.scm.common.internal.util.ItemProviderUtil.fetchCurrents(ItemProviderUtil.java:58)
        at com.ibm.team.scm.common.internal.util.ItemProviderUtil.resolveLinks(ItemProviderUtil.java:132)
        at com.ibm.team.scm.common.links.ChangeSetLinks.resolveLinks(ChangeSetLinks.java:125)
        at com.ibm.team.filesystem.service.internal.ServerRequireWorkItemAdvisor.addProblems(ServerRequireWorkItemAdvisor.java:210)
        at com.ibm.team.filesystem.service.internal.ServerRequireWorkItemAdvisor.run(ServerRequireWorkItemAdvisor.java:170)
        at

I highlight the WorkItemAdvisor because there are Deliver (client)/ Deliver (server) preconditions, the latter requiring work item.

Could the Operation Advisor(s) be removed to enable that delivery ?

Comments
Ralph Schoon commented Aug 15 '16, 10:03 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

With the required permissions you can override and disable that operational behavior.


Kevin Ramer commented Aug 15 '16, 10:08 a.m.

The question I have is not related to whether or not someone can change/remove the behavior, rather whether removing the current behavior would alleviate the stated symptom.


Ralph Schoon commented Aug 15 '16, 10:42 a.m. | edited Aug 15 '16, 10:42 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

I wonder why you don't just try it out. What is the worst that can happen?

Also, please, create a PMR or defect.

Anything special about the change sets? Has someone collected changed for a long time? Do you have a huge amount of changes sets outgoing? Have you tried to just deliver one instead of all at once?


Kevin Ramer commented Aug 15 '16, 1:03 p.m.

Why not? I am a mere Jazz Admin; I do not own or manage project data.  This particular project has behaviors on several roles.  The affected user is 1/2 way round the world (AP) and the project owners are on US west coast.
QUOTE
Here's what I did:
1. load workplace from stream1
2. change flow target to stream2
3. accepet all Incomings from stream2
4. change flow target back to stream1
5. resolved all the Unresolved

Now I got the merged code in my workspace.

But when I try to delivery the changes in stream1. I got this. Seems there are too many changesets to deliver?
END QUOTE


Ralph Schoon commented Aug 16 '16, 2:17 a.m. | edited Aug 16 '16, 2:25 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

The interpretation of the error message is that somehow so many item handles pile up in one operation, that that exceeds the maximum size. So instead of trying to deliver all the changes, just delivering a few and then again, a few might help. Maybe split a change set with a huge amount of files into two. You don't provide any data that would allow more analysis.

The problem here is, that you ask the question, but you don't have a good description of the details of the problem and no way to do anything. So you hope for an answer that some approach would fix it for you. Not going to happen. Either you can reproduce what the user does, explain it and act on suggestions, or this is pointless and the user probably rather should ask the question in the first place.

My suggestion:
Option 1: Tell the user to try to deliver smaller subsets.
Option 2: Create a special role and overwrite the operation behavior that causes the issue and assign the user that role

In general open a PMR/Defect.



Kevin Ramer commented Aug 16 '16, 8:50 a.m.

Option 1 has been tried.   There happens to be a role "Code Master" w/o any preconditions on delivery.  User had that role at the project level, but also had Team Member which has preconditions.  In the owning team area user had only Team Member which I have changed to Code Master and advised a retry.

This was my search:  https://www.google.com/search?q=%22Item+Handle+array+cannot+exceed+2048%22&ie=utf-8&oe=utf-8 



Kevin Ramer commented Aug 17 '16, 8:46 a.m.

Removing the user's role having the deliver precondition allowed the deliver to complete.


Kevin Ramer commented Aug 17 '16, 3:23 p.m.

Opened Defect 398963 in "Rational Team Concert" project after researching existing work items.   Lots were similar, but none spoke to the precondition.

showing 5 of 8 show 3 more comments

Your answer


Register or 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.