UTF-8 in JDBC principal name? by glassfish-2 Apr 12, 2010; 03:40pm :: Rate this Message: - Use ratings to moderate (?) Reply | Print | View Threaded | Show Only this Message I have a webapp on Glassfish v2 with form-based login to a MySQL JDBC realm. It works fine, [i]except[/i] that principal names containing non-ASCII characters (e.g. 'härdröcker') are refused to log in. Everything else works fine, and I have set up most parameters for UTF-8. The principal name is stored correctly in the user DB. Is there a magic setting somewhere that I have missed? Or doesn't Glassfish v2 support UTF-8 characters in user names in JDBC realms? (By the way, the same problem occurs for passwords, too). [Message sent by forum member 'tmpsa'] http://forums.java.net/jive/thread.jspa?messageID=396453 Re: UTF-8 in JDBC principal name? by glassfish-2 Apr 12, 2010; 08:07pm :: Rate this Message: - Use ratings to moderate (?) Reply | Print | View Threaded | Show Only this Message I have observed that server.log gets an audit warning when I log in as (the existing) user 'åäö'. It is interesting to note that now Glassfish beleives that the user name is 'åäö' . [#|2010-04-12T16:28:26.112+0200|INFO|sun-appserver2.1|javax.enterprise.system.core.security|_ThreadID=27;_ThreadName=httpSSLWorkerThread-8181-1;åäö;|SEC5046: Audit: Authentication refused for [åäö].|#] [#|2010-04-12T16:28:26.112+0200|WARNING|sun-appserver2.1|javax.enterprise.system.container.web|_ThreadID=27;_ThreadName=httpSSLWorkerThread-8181-1;_RequestID=597e49cc-6474-4ed7-92a5-6d2fa747490d;|Web login failed: Login failed: javax.security.auth.login.LoginException: Security Exception|#] [Message sent by forum member 'tmpsa'] http://forums.java.net/jive/thread.jspa?messageID=396498 --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... Re: UTF-8 in JDBC principal name? by glassfish-2 Apr 13, 2010; 03:59pm :: Rate this Message: - Use ratings to moderate (?) Reply | Print | View Threaded | Show Only this Message Strangely enough, I now get the same message in server.log, but now shown correcty: [#|2010-04-13T12:16:08.475+0200|INFO|sun-appserver2.1|javax.enterprise.system.core.security|_ThreadID=27;_ThreadName=httpSSLWorkerThread-8181-1;åäö;|SEC5046: Audit: Authentication refused for [åäö].|#] Still refused login, though. :-( [Message sent by forum member 'tmpsa'] http://forums.java.net/jive/thread.jspa?messageID=396658 --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... Re: UTF-8 in JDBC principal name? by glassfish-2 Apr 15, 2010; 01:15pm :: Rate this Message: - Use ratings to moderate (?) Reply | Print | View Threaded | Show Only this Message did u change anything between the previous post and this one ?. Strings are used to represent the username within the JDBCRealm. does your form specify the UTF-8 encoding
[Message sent by forum member 'kumarjayanti'] http://forums.java.net/jive/thread.jspa?messageID=397067 --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... Re: UTF-8 in JDBC principal name? by glassfish-2 Apr 15, 2010; 01:26pm :: Rate this Message: - Use ratings to moderate (?) Reply | Print | View Threaded | Show Only this Message No, I did not change anything. But the garbled log entry [i]may[/i] be caused by the text editor that viewed server.log; it probably didn't realize that the file was coded UTF-8. So that may be a red herring. No, adding enctype="UTF-8" to my login