在 TopLink 中获取客户端会话时出错
我面临着一个特殊的问题。下面是我收到的错误的堆栈跟踪。请帮忙。
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)
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)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
EclipseLink 具有在应用程序重新部署时检查类加载器更改的功能。当从 Web 容器和 EJB 容器调用特定会话的 SessionManager 时,这可能会导致问题。
确保您使用 API getSession(null, sessionName, classLoader, true, false) 或具有较长签名的相同方法来禁用此 classLoader 检查。如果您希望直接构造 XMLSessionConfigLoader,您可以通过 xmlSessionConfigLoader.setShouldCheckClassLoader(false) 直接禁用类加载器检查。
EclipseLink has the facility to check for classloader changes in cases of application redeployment. This can cause issues when calling into the SessionManager for a particular session from both a Web container and a EJB container.
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. If you wish to construct a XMLSessionConfigLoader directly you can disable the classloader checking directly though xmlSessionConfigLoader.setShouldCheckClassLoader(false).
您是否尝试使用单例对象中的会话管理器?这样,您应该始终获得相同的管理器实例,并且不应该出现类加载器问题。
Did you try using the sessionmanager from a singleton object? That way, you should always get the same manager-instance and there should be no classloader-issues.