0

I use glassfish 4.0 to test an ear with ejb using timer service. When glassfish loads it shows that the timer service is loaded and everything looks fine.

I call TimerService.createTimer and no exception is thrown.

However, when i try to see how many timers are stored by calling timerService.getTimers it always return an empty collection.

I saw this in debug mode so it has no relation if timer scheduler is persistent or not as i didn't restart the server.

What could be the cause? I tried to create EJB_TIMER_TBL in glassfish schema and in timer_db schema and even in my application schema and changed the jdb/TimerPool to use DerbyPool connection pool which i set to point to my custom DB but this time i get an SQLException that EJB_TIMER_TBL is not found. i think because the timer service select statement don't specify table schema for EJB_TIMER__TBL.

i'm sure someone faced such problem and i would appreciate any help

thanks

  • Found the issue if the first part. The @Timeout call back method was called that is why timer collection was empty. However, I couldn't find a solution to change the timer table in the DB –  Dec 18 '13 at 14:49

1 Answers1

2

Today I was stuck with problem in Netbeans7.4 + embeded Glassfish v4 - I can't deploy EAR with @Shchedule annotated bean. Error: EJB Timer service not available. In GF Admin console trying to set Ping setting on TimerPool returned error:

java.lang.NoClassDefFoundError: Could not initialize class org.apache.derby.jdbc.EmbeddedDriver Could not initialize class org.apache.derby.jdbc.EmbeddedDriver 

My solution - I downloaded standalone Glassfish v4 and added to Netbeans and problem was gone.

Tadas B.
  • 176
  • 8