[
https://issues.apache.org/jira/browse/CAUSEWAY-4009?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18085749#comment-18085749
]
Andi Huber commented on CAUSEWAY-4009:
--------------------------------------
For reference: the SQL Exception is triggered while invoking
org.apache.causeway.extensions.secman.applib.user.dom.ApplicationUserRepositoryAbstract.findByUsername(String)
where for some reason (and only sometimes) the passed in parameter might not be
received at the SQL server end as UTF8 but LATIN instead.
> [SecMan] Potential Collation Clash on Login
> -------------------------------------------
>
> Key: CAUSEWAY-4009
> URL: https://issues.apache.org/jira/browse/CAUSEWAY-4009
> Project: Causeway
> Issue Type: Bug
> Components: Viewer Wicket
> Reporter: Andi Huber
> Assignee: Andi Huber
> Priority: Major
> Fix For: 4.0.0
>
>
> Login potentially fails:
> Caused by: Exception [EclipseLink-4002] (Eclipse Persistence Services -
> 5.0.0.v202603230926-bc4f4eb36eb1dcce223533d87890ba458628a2f9):
> org.eclipse.persistence.exceptions.DatabaseException
>
> Internal Exception: java.sql.SQLException: (conn=17888) Illegal mix of
> collations (latin1_swedish_ci,IMPLICIT) and (utf8mb4_uca1400_ai_ci,COERCIBLE)
> for operation '='
>
> Error Code: 1267
>
> Call: SELECT ID, ACCOUNTTYPE, ATPATH, EMAILADDRESS, ENCRYPTEDPASSWORD,
> FAMILYNAME, FAXNUMBER, GIVENNAME, KNOWNAS, LANGUAGE, NUMBERFORMAT,
> PHONENUMBER, STATUS, TIMEFORMAT, USERNAME, VERSION FROM ApplicationUser WHERE
> (USERNAME = ?)
>
> bind => [1 parameter bound]
>
> Query: ReadAllQuery(name="causeway.ext.secman.ApplicationUser.findByUsername"
> referenceClass=ApplicationUser sql="SELECT ID, ACCOUNTTYPE, ATPATH,
> EMAILADDRESS, ENCRYPTEDPASSWORD, FAMILYNAME, FAXNUMBER, GIVENNAME, KNOWNAS,
> LANGUAGE, NUMBERFORMAT, PHONENUMBER, STATUS, TIMEFORMAT, USERNAME, VERSION
> FROM ApplicationUser WHERE (USERNAME = ?)")
--
This message was sent by Atlassian Jira
(v8.20.10#820010)