Hi Denis, Thank you for your suggested patch. As discussed on the relevant ticket: https://github.com/jOOQ/jOOQ/issues/1857
And on your pull request: https://github.com/jOOQ/jOOQ/pull/1858 These synchronisation issues probably originate from the fact that you assumed the Factory was thread-safe, which it isn't. Your pull request has been merged as it is probably a good step forward. However, true thread-safety should be analysed more in-depth in the upcoming jOOQ 3.0. I have created #1867 for this: https://github.com/jOOQ/jOOQ/issues/1867 Cheers Lukas 2012/10/2 Bondarenko Denis <[email protected]>: > Hi! > > After starting our application sometimes we catch exceptions like this: > 1) java.lang.NullPointerException > at org.jooq.SchemaMapping.map(SchemaMapping.java:336) > at org.jooq.impl.Util.getMappedSchema(Util.java:906) > at org.jooq.impl.TableImpl.toSQL(TableImpl.java:123) > 2) java.lang.NullPointerException > at org.jooq.impl.TableImpl.toSQL(TableImpl.java:131) > > > Error is in lazy initialization of two fields of org.jooq.SchemaMapping class > : > > private transient Map<String, Schema> schemata; > private transient Map<String, Table<?>> tables; > > I've attached test-case for this, and suggested patch. > Test-case tries to raise exception, usually it will take from 300 up > to 5000 runs. > Test-case based on Sergey Epik's test-case for ticket 1543. > > > PS.I just added this ticket to GitHub. But since i am novice for git > and github, that it will take too much time for add on GitHub all > related code. > So i decided to write email.
