【问题标题】:Spring Integration - Message Store configuration for Microsoft SQL Server 2012Spring Integration - Microsoft SQL Server 2012 的消息存储配置
【发布时间】:2015-03-19 18:22:03
【问题描述】:

我使用 JDBC 在 Spring Integration 中设置了一个 MessageStore,下面是我的配置:

<bean id="queryProvider" class="org.springframework.integration.jdbc.store.channel.MySqlChannelMessageStoreQueryProvider" />

<!-- JDBC message store configuration -->
<bean id="store" class="org.springframework.integration.jdbc.store.JdbcChannelMessageStore">
    <property name="dataSource" ref="basicDataSource" />
    <property name="channelMessageStoreQueryProvider" ref="queryProvider" />
    <property name="region" value="TX_TIMEOUT" />
    <property name="usingIdCache" value="true" />
</bean>

我的底层数据库是 Microsoft SQL Server 2012,在启动服务器时出现以下异常:

nested exception is com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near 'LIMIT'.
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:83)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:605)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:639)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:664)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:704)

我该如何解决这个问题?

【问题讨论】:

    标签: java sql-server spring sql-server-2012 spring-integration


    【解决方案1】:

    实现SqlServerChannelMessageStoreQueryProvider 的最佳方式是不要使用MySqlChannelMessageStoreQueryProvider,因为那些RDBMS 供应商使用不同的DML。

    随意提出JIRA 票,甚至contribute

    【讨论】:

    • 谢谢,阿尔乔姆。我会做的。
    猜你喜欢
    • 1970-01-01
    • 2016-06-14
    • 2021-03-20
    • 2015-04-08
    • 1970-01-01
    • 1970-01-01
    • 2016-12-04
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多