It's all about the answers!

Ask a question

Asset search+download time out when maxResults is set


Debdoot Mukherjee (512118) | asked Dec 22 '10, 8:48 a.m.
Hello,

I am facing a time-out when downloading assets using the "download" ANT task - the problem occurs only when I set the attribute "maxResults" in the asset search expression.

Note, I have to set the attribute "maxResults" to a large number (say 500-1000) because otherwise the number of assets returned by the query is limited to 100 and I do expect more search results.

Here is the exception trace:
BUILD FAILED
C:\ramclient\build.xml:10: com.ibm.ram.common.data.exception.RAMRuntimeException
: ; nested exception is:
java.net.SocketTimeoutException: Read timed out
at com.ibm.ram.client.RAMSession.getAssets(RAMSession.java:472)
at com.ibm.ram.internal.client.ant.types.Search.getAssets(Search.java:12
8)
at com.ibm.ram.internal.client.ant.tasks.DownloadTask.downloadAssets(Dow
nloadTask.java:234)
at com.ibm.ram.internal.client.ant.tasks.DownloadTask.execute(DownloadTa
sk.java:284)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:79)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:390)
at org.apache.tools.ant.Target.performTasks(Target.java:411)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1397)
at org.apache.tools.ant.Project.executeTarget(Project.java:1366)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExe
cutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1249)
at org.apache.tools.ant.Main.runBuild(Main.java:801)
at org.apache.tools.ant.Main.startAnt(Main.java:218)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Caused by: java.net.SocketTimeoutException: Read timed out
at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:154)

at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrateg
y.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at com.ibm.ram.repository.web.ws.core.v711.RAM1SoapBindingStub.search(RA
M1SoapBindingStub.java:9059)
at com.ibm.ram.internal.access.ws.RAMv711.search(RAMv711.java:252)
at com.ibm.ram.client.RAMSession.getAssets(RAMSession.java:457)
... 20 more
Caused by: java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.read(SocketInputStream.java:155)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:229)
at java.io.BufferedInputStream.read(BufferedInputStream.java:246)
at org.apache.axis.transport.http.HTTPSender.readHeadersFromSocket(HTTPS
ender.java:583)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:143)

... 32 more

Total time: 35 seconds


Another problem with the ANT download task is that if download of any asset fails the script aborts without attempting download of the next asset in search results.

Can anyone please point out if I am missing anything? What is the most robust way to download a large number of assets from RAM?

Thanks,
Debdoot

2 answers



permanent link
Abhinav Ajmera (22113020) | answered Dec 22 '10, 9:18 a.m.
Hello,

I faced same issue today with RAM Java API (7.2.0.2)

int maxResult = 700;
query.setMaxResults(maxResult);
SearchResult searchResult = session.getAssets(query);

last step above getting error as :

com.ibm.ram.common.data.exception.RAMRuntimeException: ; nested exception is:
org.xml.sax.SAXParseException: XML document structures must start and end within the same entity.

help appreciated..

Thanks

PS : I do not have timeout issue, as I have set up my timeout period around 6 mins (and m getting error in 2 mins itself).



Hello,

I am facing a time-out when downloading assets using the "download" ANT task - the problem occurs only when I set the attribute "maxResults" in the asset search expression.

Note, I have to set the attribute "maxResults" to a large number (say 500-1000) because otherwise the number of assets returned by the query is limited to 100 and I do expect more search results.

Here is the exception trace:
BUILD FAILED
C:\ramclient\build.xml:10: com.ibm.ram.common.data.exception.RAMRuntimeException
: ; nested exception is:
java.net.SocketTimeoutException: Read timed out
at com.ibm.ram.client.RAMSession.getAssets(RAMSession.java:472)
at com.ibm.ram.internal.client.ant.types.Search.getAssets(Search.java:12
8)
at com.ibm.ram.internal.client.ant.tasks.DownloadTask.downloadAssets(Dow
nloadTask.java:234)
at com.ibm.ram.internal.client.ant.tasks.DownloadTask.execute(DownloadTa
sk.java:284)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:79)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:390)
at org.apache.tools.ant.Target.performTasks(Target.java:411)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1397)
at org.apache.tools.ant.Project.executeTarget(Project.java:1366)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExe
cutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1249)
at org.apache.tools.ant.Main.runBuild(Main.java:801)
at org.apache.tools.ant.Main.startAnt(Main.java:218)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Caused by: java.net.SocketTimeoutException: Read timed out
at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:154)

at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrateg
y.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at com.ibm.ram.repository.web.ws.core.v711.RAM1SoapBindingStub.search(RA
M1SoapBindingStub.java:9059)
at com.ibm.ram.internal.access.ws.RAMv711.search(RAMv711.java:252)
at com.ibm.ram.client.RAMSession.getAssets(RAMSession.java:457)
... 20 more
Caused by: java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.read(SocketInputStream.java:155)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:229)
at java.io.BufferedInputStream.read(BufferedInputStream.java:246)
at org.apache.axis.transport.http.HTTPSender.readHeadersFromSocket(HTTPS
ender.java:583)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:143)

... 32 more

Total time: 35 seconds


Another problem with the ANT download task is that if download of any asset fails the script aborts without attempting download of the next asset in search results.

Can anyone please point out if I am missing anything? What is the most robust way to download a large number of assets from RAM?

Thanks,
Debdoot

permanent link
Gili Mendel (1.8k56) | answered Dec 31 '10, 7:07 p.m.
JAZZ DEVELOPER
have you tried to increase the session timeout:


RAMSession session = new RAMSession("http://localhost:8080/ram.ws", "admin", "admin");
session.setWebServiceTimeout(10000);

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.