This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
Where is your configuration for the SessionFactory, DataSource and TransactionManager and <tx:annotation-driven>?
Basically, my guess is that there isn't a proxy being created around your DAO with Spring's Transaction manager starting a transaction, even though you have the class and method annotated with @Transactional. You actually only need one or the other @Transactional. At the class level means that all methods of your interface should be transaction, and I assume that method is in your interface, so just leaving the annotation at the class level is enough.
Do you know if you are getting that class proxied? I don't think you are. I think there is something missing, but I don't see it yet.
So set a break point at the caller of that method then step into, and if you see a .class popup then you have a proxy and that is good. But if you go right into your first line of that method in your class, then you are not getting the proxy and therefore not getting transactions.
Wait a second where are your list of mapped classes here in your bean for SessionFactory. You have to tell it what are your mapped classes. either with properties mappingLocations, mappedClasses, or packagesToScan.
Mark
Frank VanOor
Ranch Hand
Joined: Jun 18, 2004
Posts: 41
posted
0
Hi Mark, thanks for comment. I added mapped classes to root context
But still the same exception.
The Class Stock
Frank VanOor
Ranch Hand
Joined: Jun 18, 2004
Posts: 41
posted
0
I made some progress, but have another exception :