This discussion is archived
2 Replies Latest reply: Mar 13, 2013 3:12 AM by SureshKreddy RSS

Help:You must login to the ServerSession before acquiring ClientSessions

SureshKreddy Newbie
Currently Being Moderated
Hi,

We are using toplink, EJB and ADF for our requirement. We are using SessionFactory to get server session and perform transactions using UnitOfWork. We have sessions.xml which looks below:

<?xml version = '1.0' encoding = 'UTF-8'?>
<!DOCTYPE toplink-configuration PUBLIC "-//Oracle Corp.//DTD TopLink Sessions 9.0.4//EN" "sessions_9_0_4.dtd">
<toplink-configuration>
<session>
<name>default</name>
<project-xml>META-INF/Map.xml</project-xml>
<session-type>
<server-session/>
</session-type>
<login>
<datasource>jdbc/xxxDS</datasource>
<sequence-preallocation-size>1</sequence-preallocation-size>
<uses-external-connection-pool>true</uses-external-connection-pool>
</login>
</session>
</toplink-configuration>

When we deploy in Server, sometimes we are getting the below exceptions. and after sometime its getting hanged.

[TopLink Info]: 2013.03.05 10:35:28.656--ServerSession(29522364)--default login successful
[TopLink Info]: 2013.03.05 10:35:28.657--ServerSession(29522364)--default logout successful
2013-03-05 10:35:28,762 [AJPRequestHandler-HTTPThreadGroup-14] ERROR Delegator -
getotherFeeTypeList() ::Exception Occured.. oracle.oc4j.rmi.OracleRemoteException: Exception [TOPLINK-7001] (Oracle TopLink - 10g Release 3 (10.1.3.3.0) (Build 070608)): oracle.toplink.exceptions.ValidationException
Exception Description: You must login to the ServerSession before acquiring ClientSessions.; nested exception is:
Exception [TOPLINK-7001] (Oracle TopLink - 10g Release 3 (10.1.3.3.0) (Build 070608)): oracle.toplink.exceptions.ValidationException
Exception Description: You must login to the ServerSession before acquiring ClientSessions.

Could anyone throws some light on this, why this is happening and resolutions for the same?

Thanks & Regards,
Suresh

Edited by: Suresh Kethireddy on Mar 12, 2013 2:37 AM
  • 1. Re: Help:You must login to the ServerSession before acquiring ClientSessions
    cdelahun Pro
    Currently Being Moderated
    I'm not sure how you are using TopLink within the app, if it is ADF that obtains the sessions or your application. The error and log though are quite explicit - you are logging out of the session and then trying to acquire a ClientSession from it which is not allowed. What needs to be determined is why or how you are logging out while the application is still running.

    I have seen unintentional logouts occur if there are different classloaders involved. Some of the SessionManager's getSession methods have one that takes a classloader with the intent of loging out and logging back in a session if the classloader is different from the one the singleton has a reference to - which is useful if the app is redeployed. This can be a problem though if you have multiple sessions with the same name, since the apps using them might have different classloaders. Check that you don't have multiple apps all accessing the 'default' session - if you do, try giving each app's session a unique name.

    Best Regards,
    Chris
  • 2. Re: Help:You must login to the ServerSession before acquiring ClientSessions
    SureshKreddy Newbie
    Currently Being Moderated
    Thank you Chris for the reply.

    Problem got solved, by deploying the two apps on 2 different OC4J instances.

    Regards,
    Suresh K

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points