-->
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.  [ 7 posts ] 
Author Message
 Post subject: Hibernate Hangs
PostPosted: Tue Feb 22, 2005 6:08 pm 
Beginner
Beginner

Joined: Wed Jul 21, 2004 8:12 pm
Posts: 35
Hibernate version: 2.1.8

Name and version of the database you are using: DB2 8.1

Application server: Websphere 5.1.1


I was wondering if anyone else has faced the same problem. When I run my test cases individually they all work, however; when I run them all as test suit, the application server hangs [ a couple of testcases are run, I can see the sqls generated but it hangs somewhere in between].

We just finished a project using hibernate and our performance testing seem to cause the same problem. when we simiulate 20 users to hit a page repeatedly, the threads hang till they time out.

I have just started another new project and it seems I am having the same problems with my testcases. I am using websphere datasource and Websphere transaction management lookup.

Is it something that I am missing? has anyone faced the same problem?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 22, 2005 6:23 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
Hibernate goes to alot of trouble to enhance performance by limiting exposure to concurrency problems - it is very unlikely its anything to hibernate itself. I would suggest your code has a tread deadlock situation going on in the support code somewhere. You can send a kill signal to make Java dump a stack trace so you can get an idea of where the deadlock is occuring.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 22, 2005 6:30 pm 
Beginner
Beginner

Joined: Wed Jul 21, 2004 8:12 pm
Posts: 35
The problem occures even if I use one thread. Here is what I get when I run all my testcases on Rational Application Developer (former WSAD):

The last line confirms that there is only one thread.

