Today I ran into the problem, that I got an exception which I never got before:
When I tried to login my application which uses Spring and Acegi for security, I got in the logfiles:
2006-06-06 07:56:10,855 DEBUG [http-8080-Processor24] org.acegisecurity.ui.AbstractProcessingFilter: Authentication request failed: org.acegisecurity.AuthenticationServiceException: PreparedStatementCallback; uncategorized SQLException for SQL [SELECT username,password,enabled FROM users WHERE username = ?]; SQL state [HY000]; error code [1267]; Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation ‘=’; nested exception is java.sql.SQLException: Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation ‘=’; nested exception is org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL [SELECT username,password,enabled FROM users WHERE username = ?]; SQL state [HY000]; error code [1267]; Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation ‘=’; nested exception is java.sql.SQLException: Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation ‘=’
The reason was, that I changed the default CharacterSet on the mySQL Server to UTF8 for another application.
After googleing a bit I found the following solutions:
in my hibernate.cfg I had to add the following properties:
Additionally all the mysql columns had to be altered to use charset UTF8 and Collation utf8_unicode_ci
After that it worked.
Pingback: Kasper Suits
Pingback: How to get 360 waves
Pingback: anne rice
Pingback: engelhard silver bars
Pingback: Kasper Suits
Pingback: OpenOffice Download
Pingback: jeux de carte