Note that there are some explanatory texts on larger screens.

plurals
  1. POHibernate Session closings with Hadoop
    primarykey
    data
    text
    <p>I'm an intermediate Hibernate user. I am trying to get some traction with Hadoop at my company. I'm using a library called spring-hadoop (https://github.com/SpringSource/spring-hadoop) to configure my application and inject my dependencies.</p> <p>I'm having a lot of trouble getting Hadoop to respect my hibernate sessions. I'm hitting the legendary LazyInitializationException.</p> <blockquote> <p>org.hibernate.LazyInitializationException: could not initialize proxy - no Session at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:108) at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:150) at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:150) at p.model.ServicePoint$$EnhancerByCGLIB$$181013ec.getReadResolution() at p.service.ResourceService.getStartDate(ResourceService.java:77)</p> </blockquote> <p>Resolution is a lazy init field on a ServicePoint object that is retrieved with hibernate in the first part of the map task.</p> <p>The exception is thrown later on in the map task when I try to work with the ServicePoint object. It is not thrown in the reduce task. Modifying the ServicePoint hibernate mapping is not an option.</p> <p>I've tried a bunch of approaches suggested by my giant "Java Persistencee with Hibernate" book such as:</p> <ol> <li>Opening a session at the beginning of Map:</li> </ol> <blockquote> <p>Session session = this.sessionFactory.openSession(); session.beginTransaction();</p> </blockquote> <ol> <li>Adding stuff like this to my sessionFactory bean:</li> </ol> <blockquote> <p>prop key="hibernate.connection.release_mode">on_close &lt; /prop></p> </blockquote> <p>Before i pull out all stops and try stuff like Conversation Interceptors, can anyone give me a suggestion ? Nothing works and the exception keeps coming.</p> <p>Thanks, Raj</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload