SQL error while fetching stored entry with key ?
rishianand50 Apr 1, 2016 2:56 AMI am getting below error.
nested exception is javax.jcr.RepositoryException: Error while starting 'sample' repository: SQL error while fetching stored entry with key: 5d1ebbb317f1e7/jcr:system/jcr:nodeTypes/nt:unstructured//undefined/*, lockingKey: 5d1ebbb317f1e7/jcr:system/jcr:nodeTypes/nt:unstructured//undefined/*
Caused by: java.sql.SQLException: Illegal mix of collations (latin1_general_cs,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='
at org.mariadb.jdbc.internal.util.ExceptionMapper.get(ExceptionMapper.java:136)
at org.mariadb.jdbc.internal.util.ExceptionMapper.throwException(ExceptionMapper.java:69)
at org.mariadb.jdbc.MariaDbServerPreparedStatement.executeQueryEpilog(MariaDbServerPreparedStatement.java:338)
at org.mariadb.jdbc.MariaDbServerPreparedStatement.executeInternal(MariaDbServerPreparedStatement.java:293)
at org.mariadb.jdbc.MariaDbServerPreparedStatement.execute(MariaDbServerPreparedStatement.java:371)
... 659 more
repositoryconfig.json
{
"name": "sampe",
"monitoring": {
"enabled": true
},
"storage": {
"cacheName": "sampleRepotory",
"cacheConfiguration": "infinispan-configuration-mysql-async-eviction.xml",
"transactionManagerLookup" : {
"name" : "com.osmosix.mgmt.modeshape.AtomikosTransactionManagerLookup"
},
"binaryStorage": {
"type": "file",
"directory": "${java.io.tmpdir}/modeshape_spring_sample/binaries",
"minimumBinarySizeInBytes": 40
}
},
"workspaces": {
"default": "default",
"allowCreation": true
},
"security": {
"anonymous": {
"roles": ["readonly", "readwrite", "admin"],
"useOnFailedLogin": false
}
}
}
infinispan-configuration-mysql-async-eviction.xml
<?xml version="1.0" encoding="UTF-8"?>
<infinispan
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:infinispan:config:7.0 http://www.infinispan.org/schemas/infinispan-config-7.0.xsd
urn:infinispan:config:store:jdbc:7.0 http://www.infinispan.org/schemas/infinispan-cachestore-jdbc-config-7.0.xsd"
xmlns="urn:infinispan:config:7.0">
<cache-container default-cache="mydb">
<jmx duplicate-domains="true"/>
<local-cache name="mydb">
<transaction
mode="NON_XA"
locking="PESSIMISTIC"/>
<eviction max-entries="8192"
strategy="LIRS"/>
<persistence>
<string-keyed-jdbc-store xmlns="urn:infinispan:config:store:jdbc:7.0"
fetch-state="false"
read-only="false"
purge="false">
<connection-pool
connection-url="jdbc:mysql://192.168.3.212:3306/test"
driver="com.mysql.jdbc.Driver"
username="test"
password="test"/>
<string-keyed-table
prefix="TEST"
create-on-start="true"
drop-on-exit="false">
<id-column name="ID_COLUMN" type="VARCHAR(255) CHARACTER SET latin1 COLLATE latin1_general_cs"/>
<data-column name="DATA_COLUMN" type="LONGBLOB"/>
<timestamp-column name="TIMESTAMP_COLUMN" type="BIGINT"/>
</string-keyed-table>
<write-behind thread-pool-size="10"/>
</string-keyed-jdbc-store>
</persistence>
</local-cache>
</cache-container>
</infinispan>