在执行JPA查询时获取javax.resource.ResourceException

时间:2013-08-08 12:45:36

标签: hibernate jpa

获取javax.resource.ResourceException:IJ000460:在下面的代码被提供时检查事务时出错

Query query = entityManager.createQuery("select lower(name) FROM Attribute");
List temp= query.getResultList();

例外是

17:15:27,838 WARN  [org.hibernate.engine.jdbc.spi.SqlExceptionHelper]
(http-localhost-127.0.0.1-8080-2) SQL Error: 0, SQLState: null
17:15:27,841 ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] 
(http-localhost-127.0.0.1-8080-2) javax.resource.ResourceException: IJ000460: 
Error checking for a transaction
17:15:27,845 ERROR [com.dao.impl.AttributeDaoImpl] 
(http-localhost-127.0.0.1-8080-2) org.hibernate.exception.GenericJDBCException: 
Could not open connection

此例外不常见。我无法得到正确的提示。

提前致谢

0 个答案:

没有答案