【问题标题】:ERROR: cannot execute CREATE TABLE in a read-only transaction - Jasper reporting错误:无法在只读事务中执行 CREATE TABLE - Jasper 报告
【发布时间】:2018-10-15 17:39:28
【问题描述】:

我在 Jasper 中遇到了这个烦人的问题。我创建了一个基于 PostgreSQL 函数的报告。当我观看预览时,我对结果没有任何问题。但是,当我发布报告并尝试执行它时,我收到此错误:

org.postgresql.util.PSQLException: ERROR: cannot execute CREATE TABLE in a read-only transaction

我在互联网上查看了可能的解决方案,到目前为止,这是我发现的唯一类似问题:

https://community.jaspersoft.com/questions/814793/report-execution-fails-due-read-only-transaction-mode

但是,将属性添加到 URL 中不起作用,或者我不确定是否必须这样写:

jdbc:postgresql://<strong>server</strong>:5432/<strong>data_base</strong>?defaultReadOnly="false"

在 Jasper 中,我还能做什么?我只能查询函数,并且要求对其进行任何更改是一个巨大的官僚问题。

碧玉工作室 6.3.0

【问题讨论】:

  • 你有完整的堆栈跟踪吗?您还应该发布小 jrxml

标签: postgresql jasper-reports database-connection connection-string jaspersoft-studio


【解决方案1】:

根据the documentation,JDBC 连接参数将是readOnly=false

您是否确认您没有连接到流复制备用服务器?

【讨论】:

    猜你喜欢
    • 2019-09-04
    • 2019-07-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多