How to resolve ServletException when trying to log in to the application multiple times from same browser?

Solution Verified - Updated -

Issue

Follow below steps to reproduce this issue.

  • Use javax.servlet.http api in the code and use request.login(), request.logout() and request.authenticate() methods for authentication.

  • Refer this link for implementation of programmatic authentication.

  • open any browser (which supports multiple tab feature), and login to the application.

  • Try to open new tab in same browser and try to login with different user in that tab by keeping the session of first user alive.

  • while trying to login to the same browser using different tab and different user credentials, exception will be thrown.

[stderr ] javax.servlet.ServletException: JBWEB000053: Failed to authenticate a principal
[stderr ]   at org.apache.catalina.connector.Request.login(Request.java:3228)
[stderr ]   at org.apache.catalina.connector.RequestFacade.login(RequestFacade.java:1009)

Environment

  • Red Hat JBoss Enterprise Application Platform
    • 6.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content