简体   繁体   English

在TopLink中获取客户端会话时出错

[英]Error While acquiring Client session in TopLink

I am facing a peculiar issue. 我面临着一个特殊的问题。 Below is the stack trace of what error i am getting.Please help. 下面是我得到的错误的堆栈跟踪。请帮忙。

Exception [TOPLINK-7001] (Oracle TopLink - 11g Release 1 (11.1.1.1.0) (Build 090527)): oracle.toplink.exceptions.ValidationException
Exception Description: You must login to the ServerSession before acquiring ClientSessions.
 at oracle.toplink.exceptions.ValidationException.loginBeforeAllocatingClientSessions(ValidationException.java:1155)
 at oracle.toplink.threetier.ServerSession.acquireClientSession(ServerSession.java:313)
 at oracle.toplink.threetier.ServerSession.acquireClientSession(ServerSession.java:303)
 at com.ofss.elcm.domain.Session.fetchClientSession(Session.java:113)
 at com.ofss.elcm.domain.Session.acquireUnitOfWork(Session.java:132)

EclipseLink has the facility to check for classloader changes in cases of application redeployment. EclipseLink具有在应用程序重新部署的情况下检查类加载器更改的功能。 This can cause issues when calling into the SessionManager for a particular session from both a Web container and a EJB container. 从Web容器和EJB容器调用特定会话的SessionManager时,这可能会导致问题。

Ensure that you are using the API getSession(null, sessionName, classLoader, true, false) or the same method with the longer signature to disable this classLoader checking. 确保使用API​​ getSession(null,sessionName,classLoader,true,false)或使用较长签名的相同方法来禁用此classLoader检查。 If you wish to construct a XMLSessionConfigLoader directly you can disable the classloader checking directly though xmlSessionConfigLoader.setShouldCheckClassLoader(false). 如果您希望直接构造XMLSessionConfigLoader,可以通过xmlSessionConfigLoader.setShouldCheckClassLoader(false)直接禁用类加载器检查。

Did you try using the sessionmanager from a singleton object? 您是否尝试过使用单个对象的sessionmanager? That way, you should always get the same manager-instance and there should be no classloader-issues. 这样,你应该总是获得相同的manager-instance,并且应该没有classloader-issues。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM