This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes Spring and the fly likes Breakpoints not reachable if debugging @Transactional tests Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Frameworks » Spring
Reply Bookmark "Breakpoints not reachable if debugging @Transactional tests" Watch "Breakpoints not reachable if debugging @Transactional tests" New topic
Author

Breakpoints not reachable if debugging @Transactional tests

Bart Wlkwsk
Greenhorn

Joined: Sep 20, 2012
Posts: 1
Hi there,

I have the following problem:

I have a testsuite:


I have an implementation of the MyRepository interface (JdbcMyRepository) and this is configured in the app-test-context.xml:



If I put a breakpoint in the JdbcMyRepository, and start debugging the test1() method in MyTests, it does not break at the breakpoint! It looks like it could not come into the reflected class JdbcMyRepository through the interface MyRepository.

But... If I comment out @TransactionConfiguration(defaultRollback=false) and @Transactional in MyTests, then it works very well and I can debug my JdbcMyRepository (the debug is suspended at the breakpoint).

Can anybody explain that? Isn't it possible to debug if we use @Transactional?

Thanks in advance for your help!

Bart
Bill Gorder
Bartender

Joined: Mar 07, 2010
Posts: 1282

Hi Bart,

I have never had any issues with this. Try a project clean in eclipse. Also try to clear all your break points rebuild the project then try again. Another work around you can try is set the breakpoint in your test class and then step into to see if you can get in your repository implementation class. Once again I don't have this issue so I am not sure what the problem is.

Welcome to the Ranch!


[How To Ask Questions][Read before you PM me]
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Breakpoints not reachable if debugging @Transactional tests
 
Similar Threads
yet another Spring-JPA-Hibernate config question
Spring Transaction using Spring AOP
Spring jndi in context.xml / MyEclipse / Oracle / SJAS 9.1
Spring,JUnit, Hibernate and persistence db but not insert
Caching with Spring + Hibernate JPA + JBoss Cache