Joined: Tue Nov 08, 2005 1:25 pm Posts: 2
|
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
I am using weblogic 7.0.5 in clustered environment. When i am executing the transaction I am getting the following error. Do in need to do any setting on weblogic side. It works fine in non-clustered environment.
Hibernate version:hibernate 3
Mapping documents/configuration:<?xml version='1.0' encoding='utf-8'?> <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"> <hibernate-configuration> <session-factory name="hibernate_SessionFactory"> <property name="connection.datasource">weblogic.jdbc.jts.TestLogPool</property> <property name="show_sql">true</property> <property name="dialect">org.hibernate.dialect.Oracle9Dialect</property> <property name="transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property> <property name="transaction.manager_lookup_class">org.hibernate.transaction.WeblogicTransactionManagerLookup</property>
<!-- <property name="query.factory_class">org.hibernate.hql.classic.ClassicQueryTranslatorFactory</property> --> <!-- Mapping files --> <mapping resource="EventHeader.hbm.xml"/> <mapping resource="EventDetail.hbm.xml"/> </session-factory> </hibernate-configuration>
Code between sessionFactory.openSession() and session.close(): try { Session session = HibernateUtil.currentSession(); Transaction tx = session.beginTransaction(); for(int i=0;i<al.size();i++){ session.save(al.get(i)); } tx.commit();
} catch (Exception he){ he.printStackTrace(); throw new RemoteException(); } finally { try{ HibernateUtil.closeSession(); }catch (Exception he){ he.printStackTrace(); throw new RemoteException(); }
} }
Full stack trace of any exception that occurs:<Nov 8, 2005 9:13:58 AM PST> <Error> <Cluster> <000123> <Conflict start: You tried to bind an object under the name hibernate_SessionFactory in the JNDI tree. The object you have bound from 10.121.140.111 is non clusterable and you have tried to bind more than once from two or more servers. Such objects can only deployed from one server.>
Name and version of the database you are using:oracle 9i RAC
The generated SQL (show_sql=true):Hibernate: select EVENT_LOG_HEADER_TBL_SEQ.nextval from dual Hibernate: select EVENT_LOG_DETAIL_TBL_SEQ.nextval from dual Hibernate: select EVENT_LOG_DETAIL_TBL_SEQ.nextval from dual Hibernate: select EVENT_LOG_DETAIL_TBL_SEQ.nextval from dual Hibernate: select EVENT_LOG_DETAIL_TBL_SEQ.nextval from dual Hibernate: select EVENT_LOG_DETAIL_TBL_SEQ.nextval from dual Hibernate: select EVENT_LOG_DETAIL_TBL_SEQ.nextval from dual Hibernate: select EVENT_LOG_DETAIL_TBL_SEQ.nextval from dual Hibernate: select EVENT_LOG_DETAIL_TBL_SEQ.nextval from dual Hibernate: insert into EVENT_LOG_HEADER (EVENT_KEY, SESSION_ID, USER_ID, USER_TYPE_CODE, EVENT_LOG_HEADER_KEY) values (?, ?, ?, ?, ?) Hibernate: insert into EVENT_LOG_DETAIL (CHARACTARISTIC_NAME, CHARACTARISTIC_VALUE_TEXT, EVENT_LOG_HEADER_KEY, EVENT_LOG_DETAIL_KEY) values (?, ?, ?, ?) Hibernate: insert into EVENT_LOG_DETAIL (CHARACTARISTIC_NAME, CHARACTARISTIC_VALUE_TEXT, EVENT_LOG_HEADER_KEY, EVENT_LOG_DETAIL_KEY) values (?, ?, ?, ?) Hibernate: insert into EVENT_LOG_DETAIL (CHARACTARISTIC_NAME, CHARACTARISTIC_VALUE_TEXT, EVENT_LOG_HEADER_KEY, EVENT_LOG_DETAIL_KEY) values (?, ?, ?, ?) Hibernate: insert into EVENT_LOG_DETAIL (CHARACTARISTIC_NAME, CHARACTARISTIC_VALUE_TEXT, EVENT_LOG_HEADER_KEY, EVENT_LOG_DETAIL_KEY) values (?, ?, ?, ?) Hibernate: insert into EVENT_LOG_DETAIL (CHARACTARISTIC_NAME, CHARACTARISTIC_VALUE_TEXT, EVENT_LOG_HEADER_KEY, EVENT_LOG_DETAIL_KEY) values (?, ?, ?, ?) Hibernate: insert into EVENT_LOG_DETAIL (CHARACTARISTIC_NAME, CHARACTARISTIC_VALUE_TEXT, EVENT_LOG_HEADER_KEY, EVENT_LOG_DETAIL_KEY) values (?, ?, ?, ?) Hibernate: insert into EVENT_LOG_DETAIL (CHARACTARISTIC_NAME, CHARACTARISTIC_VALUE_TEXT, EVENT_LOG_HEADER_KEY, EVENT_LOG_DETAIL_KEY) values (?, ?, ?, ?) Hibernate: insert into EVENT_LOG_DETAIL (CHARACTARISTIC_NAME, CHARACTARISTIC_VALUE_TEXT, EVENT_LOG_HEADER_KEY, EVENT_LOG_DETAIL_KEY) values (?, ?, ?, ?)
Debug level Hibernate log excerpt:
|
|