It's all about the answers!

Ask a question

Blocked call to WorkspaceManager.findComponents


Danil Suits (81177) | asked Nov 24 '10, 1:07 p.m.
I'm trying to use the java API to download source code into our continuous integration system. This has been working just fine when connecting to our primary server. However, the primary is down for servicing, so we are working with the backup. The SSL certificate on the backup system is self-signed, which may be contributing to the problem. What I'm trying to understand is whether that would explain the symptoms described below, and if I can code around the problem in the API.

The symptom I'm seeing is that WorkspaceManager.findComponents appears to block. When I finally get tired of waiting and abort the operation, the stack trace that appears is....


com.ibm.team.repository.common.transport.TeamServiceException:
CRJAZ0099I HTTP error "java.nio.channels.ClosedByInterruptException" accessing URL
"https://[redacted]/jazz/service/com.ibm.team.scm.common.internal.IScmQueryService".
at com.ibm.team.repository.transport.client.ClientHttpUtil.executeHttpMethod(ClientHttpUtil.java:208)
at com.ibm.team.repository.transport.client.RemoteTeamService.executeCancelableHttpMethod
(RemoteTeamService.java:561)
at com.ibm.team.repository.transport.client.RemoteTeamService.invokePost(RemoteTeamService.java:531)
at com.ibm.team.repository.transport.client.RemoteTeamService.executeMethod(RemoteTeamService.java:471)
at com.ibm.team.repository.transport.client.RemoteTeamService.invoke(RemoteTeamService.java:201)
at com.ibm.team.repository.transport.client.ServiceInvocationHandler.invoke(ServiceInvocationHandler.java:43)
at $Proxy34.findComponents(Unknown Source)
at sun.reflect.GeneratedMethodAccessor55.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.ibm.team.repository.client.internal.ServiceInterfaceProxy.invokeServiceCall(ServiceInterfaceProxy.java:149)
at com.ibm.team.repository.client.internal.ServiceInterfaceProxy.invoke(ServiceInterfaceProxy.java:84)
at $Proxy34.findComponents(Unknown Source)
at sun.reflect.GeneratedMethodAccessor55.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.ibm.team.scm.client.internal.ScmServiceInterfaceProxy$2.run(ScmServiceInterfaceProxy.java:164)
at com.ibm.team.repository.client.internal.TeamRepository$3.run(TeamRepository.java:1169)
at com.ibm.team.repository.common.transport.CancelableCaller.call(CancelableCaller.java:79)
at com.ibm.team.repository.client.internal.TeamRepository.callCancelableService(TeamRepository.java:1162)
at com.ibm.team.scm.client.internal.ScmClientLibraryContext.callCancelableService(ScmClientLibraryContext.java:70)
at com.ibm.team.scm.client.internal.ScmServiceInterfaceProxy.invokeCancelableService(ScmServiceInterfaceProxy.java:161)
at com.ibm.team.scm.client.internal.ScmServiceInterfaceProxy.invoke(ScmServiceInterfaceProxy.java:91)
at $Proxy34.findComponents(Unknown Source)
at com.ibm.team.scm.client.internal.WorkspaceManager.findComponents(WorkspaceManager.java:1569)
....

Caused by: java.nio.channels.ClosedByInterruptException
at java.nio.channels.spi.AbstractInterruptibleChannel.end(AbstractInterruptibleChannel.java:184)
at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:236)
at sun.nio.ch.SocketAdaptor$SocketInputStream.read(SocketAdaptor.java:195)
at sun.nio.ch.ChannelInputStream.read(ChannelInputStream.java:86)
at com.ibm.team.repository.transport.client.InterruptableSocket$InterruptableSocketInputStream.read
(InterruptableSocket.java:583)
at com.sun.net.ssl.internal.ssl.InputRecord.readFully(InputRecord.java:293)
at com.sun.net.ssl.internal.ssl.InputRecord.read(InputRecord.java:331)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:723)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:680)
at com.sun.net.ssl.internal.ssl.AppInputStream.read(AppInputStream.java:75)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read(BufferedInputStream.java:235)
at org.apache.commons.httpclient.HttpParser.readRawLine(HttpParser.java:78)
at org.apache.commons.httpclient.HttpParser.readLine(HttpParser.java:106)
at org.apache.commons.httpclient.HttpConnection.readLine(HttpConnection.java:1116)
at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.readLine
(MultiThreadedHttpConnectionManager.java:1413)
at org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBase.java:1973)
at org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:1735)
at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1098)
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
at com.ibm.team.repository.transport.client.ClientHttpUtil.executeHttpMethod(ClientHttpUtil.java:177)
... 37 more

One answer



