It's all about the answers!

Ask a question

IllegalStateException: Long-running operations prohibited


Abhishek Minde (7121912) | asked Jul 18 '09, 6:40 p.m.
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

2 answers



permanent link
Abhishek Minde (7121912) | answered Jul 21 '09, 6:15 a.m.
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

permanent link
Jared Burns (4.5k29) | answered Jul 20 '09, 8:31 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
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

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.