• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java.lang.IllegalStateException: createSession: Too many active session; getting redirected to blank

 
Ravi Avisa
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All

I am getting a blank web page,instead of redirecting to Error.html, when a user is trying to access login page.
this is happening when number of user are exceeding maxActiveSession.


entries in context.xml file
---------------------------------------------------------------------------------------------
<Context>
<Manager className='org.apache.catalina.session.StandardManager' maxActiveSessions='1'
pathname=""
>
</Manager>
</Context>
-------------------------------------------------------------------------

Entries in Web.xml
---------------------------------------------------------------------------
<error-page>
<exception-type>java.lang.IllegalStateException</exception-type>
<location>/error.html</location>
</error-page>
<security-constraint>
<web-resource-collection>

<web-resource-name>native</web-resource-name>
<description>Web application</description>
<url-pattern>/index.jsp</url-pattern>
<url-pattern>/pages/*</url-pattern>
<url-pattern>/modules/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>Web Client Users</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>FORM</auth-method>
<realm-name>NATIVE</realm-name>
<form-login-config>
<form-login-page>/login.jsp</form-login-page>
<form-error-page>/login_failed.jsp</form-error-page>
</form-login-config>
</login-config>
<security-role>
<role-name>Web Client Users</role-name>
</security-role>
-----------------------------------------------------------------------------------------------

This error displayed jboss console
--------------------------------------------------------------------------------------------------

2012-12-11 17:09:44,373 ERROR [org.apache.catalina.connector.CoyoteAdapter] An exception or error occurred in the container during the request processing
java.lang.IllegalStateException: createSession: Too many active sessions
at org.apache.catalina.session.StandardManager.createSession(StandardManager.java:286)
at org.apache.catalina.connector.Request.doGetSession(Request.java:2206)
at org.apache.catalina.connector.Request.getSessionInternal(Request.java:2150)
at org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAuthenticator.java:230)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:446)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:619)

Please suggest how to redirect to error page, when maxActivesessions have exceeded the limit

Thanks
AvisaRavi
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ravi, welcome to JavaRanch

moving appropriate forum to get better response
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic