File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other Application Frameworks and the fly likes Spring and iBATIS transaction problem Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Application Frameworks » Other Application Frameworks
Reply Bookmark "Spring and iBATIS transaction problem" Watch "Spring and iBATIS transaction problem" New topic
Author

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é
Marshal

Joined: Nov 24, 2005
Posts: 14361

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


[SCBCD Wall of Fame] [My Blog]
All roads lead to JavaRanch
Help Japan. Make a donation.
 
 
subject: Spring and iBATIS transaction problem
 
Threads others viewed
Spring Transaction using Spring AOP
Spring Transaction by AOP
Spring DAO and applicationConfig
Spring & JTA
Spring + JPA + Hibernate and multiple Database connection

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture