It's all about the answers!

Ask a question

Issue with use RAM 7.5 client jar with RAM 7.2 server


pan tianming (4765644) | asked Oct 11 '11, 4:10 a.m.
We are using the RAM 7.2 server but plan to upgrade to 7.5 soon. Before that, we plan to test if RAM 7.5 client jar is workable while connect to RAM 7.2.

When I directly connect to RAM 7.2 by call 7.5 client jar, seems no problem. But after one or two days, it can not find RAM session if we want to call RAM API. We not sure if RAM session can not found is caused by this using 7.5 client jar behavior.

Is RAM support using 7.5 client jar to connect 7.2 server?

Thanks.

13 answers



permanent link
Rich Kulp (3.6k38) | answered Oct 11 '11, 10:29 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
Hi,

What version of 7.2 and what version of 7.5? Please include the full
version when giving versions. There are big differences between 7.2,
7.2.0.1, and 7.2.0.2, and if testfixes are applied.

The 7.5 client is supposed to support talking to a 7.2 server.

The visa-versa is not true, the server can not talk to a downlevel client.

What do you mean by after one or two days you can't find the server? Do
you mean a client that has been continually running non-stop for a
couple of days? Or when you come back after a couple of days with a new
session it doesn't work.

What is the stack trace and error message you get?

--
Rich Kulp
Rational Asset Manager developer

permanent link
pan tianming (4765644) | answered Oct 11 '11, 10:40 p.m.
Rich,

Thank you, we are using 7.2.0.2 testfixes 9 , plan to upgrade to 7.5.0.2.

The 7.5 client is supposed to support talking to a 7.2 server.

I mean for example, today we connect to the server by the API is no problem. Tomorrow with same codes, the RAM server never restart but can not create RAM session.

We have added more trace log in our codes, will paste it in case we get it.

Thank you for your help.

permanent link
pan tianming (4765644) | answered Oct 13 '11, 5:02 a.m.
com.ibm.ram.common.data.exception.RAMRuntimeException: com.ibm.ram.internal.client.RAMServiceException: Unable to retreive resource from server
at com.ibm.ram.client.RAMSession.<init>(RAMSession.java:318)
at com.ibm.cloud.ram.RAMClient.<init>(RAMClient.java:108)
at com.ibm.cloud.ram.RAMClient.getInstance(RAMClient.java:64)
at com.ibm.cloud.ram.RAMClientTest.setUp(RAMClientTest.java:23)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:599)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:44)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41)
at org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:45)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: com.ibm.ram.internal.client.RAMServiceException: com.ibm.ram.internal.client.RAMServiceException: Unable to retreive resource from server
at com.ibm.ram.internal.client.RESTClient.getRepository(RESTClient.java:861)
at com.ibm.ram.client.RAMSession.createClient(RAMSession.java:380)
at com.ibm.ram.client.RAMSession.<init>(RAMSession.java:316)
... 26 more
com.ibm.cloud.ram.RAMAccessException: No valid RAMSession

permanent link
pan tianming (4765644) | answered Oct 13 '11, 5:02 a.m.
Above is the error I got from local unit test, will try to retrieve from Server also

permanent link
Rich Kulp (3.6k38) | answered Oct 13 '11, 10:04 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
Hi,

ARGH! RAMServiceException inherits from javax.xml.rpc.ServiceException,
which is not our code. ServiceException hid the original exception so we
don't know what it was.

But simply says there was some problem with the HTTP connection
to the host. It never even got to the server.

If you can debug it try putting a method entry breakpoint on this
constructor:

RAMServiceException(final int status, String message, Throwable throwable)

And take a look at the throwable. It may give more info.




Caused by: com.ibm.ram.internal.client.RAMServiceException:
com.ibm.ram.internal.client.RAMServiceException: Unable to retreive
resource from server
at
com.ibm.ram.internal.client.RESTClient.getRepository(RESTClient.java:861)
at com.ibm.ram.client.RAMSession.createClient(RAMSession.java:380)
at com.ibm.ram.client.RAMSession.<init>(RAMSession.java:316)
... 26 more
com.ibm.cloud.ram.RAMAccessException: No valid RAMSession



