我将使用eclipselink从另一个模式执行一个简单的select操作,如下所示:
Query query = em.createNativeQuery("select * from another_schema.TABLE_NAME");
List returnList = query.getResultList();但是当我运行我的应用程序时,我得到了以下错误:
java.sql.SQLException: The transaction is no longer active - status: 'Marked rollback.
Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: The transaction is no longer active - status: 'Marked rollback. [Reason=weblogic.transaction.internal.TimedOutException: Transaction timed out after 30 seconds
BEA1-0091256F3B0B87325B62]'. No further JDBC access is allowed within this transaction.我有特权运行这个sql命令,我尝试使用sql developer,它正在工作。
有没有人可以帮我,我该如何运行这个NativeQuery?
谢谢!
发布于 2017-02-20 20:14:32
我解决了这个错误“在这个事务中不允许进一步的JDBC访问”。通过将Weblogic中的事务设置为"Local Transaction“。只需取消选中事务选项:支持全局事务
https://stackoverflow.com/questions/34266438
复制相似问题