IllegalStateException: Long-running operations prohibited
Hi,
At the client side, I am getting theIllegalStateException 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
At the client side, I am getting the
1) com.ibm.team.scm.client.internal.RepositoryItemProvider.
2) edu.cmu.cs.mse.gsd.bridge.jazzlayer.WorkItemBrokerImpl.
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
On Sat, 18 Jul 2009 22:52:55 +0000, abhminde wrote:
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
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
Thanks Jared. It really helped.
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
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