I have no way to grok what the intent is, nor the details of what this query is expecting in the database, but upon a first look through the SQL documentation I changed this query by putting quotes around the question marks '?' in the LIKE clauses and MariaDB accepted it. i.e. -
SELECT t0.DOMAIN_NAME, t0.USER_NAME, t0.TARGET_ADDRESS FROM JAMES_RECIPIENT_REWRITE t0 WHERE (t0.USER_NAME LIKE '?' ESCAPE '\\' AND t0.DOMAIN_NAME LIKE '?' ESCAPE '\\') ORDER BY t0.DOMAIN_NAME DESC; This is just a guess on my part, but me thinks this might be a bug in how Apache James is constructing this query? Marc... On 01/25/2019 01:25 PM, Marc Chamberlin wrote: > SELECT t0.DOMAIN_NAME, t0.USER_NAME, t0.TARGET_ADDRESS FROM > JAMES_RECIPIENT_REWRITE t0 WHERE (t0.USER_NAME LIKE ? ESCAPE '\\' AND > t0.DOMAIN_NAME LIKE ? ESCAPE '\\') ORDER BY t0.DOMAIN_NAME DESC; -- Linux Counter