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

[closed] Error while creating attachment in RTC client

java.lang.IllegalArgumentException: Item id and State id must not be null

CRJAZ2796E Details about the error were written to the server log file. To find this data, search the log file for this identifier: 46D92912CE1D5A029746D4D5D12B8929F794DA66.

at com.ibm.team.repository.common.internal.marshal.util.MarshallerUtil.decodeExceptions(MarshallerUtil.java:377)

at com.ibm.team.repository.common.internal.marshal.util.MarshallerUtil.decodeExceptions(MarshallerUtil.java:347)

at com.ibm.team.repository.common.internal.marshal.util.MarshallerUtil.decodeFault(MarshallerUtil.java:312)

at com.ibm.team.repository.transport.client.RemoteTeamService.constructExceptionFromFault(RemoteTeamService.java:716)

at com.ibm.team.repository.transport.client.RemoteTeamService.executeMethod(RemoteTeamService.java:559)

at com.ibm.team.repository.transport.client.RemoteTeamService.invoke(RemoteTeamService.java:202)

at com.ibm.team.repository.transport.client.ServiceInvocationHandler.invoke(ServiceInvocationHandler.java:43)

at jdk.proxy4/jdk.proxy4.$Proxy246.save(Unknown Source)

at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)

at java.base/java.lang.reflect.Method.invoke(Method.java:580)

at com.ibm.team.repository.client.internal.ServiceInterfaceProxy.invokeServiceCall(ServiceInterfaceProxy.java:254)

at com.ibm.team.repository.client.internal.ServiceInterfaceProxy.invoke(ServiceInterfaceProxy.java:110)

at jdk.proxy4/jdk.proxy4.$Proxy246.save(Unknown Source)

at com.ibm.team.workitem.client.internal.WorkItemSaveTransport$1.run(WorkItemSaveTransport.java:33)

at com.ibm.team.repository.client.internal.TeamRepository$3.run(TeamRepository.java:1354)

at com.ibm.team.repository.common.transport.CancelableCaller.call(CancelableCaller.java:79)

at com.ibm.team.repository.client.internal.TeamRepository.callCancelableService(TeamRepository.java:1349)

at com.ibm.team.workitem.client.internal.WorkItemSaveTransport.call(WorkItemSaveTransport.java:30)

at com.ibm.team.workitem.client.internal.WorkItemSaveRunnable.run(WorkItemSaveRunnable.java:37)

at com.ibm.team.process.internal.common.advice.runtime.OperationAdviceManager.runRunnable(OperationAdviceManager.java:1514)

at com.ibm.team.process.internal.common.advice.runtime.OperationAdviceManager.execute(OperationAdviceManager.java:209)

at com.ibm.team.process.internal.client.ProcessClientService.execute(ProcessClientService.java:774)

at com.ibm.team.workitem.client.internal.WorkItemClient.save(WorkItemClient.java:578)

at com.ibm.team.workitem.client.internal.WorkItemClient.save(WorkItemClient.java:566)

at com.ibm.team.workitem.common.internal.WorkItemCommon.internalSaveAuditables(WorkItemCommon.java:1380)

at com.ibm.team.workitem.common.internal.WorkItemCommon.internalSaveAuditables(WorkItemCommon.java:1365)

at com.ibm.team.workitem.common.internal.WorkItemCommon.saveAuditables(WorkItemCommon.java:1357)

at com.ibm.team.workitem.common.internal.WorkItemCommon.saveAuditable(WorkItemCommon.java:1347)

at com.ibm.team.workitem.common.internal.WorkItemCommon.saveAttachment(WorkItemCommon.java:1085)

at com.ibm.team.workitem.client.internal.WorkItemClient.createAttachment(WorkItemClient.java:535)

at com.kovair.omnibus.adapter.rtc.common.RTCCommon.ExecuteAttachmentActions(RTCCommon.java:5441)

at com.kovair.omnibus.adapter.rtc.manager.RTCManager.ExecuteActions(RTCManager.java:805)

at com.kovair.omnibus.adapter.rtc.RTCAdapter.ExecuteAction(RTCAdapter.java:448)

at com.kovair.omnibus.adapter.platform.AdapterWrapper.ExecuteAction(AdapterWrapper.java:576)

at com.kovair.omnibus.engine.opManager.AdapterManager.ExecuteAction(AdapterManager.java:166)

at com.kovair.omnibus.engine.opManager.EngineWorkerForAction.run(EngineWorkerForAction.java:52)

at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)

at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)

at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)

at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)

at java.base/java.lang.Thread.run(Thread.java:1583)
i am getting this error while i execute this piece of code below 

IAttachment newAttachment = workItemClient.createAttachment(

workItem.getProjectArea(), finalAttachmentName, "", IContent.CONTENT_TYPE_UNKNOWN,

IContent.ENCODING_UTF_8, fis, monitor

);
Why is this error comming ,how can i fix it ? Any help would be really appreciated

0 votes

Comments

You have asked the same question already. I would suggest to maybe download the code from https://rsjazz.wordpress.com/2012/08/01/uploading-attachments-to-work-items/ and see if that works. The error message indicates that you try to pass an item that is not resolved. So maybe you want to check if the item ID and state ID of the IAuditables you pass are not null.


The question has been closed for the following reason: "Duplicate Question" by rschoon Apr 03 '25, 3:36 a.m.

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
× 12,142

Question asked: Apr 03 '25, 2:54 a.m.

Question was seen: 1,100 times

Last updated: Apr 03 '25, 3:39 a.m.

Confirmation Cancel Confirm