Thanks for your feedback. Class loading (specifically from within a library) is a nightmare, no matter how you do it. I think the original discussion that lead to the current implementation was here: https://groups.google.com/d/topic/jooq-user/kI81XzxDZsE/discussion
The relevant issue is this one: https://github.com/jOOQ/jOOQ/issues/1572 In jOOQ 3.0, #1578 shall take care of allowing to provide ExecuteListener instances, not class names: https://github.com/jOOQ/jOOQ/issues/1578 The reason why class names were used originally (instead of actual instances), is because I have not found any other sensible way to configure custom listeners via a Settings XML file. In jOOQ 3.0, XML configuration of ExecuteListeners will no longer be possible. Hence, this issue will disappear. Cheers Lukas 2013/1/31 Ryan How <[email protected]>: > Hi, > > I just wanted to point out an issue I've been having with class loading with > the Execute Listeners. > > In my web app, I am using tomcat versioning support, so I can have multiple > versions of the app running at the same time. > > Unfortunately the JOOQ Execute Listeners give the following error when the > 2nd version of the app is deployed. > java.lang.ClassCastException: > au.com.greatlivinghomes.buildflow.data.JooqDataExecuteListener cannot be > cast to org.jooq.ExecuteListener > at org.jooq.impl.Util.getListener(Util.java:1113) > > Anyway, I replaced the code with the usually class.forName(...) and it is > working now. The comments mentioned that using the context class loader was > required for OSGI support, but in my case that broke my web app :). I > remember OSGI being a class loading nightmare!, but it was great when it > worked :) > > Thanks, Ryan > > -- > 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/groups/opt_out. > > -- 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/groups/opt_out.