[2/22/05 16:58:14:177 EST] 60c0d0c2 Environment I net.sf.hibernate.cfg.Environment Hibernate 2.1.8
[2/22/05 16:58:14:187 EST] 60c0d0c2 Environment I net.sf.hibernate.cfg.Environment hibernate.properties not found
[2/22/05 16:58:14:207 EST] 60c0d0c2 Environment I net.sf.hibernate.cfg.Environment using CGLIB reflection optimizer
[2/22/05 16:58:14:217 EST] 60c0d0c2 Environment I net.sf.hibernate.cfg.Environment using JDK 1.4 java.sql.Timestamp handling
[2/22/05 16:58:14:247 EST] 60c0d0c2 Configuration I net.sf.hibernate.cfg.Configuration configuring from resource: /hibernate.cfg.xml
[2/22/05 16:58:14:247 EST] 60c0d0c2 Configuration I net.sf.hibernate.cfg.Configuration Configuration resource: /hibernate.cfg.xml
[2/22/05 16:58:14:708 EST] 60c0d0c2 Configuration I net.sf.hibernate.cfg.Configuration Mapping resource: iadm/readme/model/Category.hbm.xml
[2/22/05 16:58:15:118 EST] 60c0d0c2 Binder I net.sf.hibernate.cfg.Binder Mapping class: iadm.readme.model.Category -> README.CATEGORY
[2/22/05 16:58:15:799 EST] 60c0d0c2 Configuration I net.sf.hibernate.cfg.Configuration Mapping resource: iadm/readme/model/Platform.hbm.xml
[2/22/05 16:58:15:969 EST] 60c0d0c2 Binder I net.sf.hibernate.cfg.Binder Mapping class: iadm.readme.model.Platform -> README.PLATFORM
[2/22/05 16:58:15:969 EST] 60c0d0c2 Configuration I net.sf.hibernate.cfg.Configuration Mapping resource: iadm/readme/model/Product.hbm.xml
[2/22/05 16:58:16:050 EST] 60c0d0c2 Binder I net.sf.hibernate.cfg.Binder Mapping class: iadm.readme.model.Product -> README.PRODUCT
[2/22/05 16:58:16:050 EST] 60c0d0c2 Configuration I net.sf.hibernate.cfg.Configuration Mapping resource: iadm/readme/model/Release.hbm.xml
[2/22/05 16:58:16:080 EST] 60c0d0c2 Binder I net.sf.hibernate.cfg.Binder Mapping class: iadm.readme.model.Release -> README.RELEASE
[2/22/05 16:58:16:100 EST] 60c0d0c2 Binder I net.sf.hibernate.cfg.Binder Mapping collection: iadm.readme.model.Release.platforms -> README.RELEASE_PLATFORM
[2/22/05 16:58:16:100 EST] 60c0d0c2 Binder I net.sf.hibernate.cfg.Binder Mapping collection: iadm.readme.model.Release.products -> README.RELEASE_PRODUCT
[2/22/05 16:58:16:100 EST] 60c0d0c2 Configuration I net.sf.hibernate.cfg.Configuration Configured SessionFactory: null
[2/22/05 16:58:16:100 EST] 60c0d0c2 Configuration I net.sf.hibernate.cfg.Configuration processing one-to-many association mappings
[2/22/05 16:58:16:120 EST] 60c0d0c2 Binder I net.sf.hibernate.cfg.Binder Mapping collection: iadm.readme.model.Category.childCategories -> README.CATEGORY
[2/22/05 16:58:16:120 EST] 60c0d0c2 Binder I net.sf.hibernate.cfg.Binder Mapping collection: iadm.readme.model.Category.releases -> README.RELEASE
[2/22/05 16:58:16:130 EST] 60c0d0c2 Configuration I net.sf.hibernate.cfg.Configuration processing one-to-one association property references
[2/22/05 16:58:16:130 EST] 60c0d0c2 Configuration I net.sf.hibernate.cfg.Configuration processing foreign key constraints
[2/22/05 16:58:16:260 EST] 60c0d0c2 Dialect I net.sf.hibernate.dialect.Dialect Using dialect: net.sf.hibernate.dialect.DB2Dialect
[2/22/05 16:58:16:310 EST] 60c0d0c2 SettingsFacto I net.sf.hibernate.cfg.SettingsFactory Use outer join fetching: true
[2/22/05 16:58:16:340 EST] 60c0d0c2 NamingHelper I net.sf.hibernate.util.NamingHelper JNDI InitialContext properties:{java.naming.provider.url=iiop:///, java.naming.factory.initial=com.ibm.websphere.naming.WsnInitialContextFactory}
[2/22/05 16:58:17:502 EST] 60c0d0c2 DatasourceCon I net.sf.hibernate.connection.DatasourceConnectionProvider Using datasource: jdbc/readme
[2/22/05 16:58:17:542 EST] 60c0d0c2 TransactionMa I net.sf.hibernate.transaction.TransactionManagerLookupFactory instantiating TransactionManagerLookup: net.sf.hibernate.transaction.WebSphereTransactionManagerLookup
[2/22/05 16:58:17:562 EST] 60c0d0c2 TransactionMa I net.sf.hibernate.transaction.TransactionManagerLookupFactory instantiated TransactionManagerLookup
[2/22/05 17:00:23:513 EST] 60c0d0c2 WSRdbDataSour I DSRA8203I: Database product name : DB2/NT
[2/22/05 17:00:23:773 EST] 60c0d0c2 WSRdbDataSour I DSRA8204I: Database product version : 08.02.0000
[2/22/05 17:00:23:773 EST] 60c0d0c2 WSRdbDataSour I DSRA8205I: JDBC driver name : IBM DB2 JDBC 2.0 Type 2
[2/22/05 17:00:23:783 EST] 60c0d0c2 WSRdbDataSour I DSRA8206I: JDBC driver version : 08.02.0000
[2/22/05 17:00:24:044 EST] 60c0d0c2 SettingsFacto I net.sf.hibernate.cfg.SettingsFactory Use scrollable result sets: true
[2/22/05 17:00:24:044 EST] 60c0d0c2 SettingsFacto I net.sf.hibernate.cfg.SettingsFactory Use JDBC3 getGeneratedKeys(): false
[2/22/05 17:00:24:044 EST] 60c0d0c2 SettingsFacto I net.sf.hibernate.cfg.SettingsFactory Optimize cache for minimal puts: false
[2/22/05 17:00:24:054 EST] 60c0d0c2 SettingsFacto I net.sf.hibernate.cfg.SettingsFactory echoing all SQL to stdout
[2/22/05 17:00:24:054 EST] 60c0d0c2 SettingsFacto I net.sf.hibernate.cfg.SettingsFactory Query language substitutions: {}
[2/22/05 17:00:24:054 EST] 60c0d0c2 SettingsFacto I net.sf.hibernate.cfg.SettingsFactory cache provider: net.sf.hibernate.cache.EhCacheProvider
[2/22/05 17:00:24:514 EST] 60c0d0c2 Configuration I net.sf.hibernate.cfg.Configuration instantiating and configuring caches
[2/22/05 17:00:24:674 EST] 60c0d0c2 Configurator W net.sf.ehcache.config.Configurator No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: wsjar:file:/D:/projects/readme/readme/WebContent/WEB-INF/lib/ehcache-0.9.jar!/ehcache-failsafe.xml
[2/22/05 17:00:25:676 EST] 60c0d0c2 SessionFactor I net.sf.hibernate.impl.SessionFactoryImpl building session factory
[2/22/05 17:00:28:640 EST] 60c0d0c2 SessionFactor I net.sf.hibernate.impl.SessionFactoryObjectFactory Not binding factory to JNDI, no JNDI name configured
[2/22/05 17:00:28:650 EST] 60c0d0c2 WebSphereTran I net.sf.hibernate.transaction.WebSphereTransactionManagerLookup WebSphere 5.1
[2/22/05 17:00:28:860 EST] 60c0d0c2 SharedPool I J2CA0086W: Shareable connection MCWrapper id 201e10ca Managed connection com.ibm.ws.rsadapter.spi.WSRdbManagedConnectionImpl@50b150cb State:STATE_TRAN_WRAPPER_INUSE
from resource jdbc/readme was used within a local transaction containment boundary.
[2/22/05 17:00:30:413 EST] 60c0d0c2 SystemOut O Hibernate: select platform0_.PLATFORM_ID as PLATFORM1_0_, platform0_.PLATFORM_NAME as PLATFORM2_0_ from README.PLATFORM platform0_ where platform0_.PLATFORM_ID=?
[2/22/05 17:00:34:088 EST] 60c0d0c2 SystemOut O Hibernate: select platform0_.PLATFORM_ID as PLATFORM1_0_, platform0_.PLATFORM_NAME as PLATFORM2_0_ from README.PLATFORM platform0_ where platform0_.PLATFORM_ID=?
[2/22/05 17:00:34:088 EST] 60c0d0c2 SystemOut O Hibernate: select platform0_.PLATFORM_ID as PLATFORM1_0_, platform0_.PLATFORM_NAME as PLATFORM2_0_ from README.PLATFORM platform0_ where platform0_.PLATFORM_ID=?
[2/22/05 17:00:34:629 EST] 60c0d0c2 SystemOut O Hibernate: select this.PLATFORM_ID as PLATFORM1_0_, this.PLATFORM_NAME as PLATFORM2_0_ from README.PLATFORM this where this.PLATFORM_NAME=?
[2/22/05 17:00:34:879 EST] 60c0d0c2 SystemOut O Hibernate: select this.PLATFORM_ID as PLATFORM1_0_, this.PLATFORM_NAME as PLATFORM2_0_ from README.PLATFORM this where this.PLATFORM_NAME=?
[2/22/05 17:00:34:889 EST] 60c0d0c2 SystemOut O Hibernate: select this.PLATFORM_ID as PLATFORM1_0_, this.PLATFORM_NAME as PLATFORM2_0_ from README.PLATFORM this where this.PLATFORM_NAME=?
[2/22/05 17:00:35:190 EST] 60c0d0c2 SystemOut O Hibernate: select this.PLATFORM_ID as PLATFORM1_0_, this.PLATFORM_NAME as PLATFORM2_0_ from README.PLATFORM this where 1=1
[2/22/05 17:00:35:480 EST] 60c0d0c2 SystemOut O Hibernate: select this.PLATFORM_ID as PLATFORM1_0_, this.PLATFORM_NAME as PLATFORM2_0_ from README.PLATFORM this where this.PLATFORM_NAME in (?, ?, ?)
[2/22/05 17:00:35:580 EST] 60c0d0c2 SystemOut O Hibernate: select this.PLATFORM_ID as PLATFORM1_0_, this.PLATFORM_NAME as PLATFORM2_0_ from README.PLATFORM this where this.PLATFORM_NAME in (?, ?, ?)
[2/22/05 17:00:36:211 EST] 60c0d0c2 SystemOut O Hibernate: select this.PLATFORM_ID as PLATFORM1_0_, this.PLATFORM_NAME as PLATFORM2_0_ from README.PLATFORM this where this.PLATFORM_ID in (?, ?, ?)
[2/22/05 17:00:36:471 EST] 60c0d0c2 SystemOut O Hibernate: select this.PLATFORM_ID as PLATFORM1_0_, this.PLATFORM_NAME as PLATFORM2_0_ from README.PLATFORM this where this.PLATFORM_ID in (?, ?, ?)
[2/22/05 17:00:37:243 EST] 60c0d0c2 SystemOut O Hibernate: select release0_.RELEASE_ID as RELEASE_ID3_, release0_.AUTHOR as AUTHOR3_, release0_.TITLE as TITLE3_, release0_.COMMENT as COMMENT3_, release0_.EXCLUDE_FLAG as EXCLUDE_5_3_, release0_.CREATED_TIMESTAMP as CREATED_6_3_, release0_.CATEGORY_ID as CATEGORY7_3_, category1_.CATEGORY_ID as CATEGORY1_0_, category1_.CATEGORY_NAME as CATEGORY2_0_, category1_.CREATED_TIMESTAMP as CREATED_3_0_, category1_.VISIBLE as VISIBLE0_, category1_.PARENT_CATEGORY_ID as PARENT_C5_0_, category2_.CATEGORY_ID as CATEGORY1_1_, category2_.CATEGORY_NAME as CATEGORY2_1_, category2_.CREATED_TIMESTAMP as CREATED_3_1_, category2_.VISIBLE as VISIBLE1_, category2_.PARENT_CATEGORY_ID as PARENT_C5_1_, childcateg3_.PARENT_CATEGORY_ID as PARENT_C5___, childcateg3_.CATEGORY_ID as CATEGORY1___, childcateg3_.CATEGORY_ID as CATEGORY1_2_, childcateg3_.CATEGORY_NAME as CATEGORY2_2_, childcateg3_.CREATED_TIMESTAMP as CREATED_3_2_, childcateg3_.VISIBLE as VISIBLE2_, childcateg3_.PARENT_CATEGORY_ID as PARENT_C5_2_ from README.RELEASE release0_ left outer join README.CATEGORY category1_ on release0_.CATEGORY_ID=category1_.CATEGORY_ID left outer join README.CATEGORY category2_ on category1_.PARENT_CATEGORY_ID=category2_.CATEGORY_ID left outer join README.CATEGORY childcateg3_ on category2_.CATEGORY_ID=childcateg3_.PARENT_CATEGORY_ID where release0_.RELEASE_ID=?
[2/22/05 17:00:39:636 EST] 60c0d0c2 SystemOut O Hibernate: select childcateg0_.PARENT_CATEGORY_ID as PARENT_C5___, childcateg0_.CATEGORY_ID as CATEGORY1___, childcateg0_.CATEGORY_ID as CATEGORY1_0_, childcateg0_.CATEGORY_NAME as CATEGORY2_0_, childcateg0_.CREATED_TIMESTAMP as CREATED_3_0_, childcateg0_.VISIBLE as VISIBLE0_, childcateg0_.PARENT_CATEGORY_ID as PARENT_C5_0_ from README.CATEGORY childcateg0_ where childcateg0_.PARENT_CATEGORY_ID=?
[2/22/05 17:00:39:646 EST] 60c0d0c2 SystemOut O Hibernate: select childcateg0_.PARENT_CATEGORY_ID as PARENT_C5___, childcateg0_.CATEGORY_ID as CATEGORY1___, childcateg0_.CATEGORY_ID as CATEGORY1_0_, childcateg0_.CATEGORY_NAME as CATEGORY2_0_, childcateg0_.CREATED_TIMESTAMP as CREATED_3_0_, childcateg0_.VISIBLE as VISIBLE0_, childcateg0_.PARENT_CATEGORY_ID as PARENT_C5_0_ from README.CATEGORY childcateg0_ where childcateg0_.PARENT_CATEGORY_ID=?
[2/22/05 17:00:39:646 EST] 60c0d0c2 SystemOut O Hibernate: select platforms0_.RELEASE_ID as RELEASE_ID__, platforms0_.PLATFORM_ID as PLATFORM2___ from README.RELEASE_PLATFORM platforms0_ where platforms0_.RELEASE_ID=?
[2/22/05 17:00:39:646 EST] 60c0d0c2 SystemOut O Hibernate: select platform0_.PLATFORM_ID as PLATFORM1_0_, platform0_.PLATFORM_NAME as PLATFORM2_0_ from README.PLATFORM platform0_ where platform0_.PLATFORM_ID=?
[2/22/05 17:00:39:676 EST] 60c0d0c2 SystemOut O Hibernate: select platform0_.PLATFORM_ID as PLATFORM1_0_, platform0_.PLATFORM_NAME as PLATFORM2_0_ from README.PLATFORM platform0_ where platform0_.PLATFORM_ID=?
[2/22/05 17:00:39:676 EST] 60c0d0c2 SystemOut O Hibernate: select products0_.RELEASE_ID as RELEASE_ID__, products0_.PRODUCT_ID as PRODUCT_ID__ from README.RELEASE_PRODUCT products0_ where products0_.RELEASE_ID=?
[2/22/05 17:00:39:686 EST] 60c0d0c2 SystemOut O Hibernate: select release0_.RELEASE_ID as RELEASE_ID3_, release0_.AUTHOR as AUTHOR3_, release0_.TITLE as TITLE3_, release0_.COMMENT as COMMENT3_, release0_.EXCLUDE_FLAG as EXCLUDE_5_3_, release0_.CREATED_TIMESTAMP as CREATED_6_3_, release0_.CATEGORY_ID as CATEGORY7_3_, category1_.CATEGORY_ID as CATEGORY1_0_, category1_.CATEGORY_NAME as CATEGORY2_0_, category1_.CREATED_TIMESTAMP as CREATED_3_0_, category1_.VISIBLE as VISIBLE0_, category1_.PARENT_CATEGORY_ID as PARENT_C5_0_, category2_.CATEGORY_ID as CATEGORY1_1_, category2_.CATEGORY_NAME as CATEGORY2_1_, category2_.CREATED_TIMESTAMP as CREATED_3_1_, category2_.VISIBLE as VISIBLE1_, category2_.PARENT_CATEGORY_ID as PARENT_C5_1_, childcateg3_.PARENT_CATEGORY_ID as PARENT_C5___, childcateg3_.CATEGORY_ID as CATEGORY1___, childcateg3_.CATEGORY_ID as CATEGORY1_2_, childcateg3_.CATEGORY_NAME as CATEGORY2_2_, childcateg3_.CREATED_TIMESTAMP as CREATED_3_2_, childcateg3_.VISIBLE as VISIBLE2_, childcateg3_.PARENT_CATEGORY_ID as PARENT_C5_2_ from README.RELEASE release0_ left outer join README.CATEGORY category1_ on release0_.CATEGORY_ID=category1_.CATEGORY_ID left outer join README.CATEGORY category2_ on category1_.PARENT_CATEGORY_ID=category2_.CATEGORY_ID left outer join README.CATEGORY childcateg3_ on category2_.CATEGORY_ID=childcateg3_.PARENT_CATEGORY_ID where release0_.RELEASE_ID=?
[2/22/05 17:00:39:686 EST] 60c0d0c2 SystemOut O Hibernate: select platforms0_.RELEASE_ID as RELEASE_ID__, platforms0_.PLATFORM_ID as PLATFORM2___ from README.RELEASE_PLATFORM platforms0_ where platforms0_.RELEASE_ID=?
[2/22/05 17:00:39:686 EST] 60c0d0c2 SystemOut O Hibernate: select products0_.RELEASE_ID as RELEASE_ID__, products0_.PRODUCT_ID as PRODUCT_ID__ from README.RELEASE_PRODUCT products0_ where products0_.RELEASE_ID=?
[2/22/05 17:00:39:696 EST] 60c0d0c2 SystemOut O Hibernate: select release0_.RELEASE_ID as RELEASE_ID3_, release0_.AUTHOR as AUTHOR3_, release0_.TITLE as TITLE3_, release0_.COMMENT as COMMENT3_, release0_.EXCLUDE_FLAG as EXCLUDE_5_3_, release0_.CREATED_TIMESTAMP as CREATED_6_3_, release0_.CATEGORY_ID as CATEGORY7_3_, category1_.CATEGORY_ID as CATEGORY1_0_, category1_.CATEGORY_NAME as CATEGORY2_0_, category1_.CREATED_TIMESTAMP as CREATED_3_0_, category1_.VISIBLE as VISIBLE0_, category1_.PARENT_CATEGORY_ID as PARENT_C5_0_, category2_.CATEGORY_ID as CATEGORY1_1_, category2_.CATEGORY_NAME as CATEGORY2_1_, category2_.CREATED_TIMESTAMP as CREATED_3_1_, category2_.VISIBLE as VISIBLE1_, category2_.PARENT_CATEGORY_ID as PARENT_C5_1_, childcateg3_.PARENT_CATEGORY_ID as PARENT_C5___, childcateg3_.CATEGORY_ID as CATEGORY1___, childcateg3_.CATEGORY_ID as CATEGORY1_2_, childcateg3_.CATEGORY_NAME as CATEGORY2_2_, childcateg3_.CREATED_TIMESTAMP as CREATED_3_2_, childcateg3_.VISIBLE as VISIBLE2_, childcateg3_.PARENT_CATEGORY_ID as PARENT_C5_2_ from README.RELEASE release0_ left outer join README.CATEGORY category1_ on release0_.CATEGORY_ID=category1_.CATEGORY_ID left outer join README.CATEGORY category2_ on category1_.PARENT_CATEGORY_ID=category2_.CATEGORY_ID left outer join README.CATEGORY childcateg3_ on category2_.CATEGORY_ID=childcateg3_.PARENT_CATEGORY_ID where release0_.RELEASE_ID=?
[2/22/05 17:00:40:748 EST] 60c0d0c2 SystemOut O Hibernate: select release0_.RELEASE_ID as RELEASE_ID, release0_.AUTHOR as AUTHOR, release0_.TITLE as TITLE, release0_.COMMENT as COMMENT, release0_.EXCLUDE_FLAG as EXCLUDE_5_, release0_.CREATED_TIMESTAMP as CREATED_6_, release0_.CATEGORY_ID as CATEGORY7_ from README.RELEASE release0_ inner join README.RELEASE_PRODUCT products1_ on release0_.RELEASE_ID=products1_.RELEASE_ID inner join README.PRODUCT product2_ on products1_.PRODUCT_ID=product2_.PRODUCT_ID inner join README.RELEASE_PLATFORM platforms3_ on release0_.RELEASE_ID=platforms3_.RELEASE_ID inner join README.PLATFORM platform4_ on platforms3_.PLATFORM_ID=platform4_.PLATFORM_ID where (platform4_.PLATFORM_ID=? )and(product2_.PRODUCT_ID=? )and(release0_.CATEGORY_ID=? )and(release0_.EXCLUDE_FLAG=? )
[2/22/05 17:00:41:058 EST] 60c0d0c2 SystemOut O Hibernate: select category0_.CATEGORY_ID as CATEGORY1_2_, category0_.CATEGORY_NAME as CATEGORY2_2_, category0_.CREATED_TIMESTAMP as CREATED_3_2_, category0_.VISIBLE as VISIBLE2_, category0_.PARENT_CATEGORY_ID as PARENT_C5_2_, category1_.CATEGORY_ID as CATEGORY1_0_, category1_.CATEGORY_NAME as CATEGORY2_0_, category1_.CREATED_TIMESTAMP as CREATED_3_0_, category1_.VISIBLE as VISIBLE0_, category1_.PARENT_CATEGORY_ID as PARENT_C5_0_, childcateg2_.PARENT_CATEGORY_ID as PARENT_C5___, childcateg2_.CATEGORY_ID as CATEGORY1___, childcateg2_.CATEGORY_ID as CATEGORY1_1_, childcateg2_.CATEGORY_NAME as CATEGORY2_1_, childcateg2_.CREATED_TIMESTAMP as CREATED_3_1_, childcateg2_.VISIBLE as VISIBLE1_, childcateg2_.PARENT_CATEGORY_ID as PARENT_C5_1_ from README.CATEGORY category0_ left outer join README.CATEGORY category1_ on category0_.PARENT_CATEGORY_ID=category1_.CATEGORY_ID left outer join README.CATEGORY childcateg2_ on category1_.CATEGORY_ID=childcateg2_.PARENT_CATEGORY_ID where category0_.CATEGORY_ID=?
[2/22/05 17:00:41:228 EST] 60c0d0c2 SystemOut O Hibernate: select childcateg0_.PARENT_CATEGORY_ID as PARENT_C5___, childcateg0_.CATEGORY_ID as CATEGORY1___, childcateg0_.CATEGORY_ID as CATEGORY1_0_, childcateg0_.CATEGORY_NAME as CATEGORY2_0_, childcateg0_.CREATED_TIMESTAMP as CREATED_3_0_, childcateg0_.VISIBLE as VISIBLE0_, childcateg0_.PARENT_CATEGORY_ID as PARENT_C5_0_ from README.CATEGORY childcateg0_ where childcateg0_.PARENT_CATEGORY_ID=?
[2/22/05 17:00:41:238 EST] 60c0d0c2 SystemOut O Hibernate: select childcateg0_.PARENT_CATEGORY_ID as PARENT_C5___, childcateg0_.CATEGORY_ID as CATEGORY1___, childcateg0_.CATEGORY_ID as CATEGORY1_0_, childcateg0_.CATEGORY_NAME as CATEGORY2_0_, childcateg0_.CREATED_TIMESTAMP as CREATED_3_0_, childcateg0_.VISIBLE as VISIBLE0_, childcateg0_.PARENT_CATEGORY_ID as PARENT_C5_0_ from README.CATEGORY childcateg0_ where childcateg0_.PARENT_CATEGORY_ID=?
[2/22/05 17:00:41:409 EST] 60c0d0c2 SystemOut O Hibernate: select release0_.RELEASE_ID as RELEASE_ID, release0_.AUTHOR as AUTHOR, release0_.TITLE as TITLE, release0_.COMMENT as COMMENT, release0_.EXCLUDE_FLAG as EXCLUDE_5_, release0_.CREATED_TIMESTAMP as CREATED_6_, release0_.CATEGORY_ID as CATEGORY7_ from README.RELEASE release0_ inner join README.RELEASE_PRODUCT products1_ on release0_.RELEASE_ID=products1_.RELEASE_ID inner join README.PRODUCT product2_ on products1_.PRODUCT_ID=product2_.PRODUCT_ID inner join README.RELEASE_PLATFORM platforms3_ on release0_.RELEASE_ID=platforms3_.RELEASE_ID inner join README.PLATFORM platform4_ on platforms3_.PLATFORM_ID=platform4_.PLATFORM_ID where (platform4_.PLATFORM_ID=? )and(product2_.PRODUCT_ID=? )and(release0_.CATEGORY_ID=? )and(release0_.EXCLUDE_FLAG=? )

[2/22/05 17:09:43:859 EST] 65dfd0c2 ThreadMonitor W WSVR0605W: Thread "Servlet.Engine.Transports : 0" (60c0d0c2) has been active for 695,360 milliseconds and may be hung. There are 1 threads in total in the server that may be hung.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 22, 2005 6:44 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
I think its obvious that we cannot diagnose this issue with the information you have provided. I still expect the problem is in the support code rather than Hibernate itself. Make the blocked thread dump a stack trace. You should be able to work this out but you may have to consider getting help as these problems can be difficult to isolate.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 22, 2005 10:43 pm 
Newbie

Joined: Wed Feb 02, 2005 11:19 pm
Posts: 6
Not sure if it's the same problem I encountered before.

I was using weblogic 6.1 + hibernate and the system hung for a long time before a Java hotspot error appears.

Try adding
Code:
      -XX:MaxPermSize=128m

to the command used for starting your websphere and see if it helps.


- Jim


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 23, 2005 1:16 pm 
Beginner
Beginner

Joined: Wed Jul 21, 2004 8:12 pm
Posts: 35
First I would like to thank all those who replied to the message and then for those of you who may experience the same problem, here where I found the solution to the problem:

http://www-1.ibm.com/support/docview.ws ... wg21121449

Just in case the link does not work, I have pasted the content below:

Application hangs with previous J2CA0086W warning messages
Technote (FAQ)

Problem
An application seems to be in a hang state while trying to connect to database. The logs show several ConnectionWaitTimeoutExceptions as well as other errors referring to problems obtaining free connections from the pool. Before occurrences of hang there are repeated J2CA0086W warning messages and the connection pool is at a maximum.

Cause
A warning message similar to the one below is observed in the logs before the hang occurs:

[8/19/03 21:37:53:366 CST] 1c86bdf0 SharedPool I J2CA0086W: Shareable connection MCWrapper id 686bbdf9 Managed connection com.ibm.ws.rsadapter.spi.WSRdbManagedConnectionImpl@6156bdf9
State:STATE_TRAN_WRAPPER_INUSE

The message reference contains the following explanation of this message:

J2CA0086W: Shareable connection {0} from resource {1} was used within a local transaction containment boundary.

Explanation: Shareable connections are not allowed within a local transaction containment boundary.

User Response: Connection was made non-shareable.

The above scenario suggests a possible problem in the application logic and how it is using the connection code. The J2CA0086 message is telling you that your application is using a shared connection in a LocalTransaction. Since the connection is enlisted in a Local Transaction, and not a Global Transaction, different rules are followed when it comes to connection sharing. The connection usage has to follow the pattern shown below:

get connection,
use connection,
close connection,
commit transaction

then the connection can be used again. If this logic is not followed, a second (or third) connection can be allocated.

For example, if the application calls getConnection() method it gets connection1, uses connection1, then, if it calls getConnection() method again and connection1 is not ready to be reused, connection2 is obtained. Both connections remain in the shared pool and both are associated with the Local Transaction, until the Local Transaction ends (is committed or rolled back, or the method ends).

This can result in more connections being created than is expected, which is why the application is reaching the maximum connections, and getting ConnectionWaitTimeoutExceptions among others). This can cause a hang if the pool is at a maximum, and none of the threads that have connections can complete because they are waiting to get another connection.

Solution
There are two solutions to this problem:


The application must be modified to use serial reuse


or


The maximum number of connections must be increased (you can use 0, which means infinite connections).

In general you will see better performance with a lower number of connections, so the best solution to the problem is to make sure that the application closes its connections when it's done using them If it needs another connection later, it calls getConnection again (the connection pool caches the physical connection and allows it to be reused, so the performance hit is less than leaving the connections open).


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 23, 2005 8:25 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
Cool - Thank you posting the issues solution for other users to review.


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

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.