-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Timeout when storing Collections on WebSphere
PostPosted: Wed Jun 21, 2006 5:15 am 
Newbie

Joined: Wed Jun 21, 2006 4:48 am
Posts: 1
Hi,

we get a database timeout when storing an object containing a collection (ArrayList) on Websphere 5.1 with DB2 8.1 and Hibernate 3.0.1 using CMT. This is fairly simple test code without concurrency. It runs without problems on JBoss.

Hibernate does an insert on the object first and gets the timeout when trying to insert into the collection table.

It looks like it is using different transactions for each operation.

Any ideas would be appreciated.

Thanks in advance
Carsten

---------------Config--------------------------------------------

<?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.session_factory_name">hibernate/UBISessionFactory</property>
<property name="hibernate.connection.datasource">UBI-DS</property>
<property name="hibernate.transaction.factory_class">
org.hibernate.transaction.JTATransactionFactory
</property>
<property name="hibernate.current_session_context_class">
org.hibernate.context.JTASessionContext
</property>

<property name="hibernate.transaction.manager_lookup_class">
org.hibernate.transaction.WebSphereTransactionManagerLookup
</property>

<property name="hibernate.show_sql">true</property>
<property name="hibernate.dialect">org.hibernate.dialect.DB2Dialect</property>
</session-factory>
</hibernate-configuration>

------------- Mapping---------------------------------------------------

<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

<hibernate-mapping >
<class name="de.bwb.ubi.hibernate.material.MitarbeiterHib" table="MitarbeiterHib" lazy="false">
<id name="id">
<generator class="hilo">
<param name="max_lo">100</param>
</generator>
</id>

<property name="vorname" type="string" length="50"/>
<property name="nachname" type="string" length="50"/>

<bag name="taetigkeiten"
table="Mitarbeiter_TaetigkeitenHib"
lazy="false">
<key column="id"/>
<composite-element class="de.bwb.ubi.hibernate.material.TaetigkeitDV">
<property name="value" column="taetigkeiten" type="integer"/>
</composite-element>
</bag>

<property name="gueltigVon" type="date"/>
<property name="gueltigBis" type="date"/>
</class>
</hibernate-mapping>

----------------------Code---------------------------------------------

Configuration config = new Configuration().configure().addClass(MitarbeiterHib.class);

SessionFactory sf = config.buildSessionFactory();

Session session = sf.openSession();

TaetigkeitDVHib[] taetigkeiten = new TaetigkeitDVHib[] {"Something", "Something else"};
MitarbeiterHib ma = new MitarbeiterHib("Tony", "Tiger", taetigkeiten, new Date(), new Date() );

session.save(ma);
session.flush();
session.close();

-------------------Log---------------------------------------------------

Hibernate: insert into K2E.MitarbeiterHib (vorname, nachname, gueltigVon, gueltigBis, id) values (?, ?, ?, ?, ?)
Hibernate: insert into K2E.Mitarbeiter_TaetigkeitenHib (id, taetigkeiten) values (?, ?)

[21.06.06 10:22:29:665 CEST] 3ada0a5f JDBCException W org.hibernate.util.JDBCExceptionReporter SQL Error: -911, SQLStat
e: 40001

[21.06.06 10:22:29:672 CEST] 3ada0a5f JDBCException E org.hibernate.util.JDBCExceptionReporter Die aktuelle Transaktion
wurde r³ckgõngig gemacht. Ursache: Gegenseitiges Sperren oder Zeit³berschreitung. Ursachencode: "68".

[21.06.06 10:22:29:677 CEST] 3ada0a5f AbstractFlush E org.hibernate.event.def.AbstractFlushingEventListener Could not s
ynchronize database state with session

[21.06.06 10:22:29:682 CEST] 3ada0a5f AbstractFlush E org.hibernate.event.def.AbstractFlushingEventListener TRAS0014I:
Die folgende Ausnahmebedingung wurde protokolliert: org.hibernate.exception.GenericJDBCException: could not insert colle
ction: [de.bwb.ubi.dispores.mitarbeiter.material.MitarbeiterHib.taetigkeiten#2222]
at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:91)
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:79)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.persister.collection.AbstractCollectionPersister.recreate(AbstractCollectionPersister.java:1058


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.