【问题标题】:Can't run JasperReports Server report using Teiid as datasource无法使用 Teiid 作为数据源运行 JasperReports Server 报告
【发布时间】:2016-08-10 02:08:17
【问题描述】:

我已经使用 Jaspersoft Studio 成功查询了 Teiid 9 数据源,但是当部署到 JasperReports Server 6.2 报告时会抛出如下异常:

Caused by: org.teiid.core.TeiidRuntimeException: Remote javax.resource.ResourceException: IJ000461: Could not enlist in transaction on entering meta-aware object
        at org.jboss.jca.core.connectionmanager.tx.TxConnectionManagerImpl.managedConnectionReconnected(TxConnectionManagerImpl.java:561)
        at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.reconnectManagedConnection(AbstractConnectionManager.java:922)
        ... 52 more
Caused by: org.teiid.core.TeiidRuntimeException: Remote javax.transaction.SystemException: IJ000356: Failed to enlist: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: 0:ffff0a0064a4:-2b7b5a65:57a45632:4d7a status: ActionStatus.ABORT_ONLY >
        at org.jboss.jca.core.connectionmanager.listener.TxConnectionListener$TransactionSynchronization.checkEnlisted(TxConnectionListener.java:970)
        at org.jboss.jca.core.connectionmanager.listener.TxConnectionListener.enlist(TxConnectionListener.java:412)
        at org.jboss.jca.core.connectionmanager.tx.TxConnectionManagerImpl.managedConnectionReconnected(TxConnectionManagerImpl.java:554)
        ... 53 more

【问题讨论】:

    标签: jdbc jasperserver teiid


    【解决方案1】:

    我已经设法通过使用 JNDI 数据源而不是 JDBC 来解决我的问题。

    基本上我遵循了这个指南:http://community.jaspersoft.com/wiki/how-add-new-jndi-connection-tomcat

    web.xml 的一部分

    <resource-ref>
        <description>Teiid JasperServer repository</description>
        <res-ref-name>jdbc/teiid</res-ref-name>
        <res-type>javax.sql.DataSource</res-type>
        <res-auth>Container</res-auth>
    </resource-ref>
    

    context.xml 的一部分

      <Resource name="jdbc/teiid"
              auth="Container"
              type="javax.sql.DataSource"
              maxActive="100"
              maxIdle="30"
              maxWait="10000"
              username="user"
              password="user"
              driverClassName="org.teiid.jdbc.TeiidDriver"
              validationQuery="select 1"
              testOnBorrow="true"
              url="jdbc:teiid:Portfolio@mm://localhost:31000" />
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-05-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多