Reputation: 1158
I have a glassfish project and I'm currently adding j_security_check with jdbc.
WARNING: WEB9102: Web Login Failed: com.sun.enterprise.security.auth.login.common.LoginException: Login failed: Security Exception
What additional information is needed to help me?
if I use the SHA256 I get:
SEVERE: SEC1111: Cannot load group for JDBC realm user [admin]. WARNING: WEB9102: Web Login Failed: com.sun.enterprise.security.auth.login.common.LoginException: Login failed: Security Exception
my login code:
<form method="POST" action="j_security_check">
Username: <input type="text" name="j_username" />
Password: <input type="password" name="j_password" />
<input type="submit" value="Login" />
<input type="reset" value="Reset" />
</form>
Upvotes: 2
Views: 6128
Reputation: 29
Though this was asked a long time ago, it could be helpful to someone just viewing it now. This is how I solved it.
Under the services tab in NetBeans, locate servers and Right-click on the glassfish server and select view admin console. This will launch the glassfish admin console on your default browser.
Under "configurations", click "server-config", then "security" and then "realms" . On the pane that displays on the right hand, click "new". Then you fill the details. Basically, that page tells glassfish server where the user table is in the database, the column/field that is used as the username, the name of the table that has the users group, the name of the password field/column, the kind of encryption that is used e.g MD5, SHA256 etc. Don't forget to also fill the digest algorithm (this is usually the same with the one you filled in the password encryption algorithm). If you are not using any encryption method in saving the passwords, you can enter "None".
you can also watch this on youtube link https://www.youtube.com/watch?v=a-hUUTHOzsY
Upvotes: 2