It's all about the answers!

Ask a question

Problems while using IContentService


Praveen Sinha (11641) | asked Jul 27 '07, 7:19 a.m.
JAZZ DEVELOPER
Hi,

I am trying to use IContentService to store and retrieve my contents. When I try to execute IContentService.put, I get a SocketTimeOutException. The trace is included below. The ContentManager works all right, but I want to define my own content manager. I have looked into the ContentManager code and the only difference between the two is that I don't wrap my stream into MonitoredInputStream. Is this causing the problem?

trace:
13:32:23,162 WARN .team.repository.servlet.AbstractTeamServerServlet - IOException processing request for PUT com.ibm.team.repository.common.transport.ITeamContentService for: ADMIN - Exception message: Read timed out
java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:155)
at org.mortbay.util.LineInput.fill(LineInput.java:477)
at org.mortbay.util.LineInput.read(LineInput.java:352)
at java.io.FilterInputStream.read(FilterInputStream.java:134)
at org.mortbay.http.HttpInputStream.read(HttpInputStream.java:120)
at org.mortbay.jetty.servlet.ServletIn.read(ServletIn.java:51)
at java.io.FilterInputStream.read(FilterInputStream.java:134)
at com.ibm.team.repository.servlet.internal.CountingInputStream.read(CountingInputStream.java:80)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:229)
at java.io.BufferedInputStream.skip(BufferedInputStream.java:358)
at com.ibm.team.repository.service.internal.ContentService.doPut(ContentService.java:573)
at com.ibm.team.repository.service.internal.ContentService.put(ContentService.java:1162)
at com.ibm.team.repository.servlet.AbstractTeamServerServlet.doPut(AbstractTeamServerServlet.java:572)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:619)
at com.ibm.team.repository.servlet.AbstractTeamServerServlet.service(AbstractTeamServerServlet.java:1042)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at org.eclipse.equinox.http.registry.internal.ServletManager$ServletWrapper.service(ServletManager.java:177)
at org.eclipse.equinox.http.servlet.internal.ServletRegistration.handleRequest(ServletRegistration.java:91)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:110)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:76)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:428)
at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:473)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:568)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1530)
at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:633)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1482)
at org.mortbay.http.HttpServer.service(HttpServer.java:909)
at org.mortbay.http.HttpConnection.service(HttpConnection.java:820)
at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:986)
at org.mortbay.http.HttpConnection.handle(HttpConnection.java:837)
at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:245)
at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)
13:32:23,177 WARN org.mortbay.http.HttpConnection - PUT /jazz/service/com.ibm.team.repository.common.transport.ITeamContentService/_rqOKYDwXEdyQbKiORolMqA HTTP/1.1 HttpException(400,Bad Request,Missing Content)
com.ibm.team.repository.common.transport.TeamServiceException: return code 500 from HTTP request: Internal Server Error
at com.ibm.team.repository.transport.client.RemoteTeamService.executeHttpMethod(RemoteTeamService.java:548)
at com.ibm.team.repository.transport.client.RemoteTeamService.invokeContentPut(RemoteTeamService.java:368)
at com.ibm.team.repository.transport.client.RemoteTeamService.invoke(RemoteTeamService.java:161)
at com.ibm.team.repository.transport.client.ServiceInvocationHandler.invoke(ServiceInvocationHandler.java:43)
at $Proxy3.put(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:615)
at com.ibm.team.repository.client.internal.ServiceInterfaceProxy.invokeServiceCall(ServiceInterfaceProxy.java:123)
at com.ibm.team.repository.client.internal.ServiceInterfaceProxy.invoke(ServiceInterfaceProxy.java:57)

Thanks,
Praveen

One answer



permanent link
Ritchie Schacher - IBM (47611) | answered Aug 07 '07, 10:27 p.m.
FORUM MODERATOR / JAZZ DEVELOPER
The stack trace shows that the timeout occurred on the server, not the
client. One thing I did notice about the MonitoredInputStream is that it
retries (via a loop) if an InterruptedException is handled on the client.

