• New Feature
  • Status: Closed
  • 2 Major
  • Resolution: Fixed
  • DSO:L1
  • Reporter:
  • November 14, 2007
  • 2
  • Watchers: 1
  • April 10, 2009
  • October 20, 2008


Refer to post http://forums.terracotta.org/forums/posts/list/568.page

HibernateUtil is written with assumption that hibernate.cfg.xml will be always available. That may not be the case in applications based on Spring, where hibernate configuration is defined via spring bean. It might fail even in those setup where SessionFactory is configured in a NamingService, a typical scenario in J2EE based applications.

Possible solution could be is to ask application developer provide an implementation of some interface that returns reference to session factory and if not configured use default implementation of HibernateUtil.


Fiona OShea 2008-01-16

Eugene can you give us an LOE on resolving this?

Fiona OShea 2008-01-16

Hey Nitin are you looking into fixing this?

njain 2008-01-16

No, Since this is a change in core product I am unsure about how to proceed with it. Let me know if I need to fix this

Russell Pitre 2008-02-04

Is there anymore information if there will be fix for this issue coming out sooner than later? Because of this issue, we have had to turn off clustering and run in a single-node environmnet. One thing i have noticed with this issue is that it appears to surface when one of the tc clients is restarted and joins rejoins the cluster.

Eugene Kuleshov 2008-02-04

I don’t think there is any changes required in the core product, but in hibernate_3_1_2 config module. I am not familiar with Spring integration for Hibernate, but it should be possible to hook up something that would retrieve required configuration without using Hibernate configuration reader.

org.hibernate.HibernateException: /hibernate.cfg.xml not found at org.hibernate.util.ConfigHelper.getResourceAsStream(ConfigHelper.java:147) at org.hibernate.cfg.Configuration.getConfigurationInputStream(Configuration.java:1405) at org.hibernate.cfg.Configuration.configure(Configuration.java:1427) at org.hibernate.cfg.Configuration.configure(Configuration.java:1414) at org.terracotta.modules.hibernate_3_1_2.util.HibernateUtil.(HibernateUtil.java:17) at java.lang.Class.forName0(Native Method)

Maybe users could provide us with some test app that uses Hibernate and Spring, so we could start from specific scenario.

njain 2008-04-28

This is fixed for hibernate 3.1.2 and 3.2.5 in tim-hibernate inside forge.

Fiona OShea 2008-05-27

Jason can you verify that the fixes are in? Does the monkey keep failing?

jvoegele 2008-10-20

This is no longer an issue.