Getting java.lang.IllegalArgumentException: Item Handle array cannot exceed 2048 elements-when loading file into component in stream
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
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.
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).
[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
With the required permissions you can override and disable that operational behavior.
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.
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?
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
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.
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
Removing the user's role having the deliver precondition allowed the deliver to complete.
Opened Defect 398963 in "Rational Team Concert" project after researching existing work items. Lots were similar, but none spoke to the precondition.