Getting PermissionDeniedException while creation of work item for follow up action
item.com.ibm.team.repository.common.PermissionDeniedException: Missing permission to fetch items
at com.ibm.team.workitem.service.internal.AuditableServer.resolveAuditablesPermissionAware(AuditableServer.java:161)
at com.ibm.team.workitem.common.internal.WorkItemCommon.createWorkItem(WorkItemCommon.java:247)
at com.ibm.team.workitem.common.internal.WorkItemCommon.createWorkItem2(WorkItemCommon.java:232)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611)
at com.ibm.team.workitem.service.internal.ServiceAdapter.invoke(ServiceAdapter.java:75)
at com.sun.proxy.$Proxy2671.createWorkItem2(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611)
at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.invoke(ExportProxyServiceRecord.java:361)
at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.access$0(ExportProxyServiceRecord.java:347)
at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord$ExportedServiceInvocationHandler.invoke(ExportProxyServiceRecord.java:56)
at com.sun.proxy.$Proxy2674.createWorkItem2(Unknown Source)
at com.fcagroup.pmbd.plugin.CRAutoGenerateWI.DynamicDisciplineTaskCreator.createDiscipline(DynamicDisciplineTaskCreator.java:613)
at com.fcagroup.pmbd.plugin.CRAutoGenerateWI.DynamicDisciplineTaskCreator.createLevelThreeTreeWI(DynamicDisciplineTaskCreator.java:424)
at com.fcagroup.pmbd.plugin.CRAutoGenerateWI.WorkItemCreation.run(WorkItemCreation.java:47)
com.ibm.team.repository.common.PermissionDeniedException: Missing permission to fetch items
One answer
Comments
Hi Ralph,
The fllow-up actions/Participants run in the database transaction context as far as I can tell, to allow to error and prevent a save. There is also a special Job Model for sever operations. I assume that you would have to conform to that Job model. Don't ask me how it works, though.
1 vote
@anuragpatel153 what's your motivation for using threads in a server-side script?