lazyinializationexception with transactional annotation in messageconvert
- by Karl
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?