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

IllegalStateException: Long-running operations prohibited

Hi,

At the client side, I am getting the IllegalStateException during a call to two methods. And its apparently because of long running operations. However, when I run my plugin in the PDE, it runs without this exception. But, when I deploy it as a plugin, it always gives these types of errors.

1) com.ibm.team.scm.client.internal.RepositoryItemProvider.fetchItem(RepositoryItemProvider.java:133)

2) edu.cmu.cs.mse.gsd.bridge.jazzlayer.WorkItemBrokerImpl.getWorkItem(WorkItemBrokerImpl.java:200)

There are a few items (<10), which are supposed to be returned in the result set. Has anyone seen this exception before. It will be great if some1 share a solution to this problem.

Following is the complete trace,
java.lang.IllegalStateException: Long-running operations prohibited on this thread
at com.ibm.team.repository.client.util.ThreadCheck.checkLongOpsAllowed(ThreadCheck.java:117)
at com.ibm.team.repository.client.internal.ServiceInterfaceProxy.invoke(ServiceInterfaceProxy.java:81)
at $Proxy22.fetchQueryResults(Unknown Source)
at com.ibm.team.workitem.common.internal.query.QueryCommon$3.run(QueryCommon.java:155)
at com.ibm.team.workitem.common.internal.query.QueryCommon$3.run(QueryCommon.java:1)
at com.ibm.team.workitem.client.internal.ClientServiceContext$1.run(ClientServiceContext.java:41)
at com.ibm.team.repository.client.internal.TeamRepository$3.run(TeamRepository.java:1164)
at com.ibm.team.repository.common.transport.CancelableCaller.call(CancelableCaller.java:79)
at com.ibm.team.repository.client.internal.TeamRepository.callCancelableService(TeamRepository.java:1157)
at com.ibm.team.workitem.client.internal.ClientServiceContext.callCancelableService(ClientServiceContext.java:45)
at com.ibm.team.workitem.common.internal.query.QueryCommon.fetchQueryResults(QueryCommon.java:152)
at com.ibm.team.workitem.common.internal.query.QueryResultIterator.fetchFirstPage(QueryResultIterator.java:151)
at com.ibm.team.workitem.common.internal.query.QueryResultIterator.update(QueryResultIterator.java:129)
at com.ibm.team.workitem.common.internal.query.QueryResultIterator.nextPage(QueryResultIterator.java:104)
at com.ibm.team.workitem.common.internal.query.ResolvingQueryResultIterator.update(ResolvingQueryResultIterator.java:125)
at com.ibm.team.workitem.common.internal.query.ResolvingQueryResultIterator.next(ResolvingQueryResultIterator.java:97)
at com.ibm.team.workitem.common.internal.query.ResolvingQueryResultIterator.next(ResolvingQueryResultIterator.java:1)
at edu.cmu.cs.mse.gsd.bridge.jazzlayer.WorkItemBrokerImpl.getWorkItem(WorkItemBrokerImpl.java:200)



Thanks,
Abhi

0 votes



2 answers

Permanent link
On Sat, 18 Jul 2009 22:52:55 +0000, abhminde wrote:
java.lang.IllegalStateException: Long-running operations prohibited on
this thread
at
com.ibm.team.repository.client.util.ThreadCheck.checkLongOpsAllowed(ThreadCheck.java:117)
at
com.ibm.team.repository.client.internal.ServiceInterfaceProxy.invoke(ServiceInterfaceProxy.java:81)
at $Proxy21.fetchQueryResults(Unknown Source)

This error indicates that a call to the server is being initiated on the UI thread. Doing this would cause the UI to stop updating until the network request completes, which is strongly discouraged.

API which results in calls to the server is marked with the @LongOp Javadoc tag. Calls to these APIs must be made in a background thread. Generally, this means using a background Job in Eclipse.


--
Jared Burns
Jazz Process Team

0 votes


Permanent link
Thanks Jared. It really helped.

On Sat, 18 Jul 2009 22:52:55 +0000, abhminde wrote:
java.lang.IllegalStateException: Long-running operations prohibited on
this thread
at
com.ibm.team.repository.client.util.ThreadCheck.checkLongOpsAllowed(ThreadCheck.java:117)
at
com.ibm.team.repository.client.internal.ServiceInterfaceProxy.invoke(ServiceInterfaceProxy.java:81)
at $Proxy21.fetchQueryResults(Unknown Source)

This error indicates that a call to the server is being initiated on the UI thread. Doing this would cause the UI to stop updating until the network request completes, which is strongly discouraged.

API which results in calls to the server is marked with the @LongOp Javadoc tag. Calls to these APIs must be made in a background thread. Generally, this means using a background Job in Eclipse.


--
Jared Burns
Jazz Process Team

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
× 10,937

Question asked: Jul 18 '09, 6:40 p.m.

Question was seen: 6,628 times

Last updated: Jul 18 '09, 6:40 p.m.

Confirmation Cancel Confirm