3 Replies Latest reply on Mar 23, 2016 6:00 AM by rishianand50

    modeshape is not saving data in mysql ?

    rishianand50

      I am getting below error :

       

      Caused by: java.sql.BatchUpdateException: Illegal mix of collations (latin1_general_cs,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='

       

      repository-config.json

      {

          "name" : "sampleRepository",

          "monitoring" : {

              "enabled" : true

          },

          "storage" : {

              "cacheName" : "sampleRepositor",

              "cacheConfiguration" : "infinispan-configuration-mysql-async-eviction.xml",

              "binaryStorage" : {

                  "type"  : "database", 

                  "driverClass" : "com.mysql.jdbc.Driver", 

                  "url" : "jdbc:mysql://192.168.3.25:3306/abcdef",

                  "username" : "abcdef",

                  "password" : "abcdef"

              }

          },

          "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.25:3306/abcdef"

        driver="com.mysql.jdbc.Driver"

        username="abcdef"

        password="abcdef"/>

        <string-keyed-table

        prefix="RISHI_NEW"

        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>