Win a copy of Transfer Learning for Natural Language Processing (MEAP) this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Paul Clapham
  • Devaka Cooray
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Knute Snortum
  • Liutauras Vilda
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Piet Souris
Bartenders:
  • salvin francis
  • Carey Brown
  • Frits Walraven

@Transactional(propagation = Propagation.REQUIRES_NEW) + org.hibernate.LazyInitializationException

 
Ranch Hand
Posts: 763
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am using Spring 3.x & JPA.

I am calling a service method as declared below with annotation @Transactional



As i have declared method with annotation @Transactional(propagation = Propagation.REQUIRES_NEW) it should ideally start a new transaction with session but i am getting below exception.

Exception stack trace.




Here is my web.xml




Here is my jpaContext.xml



Not sure why it's throwing lazy loading exception even though i am starting new transaction.

Can somebody help me overcome this issue ?

Thanks
Jigar Naik.
 
pie. tiny ad:
Two software engineers solve most of the world's problems in one K&R sized book
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic