Problem was in my own code. I had an exception on the transaction that was not rolledback so the connection had an uncleaned transaction on it.
Since my other select was running on the same thread it got the same uncleaned connection with the transaction.
I got the excately the same problem with you. But still can't solve it. Could you please explain me in detail with your code.