[Hibernate-JIRA] Created: (HHH-4075) UnsupportedOperationException when assigning an alias to an indexed collection
by Robert Wruck (JIRA)
UnsupportedOperationException when assigning an alias to an indexed collection
------------------------------------------------------------------------------
Key: HHH-4075
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4075
Project: Hibernate Core
Issue Type: Bug
Components: query-hql
Affects Versions: 3.3.2
Environment: Hibernate 3.3.2.GA, MySQL5InnoDBDialect
Reporter: Robert Wruck
This works:
select count(*) from Order o left join o.orderAttributes oa, Attribute a
where a.id = 1
and index(oa) = a
but accessing elements throws an exception:
select count(*) from Order o left join o.orderAttributes oa, Attribute a
where a.id = 1
and oa[a] is null or oa[a] = '2'
Replacing oa[a] with o.orderAttributes[a] does not throw an exception but also does an inner join, so it's not a workaround.
Stack trace:
java.lang.UnsupportedOperationException
at org.hibernate.hql.ast.tree.IdentNode.resolveIndex(IdentNode.java:66)
at org.hibernate.hql.ast.tree.IndexNode.resolve(IndexNode.java:94)
at org.hibernate.hql.ast.tree.FromReferenceNode.resolve(FromReferenceNode.java:117)
at org.hibernate.hql.ast.tree.FromReferenceNode.resolve(FromReferenceNode.java:113)
at org.hibernate.hql.ast.HqlSqlWalker.processIndex(HqlSqlWalker.java:956)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.addrExpr(HqlSqlBaseWalker.java:4576)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.expr(HqlSqlBaseWalker.java:1289)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.exprOrSubquery(HqlSqlBaseWalker.java:4243)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.comparisonExpr(HqlSqlBaseWalker.java:4084)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.logicalExpr(HqlSqlBaseWalker.java:1864)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.logicalExpr(HqlSqlBaseWalker.java:1792)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.whereClause(HqlSqlBaseWalker.java:818)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.query(HqlSqlBaseWalker.java:604)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.selectStatement(HqlSqlBaseWalker.java:288)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.statement(HqlSqlBaseWalker.java:231)
at org.hibernate.hql.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:254)
at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:185)
at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:136)
at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:101)
at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:80)
at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:94)
at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:156)
at org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:135)
at org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1651)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 3 months
[Hibernate-JIRA] Created: (HHH-3096) Count operator with idenfication variable w/ composite primary key produces bad sql
by Bob Tiernay (JIRA)
Count operator with idenfication variable w/ composite primary key produces bad sql
------------------------------------------------------------------------------------
Key: HHH-3096
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3096
Project: Hibernate3
Issue Type: Bug
Reporter: Bob Tiernay
@EmbeddedId
private Id id;
@Embeddable
public static class Id implements Serializable {
private static final long serialVersionUID = 6475618094377929936L;
@Column(name="TG_ID", nullable = false)
private Integer groupId;
@Column(name="MBR_ID", nullable = false)
private Integer memberId;
public Id() {
// Empty
}
public Id(Integer groupId, Integer memberId) {
super();
this.groupId = groupId;
this.memberId = memberId;
}
@Override
public boolean equals(Object other) {
if (other == this) {
return true;
} else if (other instanceof Id) {
return groupId.equals(((Id) other).groupId)
&& memberId.equals(((Id) other).memberId);
}
return false;
}
@Override
public int hashCode() {
return groupId.hashCode() ^ memberId.hashCode();
}
}
@NamedQuery(name = "GroupMember.getCountByGroup", query = "SELECT COUNT(gm) FROM GroupMember gm WHERE gm.id.groupId = :groupId")
produces
Hibernate: /* named HQL query GroupMember.getCountByGroup */ select count((groupmembe0_.TG_ID, groupmembe0_.MBR_ID)) as col_0_0_ from GROUP_MEMBER groupmembe0_ where groupmembe0_.TG_ID=?
and the following hibernate exception
Caused by: java.sql.SQLException: ORA-00907: missing right parenthesis
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:745)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:216)
at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:810)
at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1039)
at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:850)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1134)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3339)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3384)
at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:93)
at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:186)
at org.hibernate.loader.Loader.getResultSet(Loader.java:1787)
at org.hibernate.loader.Loader.doQuery(Loader.java:674)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
at org.hibernate.loader
Which is consistent with what Oracle produces by manual query execution. The problem is the extra set of parenthesis around the composite primary key columns which appear to be invalid (at least for Oracle)
The recommend fix would be to use COUNT(*) or count(groupmembe0_.TG_ID, groupmembe0_.MBR_ID) in yhis case
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 3 months
[Hibernate-JIRA] Created: (HHH-3187) Issue with Hibernate3.0 and weblogic8.1 while setting transaction is marked to setRollbackOnly... (AppSetRollbackOnlyException)
by Anjan Deb (JIRA)
Issue with Hibernate3.0 and weblogic8.1 while setting transaction is marked to setRollbackOnly... (AppSetRollbackOnlyException)
-------------------------------------------------------------------------------------------------------------------------------
Key: HHH-3187
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3187
Project: Hibernate3
Issue Type: Task
Affects Versions: 3.0 final
Environment: hibernate3.0, weblogic8.1, oracle9.1
Reporter: Anjan Deb
I am using Hibernate 3.0 with JTA (Weblogic 8.1 SP4).
Basically, I am trying to handle transaction/hibernate exceptions in my application.
I am managing transactions with UserTransaction. I start a transaction at the begining of the request and after that I am doing some operations on that transaction. And if some exception comes I log it, rollback the transaction and throw the exception.
UserTransaction.commit() throws RollbackException if anything goes wrong with the operation, but, it does not return what exactly went wrong, like, exceptions related to SQL Exception or hibernate Exception. It basically dumps all that information to the logs internally and throws RollbackException with the following trace (see below). But this trace has no such information which I can send back to the user. As, information of what went wrong has already been dumped to the server console.
I will appreciate if you can tell if there is anyway I can recieve the actual exception trace or am I doing anything wrong with the hibernate configuration??
Thanks in Advance,
Anjan
------------------------------------------------------------------------------------------------------------------------------
Actual Exception which transaction dumps to the server console/log
ERROR - ORA-00001: unique constraint (NOVATXN.UQ_BROKERS) violated
ERROR - ORA-00001: unique constraint (NOVATXN.UQ_BROKERS) violated
ERROR - Could not synchronize database state with session
org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:69)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:202)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:230)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:140)
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:296)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:980)
at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:353)
at org.hibernate.transaction.CacheSynchronization.beforeCompletion(CacheSynchronization.java:59)
at weblogic.transaction.internal.ServerSCInfo.callBeforeCompletions(ServerSCInfo.java:1010)
at weblogic.transaction.internal.ServerSCInfo.startPrePrepareAndChain(ServerSCInfo.java:115)
at weblogic.transaction.internal.ServerTransactionImpl.localPrePrepareAndChain(ServerTransactionImpl.java:1216)
at weblogic.transaction.internal.ServerTransactionImpl.globalPrePrepare(ServerTransactionImpl.java:1990)
at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:275)
at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:246)
at weblogic.transaction.internal.TransactionManagerImpl.commit(TransactionManagerImpl.java:303)
at weblogic.transaction.internal.TransactionManagerImpl.commit(TransactionManagerImpl.java:296)
at com.ebw.nova.common.invoker.JTATransactionalAction.commit(JTATransactionalAction.java:31)
at com.ebw.nova.common.invoker.TransactionalAction.doAction(TransactionalAction.java:47)
at com.ebw.nova.common.invoker.ActionInvoker.invokeAction(ActionInvoker.java:21)
at com.ebw.nova.server.handler.AbstractRequestHandler.process(AbstractRequestHandler.java:73)
at com.ebw.nova.server.communication.jms.MessageProcessor.processRequest(MessageProcessor.java:44)
at com.ebw.ejb.mdb.MQManager.onMessage(MQManager.java:70)
at weblogic.ejb20.internal.MDListener.execute(MDListener.java:370)
at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:262)
at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2678)
at weblogic.jms.client.JMSSession.execute(JMSSession.java:2598)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
Caused by: java.sql.BatchUpdateException: ORA-00001: unique constraint (NOVATXN.UQ_BROKERS) violated
at oracle.jdbc.driver.DatabaseError.throwBatchUpdateException(DatabaseError.java:367)
at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:8726)
at weblogic.jdbc.wrapper.PreparedStatement.executeBatch(PreparedStatement.java:169)
at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:58)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:195)
... 27 more
RollbackException Trace:
03/17/2008 08:50:09 [EROR] JTATransactionalAction weblogic.transaction.RollbackException: Unknown reason - with nested exception:
[weblogic.transaction.internal.AppSetRollbackOnlyException]
03/17/2008 08:50:09 [EROR] JTATransactionalAction com.novarum.nova.application.OperationException: Transaction does not exist
03/17/2008 08:50:09 [DBUG] MessageProcessor Unknown reason
java.lang.RuntimeException: Unknown reason
at com.ebw.nova.common.invoker.TransactionalAction.doAction(TransactionalAction.java:54)
at com.ebw.nova.common.invoker.ActionInvoker.invokeAction(ActionInvoker.java:21)
at com.ebw.nova.server.handler.AbstractRequestHandler.process(AbstractRequestHandler.java:73)
at com.ebw.nova.server.communication.jms.MessageProcessor.processRequest(MessageProcessor.java:44)
at com.ebw.ejb.mdb.MQManager.onMessage(MQManager.java:70)
at weblogic.ejb20.internal.MDListener.execute(MDListener.java:370)
at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:262)
at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2678)
at weblogic.jms.client.JMSSession.execute(JMSSession.java:2598)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
Caused by: com.novarum.nova.application.OperationException: Unknown reason
at com.ebw.nova.common.invoker.JTATransactionalAction.commit(JTATransactionalAction.java:35)
at com.ebw.nova.common.invoker.TransactionalAction.doAction(TransactionalAction.java:47)
... 10 more
Caused by: weblogic.transaction.RollbackException: Unknown reason - with nested exception:
[weblogic.transaction.internal.AppSetRollbackOnlyException]
at weblogic.transaction.internal.TransactionImpl.throwRollbackException(TransactionImpl.java:1683)
at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:325)
at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:246)
at weblogic.transaction.internal.TransactionManagerImpl.commit(TransactionManagerImpl.java:303)
at weblogic.transaction.internal.TransactionManagerImpl.commit(TransactionManagerImpl.java:296)
at com.ebw.nova.common.invoker.JTATransactionalAction.commit(JTATransactionalAction.java:31)
... 11 more
getCause(): com.novarum.nova.application.OperationException: Unknown reason
at com.ebw.nova.common.invoker.JTATransactionalAction.commit(JTATransactionalAction.java:35)
at com.ebw.nova.common.invoker.TransactionalAction.doAction(TransactionalAction.java:47)
at com.ebw.nova.common.invoker.ActionInvoker.invokeAction(ActionInvoker.java:21)
at com.ebw.nova.server.handler.AbstractRequestHandler.process(AbstractRequestHandler.java:73)
at com.ebw.nova.server.communication.jms.MessageProcessor.processRequest(MessageProcessor.java:44)
at com.ebw.ejb.mdb.MQManager.onMessage(MQManager.java:70)
at weblogic.ejb20.internal.MDListener.execute(MDListener.java:370)
at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:262)
at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2678)
at weblogic.jms.client.JMSSession.execute(JMSSession.java:2598)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
Caused by: weblogic.transaction.RollbackException: Unknown reason - with nested exception:
[weblogic.transaction.internal.AppSetRollbackOnlyException]
at weblogic.transaction.internal.TransactionImpl.throwRollbackException(TransactionImpl.java:1683)
at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:325)
at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:246)
at weblogic.transaction.internal.TransactionManagerImpl.commit(TransactionManagerImpl.java:303)
at weblogic.transaction.internal.TransactionManagerImpl.commit(TransactionManagerImpl.java:296)
at com.ebw.nova.common.invoker.JTATransactionalAction.commit(JTATransactionalAction.java:31)
... 11 more
getCause(): weblogic.transaction.internal.AppSetRollbackOnlyException
at weblogic.transaction.internal.TransactionImpl.setRollbackOnly(TransactionImpl.java:504)
at org.hibernate.transaction.CacheSynchronization.setRollbackOnly(CacheSynchronization.java:73)
at org.hibernate.transaction.CacheSynchronization.beforeCompletion(CacheSynchronization.java:63)
at weblogic.transaction.internal.ServerSCInfo.callBeforeCompletions(ServerSCInfo.java:1010)
at weblogic.transaction.internal.ServerSCInfo.startPrePrepareAndChain(ServerSCInfo.java:115)
at weblogic.transaction.internal.ServerTransactionImpl.localPrePrepareAndChain(ServerTransactionImpl.java:1216)
at weblogic.transaction.internal.ServerTransactionImpl.globalPrePrepare(ServerTransactionImpl.java:1990)
at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:275)
at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:246)
at weblogic.transaction.internal.TransactionManagerImpl.commit(TransactionManagerImpl.java:303)
at weblogic.transaction.internal.TransactionManagerImpl.commit(TransactionManagerImpl.java:296)
at com.ebw.nova.common.invoker.JTATransactionalAction.commit(JTATransactionalAction.java:31)
at com.ebw.nova.common.invoker.TransactionalAction.doAction(TransactionalAction.java:47)
at com.ebw.nova.common.invoker.ActionInvoker.invokeAction(ActionInvoker.java:21)
at com.ebw.nova.server.handler.AbstractRequestHandler.process(AbstractRequestHandler.java:73)
at com.ebw.nova.server.communication.jms.MessageProcessor.processRequest(MessageProcessor.java:44)
at com.ebw.ejb.mdb.MQManager.onMessage(MQManager.java:70)
at weblogic.ejb20.internal.MDListener.execute(MDListener.java:370)
at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:262)
at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2678)
at weblogic.jms.client.JMSSession.execute(JMSSession.java:2598)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
--------------- nested within: ------------------
weblogic.transaction.RollbackException: Unknown reason - with nested exception:
[weblogic.transaction.internal.AppSetRollbackOnlyException]
at weblogic.transaction.internal.TransactionImpl.throwRollbackException(TransactionImpl.java:1683)
at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:325)
at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:246)
at weblogic.transaction.internal.TransactionManagerImpl.commit(TransactionManagerImpl.java:303)
at weblogic.transaction.internal.TransactionManagerImpl.commit(TransactionManagerImpl.java:296)
at com.ebw.nova.common.invoker.JTATransactionalAction.commit(JTATransactionalAction.java:31)
at com.ebw.nova.common.invoker.TransactionalAction.doAction(TransactionalAction.java:47)
at com.ebw.nova.common.invoker.ActionInvoker.invokeAction(ActionInvoker.java:21)
at com.ebw.nova.server.handler.AbstractRequestHandler.process(AbstractRequestHandler.java:73)
at com.ebw.nova.server.communication.jms.MessageProcessor.processRequest(MessageProcessor.java:44)
at com.ebw.ejb.mdb.MQManager.onMessage(MQManager.java:70)
at weblogic.ejb20.internal.MDListener.execute(MDListener.java:370)
at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:262)
at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2678)
at weblogic.jms.client.JMSSession.execute(JMSSession.java:2598)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
getNested(): weblogic.transaction.internal.AppSetRollbackOnlyException
at weblogic.transaction.internal.TransactionImpl.setRollbackOnly(TransactionImpl.java:504)
at org.hibernate.transaction.CacheSynchronization.setRollbackOnly(CacheSynchronization.java:73)
at org.hibernate.transaction.CacheSynchronization.beforeCompletion(CacheSynchronization.java:63)
at weblogic.transaction.internal.ServerSCInfo.callBeforeCompletions(ServerSCInfo.java:1010)
at weblogic.transaction.internal.ServerSCInfo.startPrePrepareAndChain(ServerSCInfo.java:115)
at weblogic.transaction.internal.ServerTransactionImpl.localPrePrepareAndChain(ServerTransactionImpl.java:1216)
at weblogic.transaction.internal.ServerTransactionImpl.globalPrePrepare(ServerTransactionImpl.java:1990)
at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:275)
at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:246)
at weblogic.transaction.internal.TransactionManagerImpl.commit(TransactionManagerImpl.java:303)
at weblogic.transaction.internal.TransactionManagerImpl.commit(TransactionManagerImpl.java:296)
at com.ebw.nova.common.invoker.JTATransactionalAction.commit(JTATransactionalAction.java:31)
at com.ebw.nova.common.invoker.TransactionalAction.doAction(TransactionalAction.java:47)
at com.ebw.nova.common.invoker.ActionInvoker.invokeAction(ActionInvoker.java:21)
at com.ebw.nova.server.handler.AbstractRequestHandler.process(AbstractRequestHandler.java:73)
at com.ebw.nova.server.communication.jms.MessageProcessor.processRequest(MessageProcessor.java:44)
at com.ebw.ejb.mdb.MQManager.onMessage(MQManager.java:70)
at weblogic.ejb20.internal.MDListener.execute(MDListener.java:370)
at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:262)
at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2678)
at weblogic.jms.client.JMSSession.execute(JMSSession.java:2598)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
Following is the hibernate.cfg.xml
<session-factory>
<!-- properties -->
<property name="connection.datasource">jdbc/novaJDBCDataSource</property>
<property name="transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>
<property name="transaction.manager_lookup_class">org.hibernate.transaction.WeblogicTransactionManagerLookup</property>
<property name="dialect">org.hibernate.dialect.OracleDialect</property>
<property name="current_session_context_class">jta</property>
<property name="show_sql">false</property>
<property name="format_sql">true</property>
<property name="hibernate.default_schema">novatxn</property>
<property name="jdbc.batch_size">30</property>
<!-- jdbc.batch_versioned_data is set to false, making it true hibernate doesn't raise optimistic exception. -->
<property name="jdbc.batch_versioned_data">false</property>
<property name="jdbc.use_streams_for_binary">true</property>
<!-- Outer join fetching is used in MultiDArray-->
<property name="max_fetch_depth">1</property>
<property name="query.substitutions">true 1, false 0, yes 'Y', no 'N'</property>
<!--property name="cache.provider_class">org.hibernate.cache.EhCacheProvider</property-->
<!--#Using the Hibernate 2.1 query parser, because of Weblogic 8.1 ANTLR issue.-->
<property name="query.factory_class">org.hibernate.hql.classic.ClassicQueryTranslatorFactory</property>
</session-factory>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 3 months
[Hibernate-JIRA] Created: (HHH-3900) Do not attempt to register Synchronization when Transaction is in STATUS_MARKED_ROLLBACK
by Chris Bredesen (JIRA)
Do not attempt to register Synchronization when Transaction is in STATUS_MARKED_ROLLBACK
----------------------------------------------------------------------------------------
Key: HHH-3900
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3900
Project: Hibernate Core
Issue Type: Bug
Affects Versions: 3.3.1, 3.2.6
Reporter: Chris Bredesen
Priority: Minor
In JTASessionContext.currentSession(), a CleanupSync is built and registered. The transaction is verified to be in progress using JTAHelper.isInProgress() which checks for STATUS_ACTIVE or STATUS_MARKED_ROLLBACK. JBossTS (based on the OTS standard) disallows the registration of Synchronizations in STATUS_MARKED_ROLLBACK and so in such cases, JTASessionContext.currentSession() will fail. The stack trace looks something like this (note no wrapped root cause):
Caused by: org.hibernate.HibernateException: Unable to register cleanup Synchronization with TransactionManager
at org.hibernate.context.JTASessionContext.currentSession(JTASessionContext.java:92)
at org.hibernate.impl.SessionFactoryImpl.getCurrentSession(SessionFactoryImpl.java:544)
A possible fix is to check only for STATUS_ACTIVE and do any needed cleanup work proactively if the Transaction is in STATUS_MARKED_ROLLBACK rather than relying on CleanupSync.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 3 months