-
Bug
-
Resolution: Done
-
Major
-
None
-
None
Customer use database store ejb timer service.
When customer restart the server after configuring belows, got the error during startup and the persisted timer was not recreated successfully.
~~~~~
<timer-service thread-pool-name="default" default-data-store="clustered-store">
<data-stores>
<database-data-store name="clustered-store" datasource-jndi-name="java:jboss/datasources/WebQuoteDS" database="oracle" refresh-interval="30000"/>
</data-stores>
</timer-service>
~~~~~
(error)
~~~~~
14:44:56,157 WARN [org.jboss.as.ejb3] (ServerService Thread Pool – 97) WFLYEJB0161: Failed to reinstate timer 'webquote.WQ_EJB_Utility.TaskScheduleManager' (id=633b0edf-1a14-4497-ae0b-64ca5523eff1) from its persistent state: java.sql.SQLException: Invalid conversion requested
at oracle.jdbc.driver.CharCommonAccessor.getTimestamp(CharCommonAccessor.java:420)
at oracle.jdbc.driver.T4CVarcharAccessor.getTimestamp(T4CVarcharAccessor.java:644)
at oracle.jdbc.driver.GeneratedStatement.getTimestamp(GeneratedStatement.java:360)
at oracle.jdbc.driver.GeneratedScrollableResultSet.getTimestamp(GeneratedScrollableResultSet.java:1008)
at org.jboss.jca.adapters.jdbc.WrappedResultSet.getTimestamp(WrappedResultSet.java:2140)
at org.jboss.as.ejb3.timerservice.persistence.database.DatabaseTimerPersistence.timerFromResult(DatabaseTimerPersistence.java:533)
at org.jboss.as.ejb3.timerservice.persistence.database.DatabaseTimerPersistence.loadActiveTimers(DatabaseTimerPersistence.java:458)
at org.jboss.as.ejb3.timerservice.TimerServiceImpl.getActivePersistentTimers(TimerServiceImpl.java:952)
at org.jboss.as.ejb3.timerservice.TimerServiceImpl.restoreTimers(TimerServiceImpl.java:692)
at org.jboss.as.ejb3.timerservice.TimerServiceImpl.activate(TimerServiceImpl.java:225)
at org.jboss.as.ejb3.component.EJBComponent.start(EJBComponent.java:543)
at org.jboss.as.ejb3.component.stateless.StatelessSessionComponent.start(StatelessSessionComponent.java:114)
at org.jboss.as.ee.component.ComponentStartService$1.run(ComponentStartService.java:54) [wildfly-ee-7.0.0.GA-redhat-2.jar:7.0.0.GA-redhat-2]
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [rt.jar:1.8.0_111]
at java.util.concurrent.FutureTask.run(Unknown Source) [rt.jar:1.8.0_111]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [rt.jar:1.8.0_111]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.8.0_111]
at java.lang.Thread.run(Unknown Source) [rt.jar:1.8.0_111]
at org.jboss.threads.JBossThread.run(JBossThread.java:320)
Caused by: java.lang.IllegalArgumentException: Timestamp format must be yyyy-mm-dd hh:mm:ss[.fffffffff]
at java.sql.Timestamp.valueOf(Unknown Source) [rt.jar:1.8.0_111]
at oracle.jdbc.driver.CharCommonAccessor.getTimestamp(CharCommonAccessor.java:415)
... 18 more
~~~~~
The error seems to be caused by trying to convert a "java.util.Date" object into "java.sql.Timestamp" and persist it into database.
javax.ejb.ScheduleExpression API only has one method "start(java.util.Date s) " so that's something you can't change.
I could see we need some patching to the scripts used to create tables and insert data. [1]
[1] http://www.mastertheboss.com/jboss-server/wildfly-8/creating-clustered-ejb-3-timers
- is blocked by
-
WFLY-9054 Use of schedule expression start/end date for (Database) persistent calendar timers fail if the server is restarted and the timer reloaded
- Closed
- links to