Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

OutOfMemoryError at openSession in JTATransaction

 
Mark OfSimon
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi.
I implemented a transaction hibernate-jta architecture into JBoss 4.2.1 and MySql 5 and with hibernate 3.1.

On a Redhat machine, even with large memory settings on JVM, sometimes the server throws an OutOfMemoryError
at org.hibernate.impl.SessionFactoryImpl.openSession(SessionFactoryImpl.java:535)

So, these are my relevant classes and methods and configuration file.









Finally, this is my Business Class



and this is the datasource configuration on JBoss



Well. On my machine (Windows Vista as OS) works all perfectly and I've not any trouble.
But, on a Redhat machine, sometimes the server goes into OutOfMemoryError
at org.hibernate.impl.SessionFactoryImpl.openSession(SessionFactoryImpl.java:503)

This is the complete stacktrace




Any suggest?
Thanks in advance
 
Mark OfSimon
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would add another information.

Into the same server an another identical war is deployed (different from the first only for the web.xml).

I had a trouble because before, into the HibernateUtil class I retrieved the SessionFactory with this code



So, when the second war invoke this method it ha a conflict JNDI Name problem caused by the same JNDI name into the identical hibernate.cfg.xml

The two war presence could be the cause again?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic