Jump to content
We've recently updated our Privacy Statement, available here ×
  • Server error when using Derived Table with Redshift


    Jim W

    Issue Description:

    You are using JasperReports Server AWS with a JDBC Redshift datasource and getting the following exception as a result of a derived table containing group by or Distinct. 

    com.jaspersoft.commons.semantic.dsimpl.JRQueryDataSet$JRDataSetIterator.next(JRQueryDataSet.java:386) ... 168 more Caused by: org.postgresql.util.PSQLException: ERROR: transaction is read-only Detail: at 
    

    Resolution:

    Try switching from jdbc to JNDI datasource.  For example, define a JNDI datasource in the repository and add the corresponding resource in META-INF/context.xml,

    <Resource name="jdbc/foodmart" 
              auth="Container" 
              type="javax.sql.DataSource"
              maxActive="100" 
              maxIdle="30" 
              maxWait="10000"
              username="jasperdb" 
              password="password"
              driverClassName="org.postgresql.Driver"
              validationQuery="SELECT 1"
              testOnBorrow="true"
              url="jdbc:postgresql://127.0.0.1:5432/foodmart?useUnicode=true&amp;characterEncoding=UTF-8&amp;autoReconnect=true&amp;autoReconnectForPools=true"
              factory="com.jaspersoft.jasperserver.tomcat.jndi.JSBasicDataSourceFactory"/>
    

    Ref. Case #00052709


    User Feedback

    Recommended Comments

    There are no comments to display.



    Guest
    This is now closed for further comments

×
×
  • Create New...