Hi,
when using
org.hibernate.ejb.QueryImpl with
WebSphereExtendedJTATransactionLookup I'm facing following problem.
Hibernate throws an exception due to bug in my query (which is o.k. - I don't need help with that), and the exception is handled by following code in QueryImpl:
Code:
public List getResultList() {
try {
return query.list();
}
catch (HibernateException he) {
em.throwPersistenceException( he );
return null;
}
}
AbstractEntityManagerImpl.throwPersistenceException() tries first to rollback a transaction - which is not implemented in
WebSphereExtendedJTATransactionLookup, so it causes an
UnsupportedOperationException.
So, the original exception is lost and never logged to console or whatever else.
Should I report this as a bug into JIRA?
Thanks,
Lukas
Hibernate version: Code:
org.hibernate.ejb.Version <clinit> Hibernate EntityManager 3.2.0.CR1
org.hibernate.cfg.annotations.Version <clinit> Hibernate Annotations 3.2.0.CR1
org.hibernate.cfg.Environment <clinit> Hibernate 3.2 cr2
org.hibernate.cfg.Environment <clinit> hibernate.properties not found
org.hibernate.cfg.Environment buildBytecodeProvider Bytecode provider name : cglib
org.hibernate.cfg.Environment <clinit> using JDK 1.4 java.sql.Timestamp handling
Full stack trace of any exception that occurs:Code:
java.lang.UnsupportedOperationException
at org.hibernate.transaction.WebSphereExtendedJTATransactionLookup$TransactionManagerAdapter.setRollbackOnly(WebSphereExtendedJTATransactionLookup.java:97)
at org.hibernate.ejb.AbstractEntityManagerImpl.markAsRollback(AbstractEntityManagerImpl.java:392)
at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:545)
at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:567)
at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:56)
at cz.kb.statementsetup.dao.StatementSetupDAO.getActualStatementConfig(StatementSetupDAO.java:32)
Name and version of the database you are using:
Oracle 9i