permanent link
Danil Suits (81177) | answered Nov 24 '10, 7:03 p.m.
Update - I discovered the ITeamRepository.setProxy() method, which allowed me to pipe all of my traffic to Charles (http://www.charlesproxy.com/ ), which gave me some visibility into what's going on.

It appears what I have is an unending sequence of soap calls to /jazz/service/com.ibm.team.scm.common.internal.IScmQueryService

The first request looks like:

<soapenv:Envelope xmlns:scm="com.ibm.team.scm" xmlns:scmDto="com.ibm.team.scm.dto" xmlns:com.ibm.team.repository.common.services="http:///com/ibm/team/core/services.ecore" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<request>
<method>findComponents</method>
<interface>com.ibm.team.scm.common.internal.IScmQueryService</interface>
<parameters xsi:type="com.ibm.team.repository.common.services:ComplexDataArg">
<type>COMPLEX</type>
<value xsi:type="scmDto:ComponentSearchCriteria">
<optionalNameFilter>
<matchPattern>wle.doc</matchPattern>
<exact>true</exact>
<ignoreCase>false</ignoreCase>
</optionalNameFilter>
</value>
</parameters>
<parameters xsi:type="com.ibm.team.repository.common.services:PrimitiveDataArg">
<type>INTEGER</type>
<value>1</value>
</parameters>
<parameters xsi:type="com.ibm.team.repository.common.services:ComplexDataArg">
<type>COMPLEX</type>
<value xsi:type="scm:RepositoryProgressMonitor" itemId="_EJ64gPglEd-kTLIoGkrfaQ">
<stateId xsi:nil="true" />
<contextId xsi:nil="true" />
<modified xsi:nil="true" />
<workingCopy>true</workingCopy>
<isCancelled>false</isCancelled>
<created xsi:nil="true" />
<modifiedBy xsi:nil="true" />
</value>
</parameters>
</request>
</soapenv:Body>
</soapenv:Envelope>


and produces this response


<soapenv:Envelope xmlns:scm="com.ibm.team.scm" xmlns:scmDto="com.ibm.team.scm.dto" xmlns:com.ibm.team.repository.common.services="http:///com/ibm/team/core/services.ecore" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<response>
<method>findComponents</method>
<interface>com.ibm.team.scm.common.internal.IScmQueryService</interface>
<returnValue xsi:type="com.ibm.team.repository.common.services:ComplexDataArg">
<type>COMPLEX</type>
<value xsi:type="scmDto:ItemQueryResult">
<lastTimestamp>2010-09-20T15:32:54.800Z</lastTimestamp>
<itemHandles itemId="_t7PdsHoeEd-syaMtBDQa4w" stateId="_Vn_pAMTMEd-c8cZ6l4incg" xsi:type="scm:ComponentHandle" />
</value>
</returnValue>
</response>
</soapenv:Body>
</soapenv:Envelope>


Subsequent requests look the same EXCEPT that they include an optionalDateRange element, and the itemID for scm:RepositoryProgressMonitor changes, as shown below. The reponse never changes.


<soapenv:Envelope xmlns:scm="com.ibm.team.scm" xmlns:scmDto="com.ibm.team.scm.dto" xmlns:com.ibm.team.repository.common.services="http:///com/ibm/team/core/services.ecore" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<request>
<method>findComponents</method>
<interface>com.ibm.team.scm.common.internal.IScmQueryService</interface>
<parameters xsi:type="com.ibm.team.repository.common.services:ComplexDataArg">
<type>COMPLEX</type>
<value xsi:type="scmDto:ComponentSearchCriteria">
<optionalNameFilter>
<matchPattern>wle.doc</matchPattern>
<exact>true</exact>
<ignoreCase>false</ignoreCase>
</optionalNameFilter>
<optionalDateRange>
<end>2010-09-20T15:32:54.800Z</end>
</optionalDateRange>
</value>
</parameters>
<parameters xsi:type="com.ibm.team.repository.common.services:PrimitiveDataArg">
<type>INTEGER</type>
<value>1</value>
</parameters>
<parameters xsi:type="com.ibm.team.repository.common.services:ComplexDataArg">
<type>COMPLEX</type>
<value xsi:type="scm:RepositoryProgressMonitor" itemId="_-Zom0PgiEd-no5KacTPH6A">
<stateId xsi:nil="true" />
<contextId xsi:nil="true" />
<modified xsi:nil="true" />
<workingCopy>true</workingCopy>
<isCancelled>false</isCancelled>
<created xsi:nil="true" />
<modifiedBy xsi:nil="true" />
</value>
</parameters>
</request>
</soapenv:Body>
</soapenv:Envelope>







I'm trying to use the java API to download source code into our continuous integration system. This has been working just fine when connecting to our primary server. However, the primary is down for servicing, so we are working with the backup. The SSL certificate on the backup system is self-signed, which may be contributing to the problem. What I'm trying to understand is whether that would explain the symptoms described below, and if I can code around the problem in the API.

The symptom I'm seeing is that WorkspaceManager.findComponents appears to block. When I finally get tired of waiting and abort the operation, the stack trace that appears is....

Your answer


Register or to post your answer.