I created a virtual graph using My SQL DB and executing a SPARQL over it. I want to use GROUP by in the SPARQL. There are 2 fields i want to group by. One is working fine, but while grouping by other field, it shows Internal Server Error and log says:
Caused by: java.sql.SQLException: Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='
You need to fix the collation type on your database. You should be able to find lots of answers to this problem if you do a search on the error "Caused by: java.sql.SQLException: Illegal mix of collations (latin1_swedish_ci,IMPLICIT)"
It looks like your database is using latin1_sweedish but Stardog is using UTF-8. I'm not sure if you can just force UTF-8 on the connection by adding characterEncoding=UTF-8 on the jdbc connection string or if you need to update the collation type in the database.
Here is a good resource I found for addressing the issues and should get you going
Have you added any connections properties to your MySQL connection string? If not, and your database fields are using UTF-8, you can add characterEncoding=UTF-8 as a property on your MySQL JDBC URL.
Are you able to share your SPARQL query and the query plan? Are you using reasoning? Is there a portion of the query apart from the virtual graph block?
Thank you for getting back!
I am not using any conection properties with connection string.
Will check DB for UTF-8
Query looks like :
PREFIX classA:http://api.stardog.com/A#
PREFIX classB:http://api.stardog.com/B#