--
Rich Kulp
Rational Asset Manager developer

permanent link
pan tianming (4765644) | answered Oct 14 '11, 1:18 a.m.
AxisFault
faultCode: {http://xml.apache.org/axis/}HTTP
faultSubcode:
faultString: (503)Service Unavailable
faultActor:
faultNode:
faultDetail:
{}:return code: 503
Error 503: The maximum number of sessions for this account has been reached. Log out from existing sessions or ask the system administrator to increase the maximum number of sessions per user.

{http://xml.apache.org/axis/}HttpErrorCode:503

(503)Service Unavailable
at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:744)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)
at com.ibm.ram.internal.client.RAMHTTPSender.invoke(RAMHTTPSender.java:41)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.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.v72.RAM1SoapBindingStub.getVersion(RAM1SoapBindingStub.java:7342)
at com.ibm.ram.internal.access.ws.RAMv72.getVersion(RAMv72.java:353)
at com.ibm.ram.internal.client.RAMClient.createWebService(RAMClient.java:549)
at com.ibm.ram.internal.client.RAMClient.primGetRAMWebService(RAMClient.java:475)
at com.ibm.ram.internal.client.RAMClient.getRAM1Webservice(RAMClient.java:425)
at com.ibm.ram.internal.client.RAMClient.getServerVersionString(RAMClient.java:529)
at com.ibm.ram.client.RAMSession.createClient(RAMSession.java:375)
at com.ibm.ram.client.RAMSession.<init>(RAMSession.java:316)
at com.ibm.cloud.ram.RAMClient.<init>(RAMClient.java:102)
at com.ibm.cloud.ram.RAMClient.getInstance(RAMClient.java:64)
at com.ibm.cloud.ram.RAMClientTest.setUp(RAMClientTest.java:23)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:599)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:44)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41)
at org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:45)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
AxisFault
faultCode: {http://xml.apache.org/axis/}HTTP
faultSubcode:
faultString: (503)Service Unavailable
faultActor:
faultNode:
faultDetail:
{}:return code: 503
Error 503: The maximum number of sessions for this account has been reached. Log out from existing sessions or ask the system administrator to increase the maximum number of sessions per user.

{http://xml.apache.org/axis/}HttpErrorCode:503

(503)Service Unavailable
at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:744)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)
at com.ibm.ram.internal.client.RAMHTTPSender.invoke(RAMHTTPSender.java:41)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.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.v72.RAM1SoapBindingStub.getVersion(RAM1SoapBindingStub.java:7342)
at com.ibm.ram.internal.access.ws.RAMv72.getVersion(RAMv72.java:353)
at com.ibm.ram.internal.client.RAMClient.createWebService(RAMClient.java:549)
at com.ibm.ram.internal.client.RAMClient.primGetRAMWebService(RAMClient.java:475)
at com.ibm.ram.internal.client.RAMClient.getRAM1Webservice(RAMClient.java:425)
at com.ibm.ram.internal.client.RAMClient.getWebServerPath(RAMClient.java:1729)
at com.ibm.ram.internal.client.RAMClient.primGetHTTPClient(RAMClient.java:856)
at com.ibm.ram.internal.client.RAMClient.getHTTPClient(RAMClient.java:800)
at com.ibm.ram.internal.client.RESTCacheManager.login(RESTCacheManager.java:117)
at com.ibm.ram.internal.client.RESTCacheManager.primGetResourceObject(RESTCacheManager.java:306)
at com.ibm.ram.internal.client.RESTCacheManager.getResource(RESTCacheManager.java:154)
at com.ibm.ram.internal.client.RESTCacheManager.getResource(RESTCacheManager.java:130)
at com.ibm.ram.internal.client.RestClientService.doGet(RestClientService.java:55)
at com.ibm.ram.internal.client.RESTClient.getRepository(RESTClient.java:859)
at com.ibm.ram.client.RAMSession.createClient(RAMSession.java:380)
at com.ibm.ram.client.RAMSession.<init>(RAMSession.java:316)
at com.ibm.cloud.ram.RAMClient.<init>(RAMClient.java:102)
at com.ibm.cloud.ram.RAMClient.getInstance(RAMClient.java:64)
at com.ibm.cloud.ram.RAMClientTest.setUp(RAMClientTest.java:23)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:599)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:44)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41)
at org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:45)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
com.ibm.ram.common.data.exception.RAMRuntimeException: Unable to access server services: (503)Service Unavailable


