lazyinializationexception with transactional annotation in messageconvert
Posted
by Karl
on Stack Overflow
See other posts from Stack Overflow
or by Karl
Published on 2010-05-11T12:20:22Z
Indexed on
2010/05/11
12:24 UTC
Read the original article
Hit count: 225
Hi,
I have a Rest-Service exposed through spring-mvc. I have a particular method which is correctly mapped and called through a http-call. My spring application contains the hibernatetransactionmanager and transactions are configured through @Transactional-annotations. I annotated the method with @Transactional.
@Transactional(readOnly = true)
@Override
@RequestMapping(value = "/start", method = RequestMethod.GET) @ResponseBody public List start(....)
Whenever I call the http-method I get org.hibernate.LazyInitializationException from my org.springframework.http.converter.json.MappingJacksonHttpMessageConverter which is bound in my application context. Is the @Transactional annotation valid for the MessageConverter as well?
© Stack Overflow or respective owner