`
wunan1402
  • 浏览: 11685 次
  • 性别: Icon_minigender_1
  • 来自: 西安
社区版块
存档分类
最新评论

报表上传jboss服务器出错

阅读更多
用ireport写的报表,在同一个表中,连接两个数据库,但是另一个库使用的近义词,在上传时候,报出Caused by: org.hibernate.exception.GenericJDBCException: Cannot open connection
(javax.transaction.SystemException: java.lang.Throwable: Unabled to enlist  resource, see the previous warnings. tx=TransactionImple < ac, BasicAction .... Could not enlist in transaction on entering meta-aware object!;
后来上网查询,发现是因为没有设置jboss服务器在一个事务中访问多个数据库。
解决方式是修改下jboss的配置:

conf/jbossjta-properties.xml (JBoss-4.x) or conf/jbossts-properies.xml (JBoss 5) 
在<properties depends="arjuna" name="jta">
节点下增加:
<!-- 支持一个事务中包括多个数据源 -->
<property name="com.arjuna.ats.jta.allowMultipleLastResources" value="true"/>
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics