• Unclosed session detected

  • OpenKM has many interesting features, but requires some configuration process to show its full potential.
OpenKM has many interesting features, but requires some configuration process to show its full potential.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #18551  by madhav
 
Hi,
I am getting java.lang.Exception error in console. Could you tell me why I am getting this error. How can I control this error. I am using openkm5.1.9 version.
Code: Select all
15:47:05,156 WARN  [SessionImpl] Unclosed session detected. The session was opened here: 
java.lang.Exception: Stack Trace
	at org.apache.jackrabbit.core.SessionImpl.<init>(SessionImpl.java:249)
	at org.apache.jackrabbit.core.XASessionImpl.<init>(XASessionImpl.java:124)
	at org.apache.jackrabbit.core.RepositoryImpl.createSessionInstance(RepositoryImpl.java:1535)
	at org.apache.jackrabbit.core.RepositoryImpl.createSession(RepositoryImpl.java:993)
	at org.apache.jackrabbit.core.RepositoryImpl.extendAuthentication(RepositoryImpl.java:1058)
	at org.apache.jackrabbit.core.RepositoryImpl.login(RepositoryImpl.java:1382)
	at org.apache.jackrabbit.commons.AbstractRepository.login(AbstractRepository.java:41)
	at com.fab66.jcr.JCRUtils$1.run(JCRUtils.java:390)
	at java.security.AccessController.doPrivileged(Native Method)
	at javax.security.auth.Subject.doAs(Unknown Source)
	at com.fab66.jcr.JCRUtils.getSession(JCRUtils.java:385)
	at com.fab66.servlet.admin.RepositoryNoteSearchServlet.doGet(RepositoryNoteSearchServlet.java:121)
	at com.fab66.servlet.frontend.CommentsFeeds.doGet(CommentsFeeds.java:53)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
	at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
	at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
	at java.lang.Thread.run(Unknown Source)
 #18562  by noxious
 
It's not error, but warning. I get it too, inside my workflows. It is invoked from an assignment handler containing this code:
Code: Select all
Session s=JCRUtils.getSession();
String user=s.getUserID();
assignable.setActorId(user);
I tried session.close() and session.save() but they don't fix it...
I am interested in hearing a solution for this, because leaving open sessions is a bad thing for security...
 #18575  by jllort
 
Better in workflow for doing some operation work with system token.
 #18579  by noxious
 
I guess you mean this: String token = JcrSessionManager.getInstance().getSystemToken();
But how can I get the userID from system token?
 #18664  by pavila
 
I would recommend to upgrade to last OpenKM 5.1.10 (or better, recently released OpenKM 6.2).

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.