简体   繁体   English

javax.persistence.TransactionRequiredException的可能原因

[英]Possible causes of javax.persistence.TransactionRequiredException

What are the possible causes of a TransactionRequiredException? 什么是TransactionRequiredException的可能原因?

javax.ejb.EJBTransactionRolledbackException: JBAS011469:
Transaction is required to perform this operation
(either use a transaction or extended persistence context)

We have a setup where we run tests from a normal JVM towards an application container (jboss 7) over the JNDI interface. 我们有一个设置,在该设置中,我们通过JNDI接口从普通JVM向应用程序容器(jboss 7)运行测试。 We have a nightly build that runs this code every night and it usually succeeds. 我们有一个每晚生成的代码,每晚都会运行此代码,并且通常会成功。 Sometimes however, after a certain time of execution, all tests starts to fail with the above exception without any code change. 但是有时候,在执行了一定时间后,所有测试都开始失败,并且出现上述异常,并且没有任何代码更改。 Can any external issues cause this. 任何外部问题都可能导致此问题。 We have disk space, and since the exceptions are passed over the network I think the network is also good. 我们有磁盘空间,并且由于异常是通过网络传递的,所以我认为网络也不错。 Can any of the following cause an exception like this: 以下任何一种情况可能会导致这样的异常:

  • Lack of file descriptors 缺少文件描述符
  • Hibernate having problems talking to the database (mysql) Hibernate与数据库通话时遇到问题(mysql)
  • CPU load CPU负载
  • Out of memory 记不清

Sorry if the question got a bit abstract, but I cannot get my head around this one. 抱歉,这个问题有点抽象,但是我无法解决这个问题。 All solutions and debugging suggestions are more then welcome. 然后欢迎所有解决方案和调试建议。

I found my answer in the server.log jboss provides. 我在jboss提供的server.log中找到了答案。 The log shows that at the time when the tests starts to fail, this class: 日志显示在测试开始失败时,此类:

org.hornetq.core.client

throws

Throwable: java.lang.OutOfMemoryError: unable to create new native thread

So an OutOfMemoryError can cause 因此,OutOfMemoryError可能导致

javax.ejb.EJBTransactionRolledbackException: JBAS011469:
Transaction is required to perform this operation
(either use a transaction or extended persistence context)

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 javax.persistence.TransactionRequiredException: - javax.persistence.TransactionRequiredException: javax.persistence.TransactionRequiredException的原因是什么:没有事务在进行中 - What are the causes for javax.persistence.TransactionRequiredException: no transaction is in progress 错误javax.persistence.TransactionRequiredException:没有事务正在进行 - Error javax.persistence.TransactionRequiredException: no transaction is in progress 更新/删除查询中的javax.persistence.TransactionRequiredException - javax.persistence.TransactionRequiredException in update/delete query 小面应用程序中的javax.persistence.TransactionRequiredException - javax.persistence.TransactionRequiredException in small facelet application javax.persistence.TransactionRequiredException:当前没有活动的事务 - javax.persistence.TransactionRequiredException: There is no currently active transaction javax.persistence.TransactionRequiredException:PuId =没有活动事务 - javax.persistence.TransactionRequiredException: No active transaction for PuId= 保留在@PostConstruct中:javax.persistence.TransactionRequiredException - Persisting in @PostConstruct: javax.persistence.TransactionRequiredException 启用S​​pring事务,javax.persistence.TransactionRequiredException - Enabling Spring Transactions, javax.persistence.TransactionRequiredException javax.persistence.TransactionRequiredException:Spring 5 中没有正在进行的事务 - javax.persistence.TransactionRequiredException: no transaction is in progress in Spring 5
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM