Hibernate version:3.2.4.sp1
Full stack trace of any exception that occurs:
org.hibernate.TransactionException: Could not register synchronization for container transaction
at org.hibernate.transaction.CMTTransaction.begin(CMTTransaction.java:45)
at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1326)
Name and version of the database you are using: oracle 10
The generated SQL (show_sql=true):
Debug level Hibernate log excerpt: debug
i will apreciate help, i am search in google but i don't find many.
hello, i am run with hibernate good, i haved the transction manager manually and run ok, but now i am tryting of change to EJB/CMT, mi service run before whithout EJB/CMT, i make this to use EJB/CMT
delete the commit and rollback, also the session.begintransaction() and the session.close, y would like that the oc4j make this for me
this is my EJB
Code:
package facade.bean;
import javax.ejb.Stateless;
import javax.ejb.TransactionAttribute;
import javax.ejb.TransactionAttributeType;
import javax.ejb.TransactionManagement;
import javax.ejb.TransactionManagementType;
@Stateless (name = IAdministrativeFacade.JNDI_NAME )
public class AdministrativeBean implements IAdministrativeFacade{
@TransactionAttribute(TransactionAttributeType.REQUIRED)
public ClientVO registrarTransactionConfig(ClientVO clientVO) throws TxServiceException{
transactionService.registrateOrUpdateTransactionConfig(clientVO);
}
}
and this is my Transactionserviceimpl
Code:
public class TransactionServiceImpl implements ITransactionService{
public Object registrateOrUpdateTransactionConfig(ClientVO clientVO) throws TXLogicException {
try
{
session=HibernateUtil.currentSession();
// tr=session.beginTransaction();
//processss
//tr.commit()
}
catch(Exception e)
{
e.printStackTrace();
// tr.rollback();
}
finally
{
if(session!=null)
{
session.close();
}
}
}
}
and fynally this is the hibernate.cfg.xml
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="hibernate.connection.datasource">jdbc/CoreTXDS2</property>
<property name="hibernate.dialect">org.hibernate.dialect.OracleDialect</property>
<property name="hibernate.show_sql">true</property>
<property name="hibernate.max_fetch_depth">1</property>
<property name="hibernate.query.factory_class">org.hibernate.hql.classic.ClassicQueryTranslatorFactory</property>
<property name="hibernate.transaction.factory_class">org.hibernate.transaction.CMTTransactionFactory</property>
<property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.OC4JTransactionManagerLookup</property>
<property name="hibernate.current_session_context_class">thread</property>
<property name="hibernate.autocommit">true</property>
<property name="hibernate.connection.autocommit">true</property>
</session-factory>
</hibernate-configuration>
many thaks, if some where find documentation please tell me.