It's all about the answers!

Ask a question

When do you get the error User is not logged in. Cannot allocate license?


Manjiri Kamat (5132325) | asked Feb 05 '13, 4:20 a.m.
I have been facing this error while creating an asset using the java api.
The exception is
[2/5/13 7:53:26:215 GMT] 00000039 SystemOut     O   [02/05/13 07:53:26 GMT] CRRAM0006I  53062742 INFO   ws com.ibm.ram.repository.security.RAMEntitlementException - UID: devcloud@us.ibm.com: User is not logged in. Cannot allocate license.

[2/5/13 7:53:26:216 GMT] 00000039 SystemOut     O   [02/05/13 07:53:26 GMT] CRRAM0002W  53062742 WARN   ws com.ibm.ram.repository.web.ws.core.RAM1Impl - User is not logged in. Cannot allocate license.
com.ibm.ram.repository.security.RAMLicenseException: User is not logged in. Cannot allocate license.
        at com.ibm.ram.repository.security.SecurityManager$PromoteLicensePolicy.a llocateLicense(SecurityManager.java:2098)
        at com.ibm.ram.repository.security.AbstractUser.allocateLicense(AbstractU ser.java:585)
        at com.ibm.ram.repository.core.RepositorySessionHandler.allocateLicense(R epositorySessionHandler.java:381)
        at com.ibm.ram.repository.assets.AssetManager.assertReadDetails(AssetMana ger.java:2862)
        at com.ibm.ram.repository.assets.AssetManager.primGetAsset(AssetManager.j ava:1814)
        at com.ibm.ram.repository.assets.AssetManager.getAsset(AssetManager.java: 1954)
        at com.ibm.ram.repository.web.ws.core.RAM1Impl.getAsset(RAM1Impl.java:269 )
        at com.ibm.ram.repository.web.ws.core.RAM1Impl.getAssetByID(RAM1Impl.java :254)
        at com.ibm.ram.repository.web.ws.was.RAM1SoapBindingImpl.getAssetByID(RAM 1SoapBindingImpl.java:1302)
        at sun.reflect.GeneratedMethodAccessor264.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccess orImpl.java:37)
        at java.lang.reflect.Method.invoke(Method.java:611)
        at com.ibm.ws.webservices.engine.dispatchers.java.JavaDispatcher.invokeMe thod(JavaDispatcher.java:178)
        at com.ibm.ws.webservices.engine.dispatchers.java.JavaDispatcher.invokeOp eration(JavaDispatcher.java:141)
        at com.ibm.ws.webservices.engine.dispatchers.SoapRPCProcessor.processRequ estResponse(SoapRPCProcessor.java:490)
        at com.ibm.ws.webservices.engine.dispatchers.SoapRPCProcessor.processMess age(SoapRPCProcessor.java:433)
        at com.ibm.ws.webservices.engine.dispatchers.BasicDispatcher.processMessa ge(BasicDispatcher.java:134)
        at com.ibm.ws.webservices.engine.dispatchers.java.SessionDispatcher.invok e(SessionDispatcher.java:204)
        at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerW rapper.java:263)
        at com.ibm.ws.webservices.engine.handlers.jaxrpc.JAXRPCHandler.invoke(JAX RPCHandler.java:153)
        at com.ibm.ws.webservices.engine.handlers.WrappedHandler.invoke(WrappedHa ndler.java:64)
        at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerW rapper.java:263)
        at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerW rapper.java:263)
        at com.ibm.ws.webservices.engine.WebServicesEngine.invoke(WebServicesEngi ne.java:336)
        at com.ibm.ws.webservices.engine.transport.http.WebServicesServlet.doPost (WebServicesServlet.java:1131)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:738)
        at com.ibm.ws.webservices.engine.transport.http.WebServicesServletBase.se rvice(WebServicesServletBase.java:344)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper. java:1663)
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper. java:1597)
        at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilter Chain.java:104)
        at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilte rChain.java:77)
        at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilt erManager.java:908)
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWr apper.java:934)
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWr apper.java:502)
        at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(Servl etWrapperImpl.java:181)
        at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppR equestDispatcher.java:372)
        at com.ibm.ram.repository.web.ws.RAMSecure.doPost(RAMSecure.java:48)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:738)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper. java:1663)
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper. java:1597)
        at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilter Chain.java:131)

