JEE6 : Dukes Forest Tutorial : Part 3

Once MySql database was setup and appropriate jdbc-connection-pool information was set-up (Refer to Part 2), I did run into a JAAS exception. When I started the application, it would start up fine, but when i tried to log in, using any of the users setup, it would show me the following stack-trace:

WARNING: WEB9102: Web Login Failed: Login failed: Failed file 
login for [email protected]
SEVERE: javax.servlet.ServletException: Exception thrown while attempting to authenticate for user: [email protected]
at org.apache.catalina.connector.Request.login(
at org.apache.catalina.connector.Request.login(
at org.apache.catalina.connector.RequestFacade.login(
at com.forest.web.UserController.login(
at com.forest.web.UserController$Proxy$_$$_WeldClientProxy.login(UserController$Proxy$_$$
at sun.reflect.GeneratedMethodAccessor253.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(
at java.lang.reflect.Method.invoke(
at com.sun.el.parser.AstValue.invoke(
at com.sun.el.MethodExpressionImpl.invoke(
at org.jboss.weld.util.el.ForwardingMethodExpression.invoke(
at org.jboss.weld.el.WeldMethodExpression.invoke(

Debugging this issue, I found that I had not created a Security Realm in the glassfish domain. Oracles’ documentation for this tutorial is excellent and found the following link that tells you exactly how to set up the security realm.

You could create the Security Realm via the glassfish admin application. But creating the realm using Ant as explained in the above link is the easiest way of doing it.

Leave a Reply

Your email address will not be published. Required fields are marked *