[jboss-jira] [JBoss JIRA] (WFLY-5495) Can't configure ID/data/timestamp columns of JDBC-based cache stores

Ladislav Thon (JIRA) issues at jboss.org
Thu Oct 8 09:23:00 EDT 2015


    [ https://issues.jboss.org/browse/WFLY-5495?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13116423#comment-13116423 ] 

Ladislav Thon commented on WFLY-5495:
-------------------------------------

Here's a proposed fix: https://github.com/wildfly/wildfly/pull/8257 Seems to work fine for me, but I'm leaving the decision up to you, because I really don't understand the Infinispan subsystem code.

> Can't configure ID/data/timestamp columns of JDBC-based cache stores
> --------------------------------------------------------------------
>
>                 Key: WFLY-5495
>                 URL: https://issues.jboss.org/browse/WFLY-5495
>             Project: WildFly
>          Issue Type: Bug
>          Components: Clustering
>    Affects Versions: 10.0.0.CR2
>            Reporter: Ladislav Thon
>            Assignee: Paul Ferraro
>
> When I'm trying to configure a JDBC-based cache store for an "offload" Infinispan cache, configuration for the ID/data/timestamp columns is not applied. I found that this is the case by writing:
> {code}
> <replicated-cache name="offload" mode="SYNC">
>     <transaction mode="BATCH"/>
>     <binary-keyed-jdbc-store data-source="testDS" passivation="false" preload="true" purge="false" shared="true">
>         <binary-keyed-table prefix="b">
>             <id-column name="id" type="VARCHAR(255)"/>
>             <data-column name="datum" type="VARBINARY(10000)"/>
>             <timestamp-column name="ver" type="BIGINT"/>
>         </binary-keyed-table>
>     </binary-keyed-jdbc-store>
> </replicated-cache>
> {code}
> and getting the following error:
> {code}
> 15:12:44,254 ERROR [org.infinispan.persistence.jdbc.TableManipulation] (ServerService Thread Pool -- 65) ISPN008011: Error while creating table; used DDL statement: 'CREATE TABLE `b_clusterbench_ee7_ear_clusterbench_ee7_web_offload_war`(id VARCHAR NOT NULL, datum BINARY, version BIGINT, PRIMARY KEY (id))': com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NOT NULL, datum BINARY, version BIGINT, PRIMARY KEY (id))' at line 1
> {code}
> Clearly, the configuration isn't applied, because the SQL statement cited in the error message uses default column names and types, which are different from what was configured.



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the jboss-jira mailing list