Let me preface this by saying my code was working yesterday. I rolled back my commits to the time when it was working.
The only thing that is different is that a migration was ran today to remove some columns from some tables. I can't see how this would affect it
I'm doing google oauth authentication and in my callback url from google I am doing a lot of saves/updates/etc.. My controller calls a single service that does everything. If I query the data while at a breakpoint where the return statement is, I can see the data. There are no exceptions, validation errors, or anything that would lead me to believe anything is wrong. Any ideas?
class MyController {
def myService
def callback() {
myService.update()
//At this point when I run X.get(1) it is returning null
redirect uri: "..."
}
}
@Transactional
class MyService {
def update() {
...
//If I break at this return statement I can run X.get(1) and it returns
return someData;
}
}
Edit: I've found the cause, however I don't understand how this is happening. I'm eventually calling userDetailsService.loadUserByUsername
. That method is throwing a NoStackUsernameNotFoundException
. I'm catching that exception in my code, however it is causing the transaction to roll back regardless.