https://issues.apache.org/jira/browse/TOMEE-944
will work only for the StdJDBCDelegate class (not children) but works for MySQL which is quite common. Side note: you still need to use absolute names in tomee for its datasources (openejb:Resource/<name>) *Romain Manni-Bucau* *Twitter: @rmannibucau <https://twitter.com/rmannibucau>* *Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau* *Github: https://github.com/rmannibucau* 2013/5/21 Thomas Schuler <[email protected]> > Hi Romain! > > Thanks for the explanation. > Using a HashMap instead of the TimerData object is less comfortable but it > works (for us). > > Best regards, > Thomas > > -----Original Message----- > From: Romain Manni-Bucau [mailto:[email protected]] > Sent: Dienstag, 21. Mai 2013 15:35 > To: [email protected] > Subject: Re: Timer service - different behaviour if external quartz tables > are used or not > > Remember this issue i think > > If that's what i think it is a limitation of quartz itself in > org.quartz.impl.jdbcjobstore.StdJDBCDelegate#getObjectFromBlob > > it uses a ObjectInputStream which is not app classloader aware (weird > since quartz itself has the info through its ClassLoadHelper). > > You can hack the org.quartz.impl.jdbcjobstore.DriverDelegate to workaround > it. I decided to not hack it since that's a quartz issue for me. > > *Romain Manni-Bucau* > *Twitter: @rmannibucau <https://twitter.com/rmannibucau>* > *Blog: **http://rmannibucau.wordpress.com/*< > http://rmannibucau.wordpress.com/> > *LinkedIn: **http://fr.linkedin.com/in/rmannibucau* > *Github: https://github.com/rmannibucau* > > > > 2013/5/21 Thomas Schuler <[email protected]> > > > Hi Romain! > > > > As I did for a different topic before (Use external database for > > persistent timer service), I can offer you an eclipse project: > > Attached the packed eclipse project. > > As only mails within a size of 1 MB are allowed: please add > > openejb-client-4.5.0.jar to the lib/clients folder and > > javaee-api-6.0-4-tomcat.jar to the lib folder. > > > > Please check README.txt how to adapt to your local system. > > > > It includes a simple example "Timer" demonstrating a scheduled bean > > without persistence. > > > > The example "Timer (persisted)" demonstrates a persisted scheduled > > bean - the programmatic timer includes the TimerData object. > > > > Best regards, > > Thomas > > > > -----Original Message----- > > From: Romain Manni-Bucau [mailto:[email protected]] > > Sent: Dienstag, 21. Mai 2013 11:28 > > To: [email protected] > > Subject: Re: Timer service - different behaviour if external quartz > > tables are used or not > > > > No, > > > > should be fine, if you can share a failiing project (maven project on > > github runnable with mvn tomee:run is the best you can do to ease our > > work ;). > > > > > > *Romain Manni-Bucau* > > *Twitter: @rmannibucau <https://twitter.com/rmannibucau>* > > *Blog: **http://rmannibucau.wordpress.com/*< > > http://rmannibucau.wordpress.com/> > > *LinkedIn: **http://fr.linkedin.com/in/rmannibucau* > > *Github: https://github.com/rmannibucau* > > > > > > > > 2013/5/21 Thomas Schuler <[email protected]> > > > > > Hi Romain! > > > > > > Attached application.properties and tomee.xml used for testing timer > > > persistence. > > > We did not configure org.quartz.scheduler.classLoadHelper.class. > > > The simple example is a war file. > > > Should I try openejb.quartz.use-TCCL=true with an ear file too? > > > > > > Best regards, > > > Thomas > > > > > > > > > -----Original Message----- > > > From: Romain Manni-Bucau [mailto:[email protected]] > > > Sent: Dienstag, 21. Mai 2013 11:14 > > > To: [email protected] > > > Subject: Re: Timer service - different behaviour if external quartz > > > tables are used or not > > > > > > Did you configure org.quartz.scheduler.classLoadHelper.class? If not > > > you should be ok. > > > > > > Which config do you use? > > > > > > Do you deploy an ear? > > > > > > *Romain Manni-Bucau* > > > *Twitter: @rmannibucau <https://twitter.com/rmannibucau>* > > > *Blog: **http://rmannibucau.wordpress.com/*< > > > http://rmannibucau.wordpress.com/> > > > *LinkedIn: **http://fr.linkedin.com/in/rmannibucau* > > > *Github: https://github.com/rmannibucau* > > > > > > > > > > > > 2013/5/21 Thomas Schuler <[email protected]> > > > > > > > Hi Romain! > > > > > > > > I tried both adding openejb.quartz.use-TCCL=true to > > > > application.properties or system.properties as you suggested. > > > > But I still got the same behavior as described before. > > > > > > > > Best regards, > > > > Thomas > > > > > > > > -----Original Message----- > > > > From: Romain Manni-Bucau [mailto:[email protected]] > > > > Sent: Dienstag, 21. Mai 2013 10:27 > > > > To: [email protected] > > > > Cc: [email protected] > > > > Subject: Re: Timer service - different behaviour if external > > > > quartz tables are used or not > > > > > > > > hi > > > > > > > > did you try adding openejb.quartz.use-TCCL=true to either > > > > application.properties or system.properties? > > > > > > > > *Romain Manni-Bucau* > > > > *Twitter: @rmannibucau <https://twitter.com/rmannibucau>* > > > > *Blog: **http://rmannibucau.wordpress.com/*< > > > > http://rmannibucau.wordpress.com/> > > > > *LinkedIn: **http://fr.linkedin.com/in/rmannibucau* > > > > *Github: https://github.com/rmannibucau* > > > > > > > > > > > > > > > > 2013/5/21 tschuler <[email protected]> > > > > > > > > > Hi! > > > > > > > > > > We want to use scheduled beans (TomEE 1.6.0 snapshot - about two > > > > > weeks > > > > > old) and add an own Serializable object (TimerData) while timer > > > > creation, e.g. > > > > > timerService.createTimer(Date, TimerData). > > > > > > > > > > We observed a different behaviour if persistence for timers is > > > > > used or > > > > not. > > > > > > > > > > ----- > > > > > > > > > > No timer persistence (as configured for an out of the box TomEE): > > > > > The scheduled bean is triggered, the TimerData object is > > > > > available > > > > > (timer.getInfo()) > > > > > > > > > > ----- > > > > > > > > > > Timer persistence is activated and an external database is used: > > > > > The scheduled bean is not triggered, the following exception > occurs: > > > > > > > > > > SCHWERWIEGEND: An error occurred while scanning for the next > > > > > triggers to fire. > > > > > org.quartz.JobPersistenceException: Couldn't acquire next trigger: > > > > > Couldn't retrieve trigger: java.lang.ClassNotFoundException: > > > > > timerPersisted.server.TimerData [See nested exception: > > > > > org.quartz.JobPersistenceException: Couldn't retrieve trigger: > > > > > java.lang.ClassNotFoundException: > > > > > timerPersisted.server.TimerData [See nested exception: > java.io.IOException: > > > java.lang.ClassNotFoundException: > > > > > timerPersisted.server.TimerData]] > > > > > at > > > > > > > > > > > > > > org.quartz.impl.jdbcjobstore.JobStoreSupport.acquireNextTrigger(Jo > > > > bS > > > > to > > > > reSupport.java:2840) > > > > > [...] > > > > > Caused by: org.quartz.JobPersistenceException: Couldn't retrieve > > > trigger: > > > > > java.lang.ClassNotFoundException: > > > > > timerPersisted.server.TimerData [See nested exception: > java.io.IOException: > > > java.lang.ClassNotFoundException: > > > > > timerPersisted.server.TimerData] > > > > > at > > > > > > > > > > > > > > org.quartz.impl.jdbcjobstore.JobStoreSupport.retrieveTrigger(JobSt > > > > or > > > > eS > > > > upport.java:1524) > > > > > [...] > > > > > Caused by: java.io.IOException: java.lang.ClassNotFoundException: > > > > > timerPersisted.server.TimerData > > > > > at > > > > > > > org.apache.openejb.core.timer.TimerData.readObject(TimerData.java:134) > > > > > [...] > > > > > Caused by: java.lang.ClassNotFoundException: > > > > > timerPersisted.server.TimerData > > > > > at java.net.URLClassLoader$1.run(URLClassLoader.java:202) > > > > > [...] > > > > > > > > > > If the TimerData object is added to a jar file and the jar file > > > > > is inserted to the TomEE\lib directory: > > > > > The scheduled bean is triggered as expected. > > > > > > > > > > ----- > > > > > > > > > > Why must the TimerData object be available in the global TomEE > > > > > classpath in case of timer persistence? > > > > > Is there a way to get it running without putting > > "application-specific" > > > > > classes to the global TomEE lib folder? > > > > > > > > > > Best regards, > > > > > Thomas > > > > > > > > > > > > > > > > > > > > -- > > > > > View this message in context: > > > > > http://openejb.979440.n4.nabble.com/Timer-service-different-beha > > > > > vi > > > > > ou > > > > > r- if-external-quartz-tables-are-used-or-not-tp4663101.html > > > > > Sent from the OpenEJB Dev mailing list archive at Nabble.com. > > > > > > > > > > > > > > >