[2/5/13 7:53:26:567 GMT] 00000069 SystemOut     O   [02/05/13 07:53:26 GMT] CRRAM0003I   53063093 INFO   ws com.ibm.ram.repository.web.RAMAssetAccess$RAMAssetAccessException - error code:403
com.ibm.ram.repository.web.RAMAssetAccess$RAMAssetAccessException: Failed to submit asset - DND_64912_SUSE_GOLD_5/2_img - ID#31BD9807-432E-23DC-93B8-A2F7D32437CD Version#1.2 - User is not logged in. Cannot allocate license.
        at com.ibm.ram.repository.web.RAMAssetAccess.submitAsset(RAMAssetAccess.j ava:665)
        at com.ibm.ram.repository.web.RAMAssetAccess.upload(RAMAssetAccess.java:2 50)
        at com.ibm._jsp._RAMAssetAccess._jspService(_RAMAssetAccess.java:87)
        at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:99)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper. java:1663)
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper. java:1597)
        at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilter Chain.java:104)
        at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilte rChain.java:77)
        at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilt erManager.java:908)
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWr apper.java:934)
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWr apper.java:502)
        at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(Servl etWrapperImpl.java:181)
        at com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest (GenericServletWrapper.java:121)
        at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.hand leRequest(AbstractJSPExtensionServletWrapper.java:259)
        at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppR equestDispatcher.java:372)
        at com.ibm.ram.repository.web.ws.RAMSecure.doPost(RAMSecure.java:48)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:738)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper. java:1663)
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper. java:1597)
        at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilter Chain.java:131)
        at com.ibm.ram.repository.web.RAMWSServletFilter.doFilter(RAMWSServletFil ter.java:411)
        at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterIn stanceWrapper.java:188)
        at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilter Chain.java:116)
        at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilte rChain.java:77)
        at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilt erManager.java:908)
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWr apper.java:934)
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWr apper.java:502)
        at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(Servl etWrapperImpl.java:181)
        at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(Cach eServletWrapper.java:91)
        at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:8 64)
        at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.ja va:1592)
        at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java :186)
        at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscriminat ion(HttpInboundLink.java:452)
        at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest( HttpInboundLink.java:511)
        at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(Ht tpInboundLink.java:305)
        at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInbound Link.java:276)
        at com.ibm.ws.ssl.channel.impl.SSLConnectionLink.determineNextChannel(SSL ConnectionLink.java:1049)
        at com.ibm.ws.ssl.channel.impl.SSLConnectionLink$MyReadCompletedCallback. complete(SSLConnectionLink.java:643)
        at com.ibm.ws.ssl.channel.impl.SSLReadServiceContext$SSLReadCompletedCall back.complete(SSLReadServiceContext.java:1784)
        at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted( AioReadCompletionListener.java:165)
        at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFutur e.java:217)
        at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannel Future.java:161)

We use the devcloud user to connect to ram using the java api whereas we have another user called ramccadmin configured to connect to rtc server.

The developer license is given to the ramccadmin user.

Also this issue is intermittent.It usually starts working fine after i save the configuration something like the RAM RTC sync but after sometime the issue comes up again.


Comments
Gili Mendel commented Feb 05 '13, 8:17 a.m.
JAZZ DEVELOPER

Assume that not lic. shortages (Administration -> License Management link on right hand side).

Is it possible that our RAMSession had timed out?

One answer



permanent link
Rich Kulp (3.6k38) | answered Feb 05 '13, 11:46 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
This is a bug introduced by WAS 7.0.0.13. It was fixed in RAM 7.5.0.1 with defect Submitting asset with multiple zip files uploaded fails (41909)

See comment 18. At the time I wrote the comment I didn't have a fix. I put one in a few days later in this defect.

Since 7202 doesn't have the fix you can workaround this by not using devcloud@us.ibm.com for anything other than the ram client stuff. Either that or make sure the ram client session is used at least once every 30 minutes so that it never times out, but in such a case it will never release its license either. The bug is due to the same user being used on both the web and ramclient side and one of the sides times out. If the userid either logsout successfully or never times out or is only ever used on one side but not the other then the problem should go away.

It has absolutely nothing to do with RTC.

Comments
Manjiri Kamat commented Feb 07 '13, 9:07 a.m.

Hi Rich,

We do not use the devcloud user in the web client and we create a new ram session after every 25 mins,but we are still facing this issue.

Is there any other workaround or a solution for this?


Rich Kulp commented Feb 07 '13, 12:08 p.m.
FORUM MODERATOR / JAZZ DEVELOPER

Did you ramSession.release() the previous session before doing the new ramSession after 25 minutes? If you did not do the release() then the session would not of logged out. And in 7202 it doesn't automatically refresh the login when a new ramSession is created. It doesn't do anything until the first access to the host. This means the session can still time out. Doing a release() first will cause a logout to occur (assuming that is the only ramSession created in that Java VM instance).

That is the only case we have ever had this happened with. If it is not that then we have no idea what the cause is.


Manjiri Kamat commented Feb 07 '13, 11:40 p.m.

We do release the session before creating a new one.


Manjiri Kamat commented Feb 11 '13, 12:52 a.m.

Hi Rich,

Please find below the details.
We always release the session before creating a new one.

For the very first run when the function getInstance gets called the sessionAge will be 0.
From there on in every subsequent call we check if the session has been active for more than 25 mins,if yes we call the refresh method which first releases the session and then creates a new one.


Manjiri Kamat commented Feb 11 '13, 1:03 a.m.

Code snippet attached. Code used to create RAM session


Manjiri Kamat commented Feb 11 '13, 1:04 a.m.

Please let me know if there is something that is not correct.


Rich Kulp commented Feb 11 '13, 12:08 p.m.
FORUM MODERATOR / JAZZ DEVELOPER

Then I have no answer. I don't know why it is happening. The only thing I can think of is because you are still at the ancient 7202 code which did have this problem.

showing 5 of 7 show 2 more comments

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.