I developed a JCA connector a few years ago and run it in GlassFish 2.1 and 2.1.1. Every once and a while I get a "Timer already canceled" error when retrieving a connection from a connection pool. At first I thought it was my fault because I use timers in a couple places and didn't have error handling code around the cancel() method. Now I do have error handling and we are still experiencing the problem. The stack trace shown below gives me the impression that the problem originates from within GlassFish. The only way to make the connection pool usable again is to restart GlassFish.
Any ideas?
Thanks,
Ryan
java.lang.IllegalStateException: Timer already cancelled.
at java.util.Timer.sched(Timer.java:354)
at java.util.Timer.scheduleAtFixedRate(Timer.java:296)
at com.sun.enterprise.resource.AbstractResourcePool.scheduleResizerTask(AbstractResourcePool.java:254)
at com.sun.enterprise.resource.AbstractResourcePool.initPool(AbstractResourcePool.java:232)
at com.sun.enterprise.resource.AbstractResourcePool.internalGetResource(AbstractResourcePool.java:531)
at com.sun.enterprise.resource.AbstractResourcePool.getResource(AbstractResourcePool.java:458)
at com.sun.enterprise.resource.PoolManagerImpl.getResourceFromPool(PoolManagerImpl.java:248)
at com.sun.enterprise.resource.PoolManagerImpl.getResource(PoolManagerImpl.java:176)
at com.sun.enterprise.connectors.ConnectionManagerImpl.internalGetConnection(ConnectionManagerImpl.java:313)
at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:189)
at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:165)
at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:158)
at com.ijws.cicokioskcl.ra.cci.CicoKioskConnectionFactory.getConnection(CicoKioskConnectionFactory.java:68)
at com.ijws.webcico.dao.impl.CicoKioskClientLocatorImpl.getConnection(CicoKioskClientLocatorImpl.java:49)
at com.ijws.webcico.dao.impl.KioskServerDaoImpl.sendRequest(KioskServerDaoImpl.java:828)
....
[Message sent by forum member 'rdelaplante']
http://forums.java.net/jive/thread.jspa?messageID=480902