What is motivating you to create your own content manager? Be aware that
using the remote content service to store content will only temporariliy
store it on the server, unless it is "claimed" by saving an item with a
reference to an IContent helper associated witht he content bytes.

Ritchie
"praveen.sinha" <praveen.sinha@in.ibm-dot-com.no-spam.invalid> wrote in
message news:f8cks0$j9e$1@localhost.localdomain...
Hi,

I am trying to use IContentService to store and retrieve my contents.
When I try to execute IContentService.put, I get a
SocketTimeOutException. The trace is included below. The
ContentManager works all right, but I want to define my own content
manager. I have looked into the ContentManager code and the only
difference between the two is that I don't wrap my stream into
MonitoredInputStream. Is this causing the problem?

trace:
13:32:23,162 WARN
team.repository.servlet.AbstractTeamServerServlet - IOException
processing request for PUT
com.ibm.team.repository.common.transport.ITeamContentService for:
ADMIN - Exception message: Read timed out
java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:155)
at org.mortbay.util.LineInput.fill(LineInput.java:477)
at org.mortbay.util.LineInput.read(LineInput.java:352)
at java.io.FilterInputStream.read(FilterInputStream.java:134)
at org.mortbay.http.HttpInputStream.read(HttpInputStream.java:120)
at org.mortbay.jetty.servlet.ServletIn.read(ServletIn.java:51)
at java.io.FilterInputStream.read(FilterInputStream.java:134)
at
com.ibm.team.repository.servlet.internal.CountingInputStream.read(CountingInputStream.java:80)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:229)
at java.io.BufferedInputStream.skip(BufferedInputStream.java:358)
at
com.ibm.team.repository.service.internal.ContentService.doPut(ContentService.java:573)
at
com.ibm.team.repository.service.internal.ContentService.put(ContentService.java:1162)
at
com.ibm.team.repository.servlet.AbstractTeamServerServlet.doPut(AbstractTeamServerServlet.java:572)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:619)
at
com.ibm.team.repository.servlet.AbstractTeamServerServlet.service(AbstractTeamServerServlet.java:1042)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at
org.eclipse.equinox.http.registry.internal.ServletManager$ServletWrapper.service(ServletManager.java:177)
at
org.eclipse.equinox.http.servlet.internal.ServletRegistration.handleRequest(ServletRegistration.java:91)
at
org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:110)
at
org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:76)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:428)
at
org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:473)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:568)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1530)
at
org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:633)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1482)
at org.mortbay.http.HttpServer.service(HttpServer.java:909)
at org.mortbay.http.HttpConnection.service(HttpConnection.java:820)
at
org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:986)
at org.mortbay.http.HttpConnection.handle(HttpConnection.java:837)
at
org.mortbay.http.SocketListener.handleConnection(SocketListener.java:245)
at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)
13:32:23,177 WARN org.mortbay.http.HttpConnection
- PUT
/jazz/service/com.ibm.team.repository.common.transport.ITeamContentService/_rqOKYDwXEdyQbKiORolMqA
HTTP/1.1 HttpException(400,Bad Request,Missing Content)
com.ibm.team.repository.common.transport.TeamServiceException: return
code 500 from HTTP request: Internal Server Error
at
com.ibm.team.repository.transport.client.RemoteTeamService.executeHttpMethod(RemoteTeamService.java:548)
at
com.ibm.team.repository.transport.client.RemoteTeamService.invokeContentPut(RemoteTeamService.java:368)
at
com.ibm.team.repository.transport.client.RemoteTeamService.invoke(RemoteTeamService.java:161)
at
com.ibm.team.repository.transport.client.ServiceInvocationHandler.invoke(ServiceInvocationHandler.java:43)
at $Proxy3.put(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:615)
at
com.ibm.team.repository.client.internal.ServiceInterfaceProxy.invokeServiceCall(ServiceInterfaceProxy.java:123)
at
com.ibm.team.repository.client.internal.ServiceInterfaceProxy.invoke(ServiceInterfaceProxy.java:57)

Thanks,
Praveen

Your answer


Register or to post your answer.