Rich, do you know from RAM 7.2 to 7.5 if update any session codes on client API will make the Max Session limit problem happen more frequently?
Thanks.

permanent link
Rich Kulp (3.6k38) | answered Oct 14 '11, 10:42 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
Rich, do you know from RAM 7.2 to 7.5 if update any session codes on
client API will make the Max Session limit problem happen more
frequently?
Thanks.


There isn't anything I can think of directly. You can go to the Tools
page and look at the number sessions for each user currently assigned
for web services. But this only shows for the current server. If you are
in a cluster you would have to know which server is of interest and go
directly to that server.

There is a limit on the number of sessions per user, so if login users
is a functional user instead of a specific user then it could hit the
limit easily if there are several independent ramsessions created. Such
as through different java processes. Within one java process RAMSession
will share actual web services sessions if they are all the same URL and
userid.

Your code must do a ramSession.release() in a finally block, and nothing
else in the finally block ahead of the release can throw an uncaught
exception. Otherwise the session will not be released and will hang
around until it times out (usually 30 mins, but depends on what your WAS
admin set it too).


--
Rich Kulp
Rational Asset Manager developer

permanent link
pan tianming (4765644) | answered Oct 17 '11, 2:15 a.m.
Rich, could you tell me where can find this tools page to check session? I not found it in both RAM administraction tool page and RTC management page.

So far in our codes not used ramSession.release() before, part of codes using the ramSession.clear() method . Could you tell me the difference of these two method?

Also, if we have a method codes like this:
RAMAsset asset = session.getAsset(id);

Then we return this RAMAsset to other method do some operation like update RAM asset attribute.
If we add session.release() here, will cause any problem for RAMAsset retrieve ?
Thanks.

permanent link
Rich Kulp (3.6k38) | answered Oct 17 '11, 11:16 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
On 10/17/2011 2:23 AM, pantian wrote:
Rich, could you tell me where can find this tools page to check
session? I not found it in both RAM administraction tool page and RTC
management page.


This is on the Administration->Tools page. It is a link on this tools
page that says "view webservices sessions"


So far in our codes not used ramSession.release() before, part of
codes using the ramSession.clear() method . Could you tell me the
difference of these two method?


All clear() does is clear out any cached information so that the next
time it needs something that was previously cached in memory it will go
back to host for it.

release() actually disconnects the host from the client when the last
session that is connecting to that host is released. Until that happens
the session on the host is not logged out and is counted against that
user. Otherwise the host session will be logged out after 30 minutes of
inactivity.

Also, if we have a method codes like this:
RAMAsset asset = session.getAsset(id);

Then we return this RAMAsset to other method do some operation like
update RAM asset attribute.
If we add session.release() here, will cause any problem for RAMAsset
retrieve ?
Thanks.


Yes that could be a problem. The objects returned by a session and
associated with the session. If the session is closed then some
actions/getters/setters on the objects may fail.



--
Rich Kulp
Rational Asset Manager developer

permanent link
pan tianming (4765644) | answered Oct 20 '11, 5:33 a.m.
Rich,

Thanks a lot for your information. We decide to release the session during user logout from our application because user maybe using RAM in our application many times.
We will think about how to fully release session when user logout.

Thank you for your guidance.

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.