I see 2 possible problems.
1) The name of your password column *implies* that you are MD5-digesting
the password into the DB. If so - you have to set this property for the
realm:
<property name="digest-algorithm" value="MD5"/>. Otherwise it will
look in the DB for your plaintext password and nothing will work.
2) "Charset: [/i]"
What's "[/i]" ???
------------
Useful blogs:
JDBC:
http://blogs.sun.com/foo/entry/mort_learns_jdbc_for_glassfish
JDBC Realms:
http://blogs.sun.com/foo/entry/mort_learns_jdbc_realm_authentication
glassfish_at_javadesktop.org wrote:
>Hi.
>
>I am writing an application which required a authorization but there appears a problem which could not be solved. When i enter correct username and password I go to j_security_check and get exception from glassfish:
>
>[i]SEC5046: Audit: Authentication refused for [w].
>Web login failed: Login failed: javax.security.auth.login.LoginException: Security Exception
>PWC4011: Unable to set request character encoding to UTF-8 from context /ZPSSBD-war, because request parameters have already been read, or ServletRequest.getReader() has already been called[/i]
>
>Datas are in table login_manager:
>login | md5pass | user_type
>
>JDBCRealm conf:
>[i]
>JNDI: ssbd07UserJDBCResource
>User Table: login_manager
>User Name Column: login
>Password Column: md5pass
>Group Table: login_manager
>Group Name Column:user_type
>Assign Group:
>Database User:ssbd07
>Database Password: test
>Digest Algorithm:
>Encoding:
>Charset:[/i]
>
>Every thing in web.xml is setted correctly.
>
>I would be very thankful for your help.
>[Message sent by forum member 'b1n4ry' (b1n4ry)]
>
>http://forums.java.net/jive/thread.jspa?messageID=244956
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>
>
--
Byron Nevins Work 408-276-4089, Home 650-359-1290, Cell 650-784-4123 - Sun Microsystems, Inc.