Hibernate 5 session exception - after camel 3 migration

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Hibernate 5 session exception - after camel 3 migration

rinilnath r

I am working for a project that involves Camel 2.x and that is only to read
files from the folder and process (using business logic and write to db)
and finally moves it to another folder in the same system.

I migrated camel to camel latest 3.x (3.4.1) and when i did that , all DAO
classes shown a problem at run time in all session instances "Could not
obtain transaction-synchronized Session for current thread"


As per the response of this question i have my @transactional annotations
at all DAO.

I tried with the second higher vote suggestion in that link , but it is not
advisable since it opens session every time. and my transactions are not
being saved into the table.

My App Tech stack :

Spring 5 with Spring boot
Camel 3.4.1
Hibernate 5
MS SQL DB 2012

With older camel versions, and hibernate 4, this session issue is not there
and DB hit works fine.

Can some experts please help me ?

Thanks and Regards,
Rinilnath. R
Cell # +91-9786285451