File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Other Application Frameworks and the fly likes Spring and iBATIS transaction problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "Spring and iBATIS transaction problem" Watch "Spring and iBATIS transaction problem" New topic

Spring and iBATIS transaction problem

Rusty Enisin
Ranch Hand

Joined: May 26, 2005
Posts: 107
If any of you are familiar with Spring and iBATIS transactions, please look at this. I am really stuck right now.

I have a typical multi tiered project. Logic layers are in Spring. DAO is handled by iBATIS. Transaction management is handled by Spring's DataSourceTransactionManager.

The problem is I am getting the following error when I use the transaction manager.

Spring's application config looks like this:

Note: If I remove the transaction manager, the code works fine. With the transaction manager this one insert does not work. Other inserts, updates, deletes, and selects all work fine either way.

It looks like a simple configuration issue. The transaction is blocking access to the database because the class has read-only access according to the transaction manager.

I have tried specifying the access privileges manually in the Spring application config. No go. I am using the transaction annotation. I have tried setting the privilege there with @Transactional(readOnly=false). No go.

What totally obvious thing am I doing wrong?

The squeaky wheel gets the grease. Well, that or replaced...
Christophe Verré

Joined: Nov 24, 2005
Posts: 14688

Did you check why the error is happening in AddAuditDao.xml ?

[My Blog]
All roads lead to JavaRanch
I agree. Here's the link:
subject: Spring and iBATIS transaction problem
It's not a secret anymore!