thank you for your answer, i thought it was my fault, so i closed it. In my use-case i don't care for the transaction-properties. I only care for the most basic functionality, i would like the jooq-queries inside the transactionResult to return something i specified before. For me it would be ok if the nullpointer gets fixed and the fact that this is a transaction gets ignored (but i don`t know how complex this would be).
On Sunday, January 31, 2016 at 11:34:06 AM UTC+1, Lukas Eder wrote: > > Hi Leander, > > Thank you very much for bringing this to our attention. This is a bug - > there shouldn't be any NullPointerException. I have registered an issue for > this: > https://github.com/jOOQ/jOOQ/issues/5017 > > As a workaround, you can use your own mock TransactionProvider and supply > that to your jOOQ Configuration. > > I suspect that jOOQ should ship with a default MockTransactionProvider > that simply doesn't do anything. In order to better understand the use-case > of mocking the connection in a transactional context (if that even makes > sense), what are your expectations towards the behaviour of jOOQ in that > case? At some point, you'll be implementing a whole database... :) > > Best Regards, > Lukas > > 2016-01-31 0:48 GMT+01:00 Leander Kurscheidt <[email protected] > <javascript:>>: > >> Hello, >> to unit-test my code, i am following the recommendation from here: >> http://www.jooq.org/doc/3.4/manual/tools/jdbc-mocking/. But for one >> query i have to resort to an transaction, but it seems that MockConnections >> setSavepoint() returns null, resulting in an Nullpointer-exception. >> this is my stack trace: >> >> java.lang.NullPointerException >> at java.util.ArrayDeque.addFirst(ArrayDeque.java:228) >> at java.util.ArrayDeque.push(ArrayDeque.java:503) >> at >> org.jooq.impl.DefaultTransactionProvider.begin(DefaultTransactionProvider.java:155) >> at >> org.jooq.impl.DefaultDSLContext.transactionResult(DefaultDSLContext.java:338) >> >> am i doing something wrong? Or is that beyond the reach of the >> MockConnection? >> >> -- >> You received this message because you are subscribed to the Google Groups >> "jOOQ User Group" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> For more options, visit https://groups.google.com/d/optout. >> > > -- You received this message because you are subscribed to the Google Groups "jOOQ User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
