Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0019455Openbravo ERPA. Platformpublic2012-01-10 18:272012-01-14 21:21
marvintm 
marvintm 
immediatemajorhave not tried
closedfixed 
5
 
 
Core
No
0019455: The process scheduling fails after some time if using a different date format
If a different date format is defined in the Openbravo.properties file, the scheduling process fails after some time. This can be noticed when starting Tomcat because the following exception is shown:

 ERROR org.openbravo.scheduling.OBScheduler - Error scheduling process: The trigger information you have entered is invalid. Details: Unparseable date: "12/14/2011 05:12:49"
javax.servlet.ServletException: The trigger information you have entered is invalid. Details: Unparseable date: "12/14/2011 05:12:49"
    at org.openbravo.scheduling.OBScheduler$TriggerProvider.newInstance(OBScheduler.java:488)
    at org.openbravo.scheduling.OBScheduler$TriggerProvider.access$0(OBScheduler.java:350)
    at org.openbravo.scheduling.OBScheduler.schedule(OBScheduler.java:190)
    at org.openbravo.scheduling.OBScheduler.schedule(OBScheduler.java:165)
    at org.openbravo.scheduling.OBScheduler.initialize(OBScheduler.java:257)
    at org.openbravo.base.OBSchedulerInitializerListener.contextInitialized(OBSchedulerInitializerListener.java:114)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3972)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4467)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
    at org.apache.catalina.core.StandardService.start(StandardService.java:519)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)

This exception is only raised when a process request of type "scheduled" has already been scheduled once, and therefore has a "next fire time" value.
- Change the dateTime format in Openbravo.properties to something different (for example "MM/dd/yyyy HH\:mm\:ss") and compile the application.
- Add a process request with type "scheduled" and verify that it is scheduled correctly at least once.
- Restart tomcat. The exception should appear.
Regression
related to defect 0019228 closed marvintm Reschedule Process fails with US style dates 
blocks design defect 0019002 closed plujan System is not fully working with date format MM-DD-YYYY 
Issue History
2012-01-10 18:27marvintmNew Issue
2012-01-10 18:27marvintmAssigned To => alostale
2012-01-10 18:27marvintmModules => Core
2012-01-10 18:27marvintmAssigned Toalostale => marvintm
2012-01-10 18:34marvintmRelationship addedblocks 0019002
2012-01-10 18:34marvintmRelationship addedrelated to 0019228
2012-01-10 18:41hgbotCheckin
2012-01-10 18:41hgbotNote Added: 0044215
2012-01-10 18:41hgbotStatusnew => resolved
2012-01-10 18:41hgbotResolutionopen => fixed
2012-01-10 18:41hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/ad9032d6e574ae53fc7dc722d6de54770d61c2c4 [^]
2012-01-10 18:45iperdomoTag Attached: Regression
2012-01-10 22:53shuehnerIssue Monitored: shuehner
2012-01-11 19:01iperdomoNote Added: 0044279
2012-01-11 19:01iperdomoStatusresolved => closed
2012-01-14 21:21hudsonbotCheckin
2012-01-14 21:21hudsonbotNote Added: 0044364

Notes
(0044215)
hgbot   
2012-01-10 18:41   
Repository: erp/devel/pi
Changeset: ad9032d6e574ae53fc7dc722d6de54770d61c2c4
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Tue Jan 10 18:40:34 2012 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/ad9032d6e574ae53fc7dc722d6de54770d61c2c4 [^]

Fixed issue 19455. Scheduler will no longer fail with a different date format

---
M src/org/openbravo/scheduling/OBScheduler.java
M src/org/openbravo/scheduling/Trigger_data.xsql
---
(0044279)
iperdomo   
2012-01-11 19:01   
Tested on pi @ rev f73c0354c932
--
Test case:
- Change the Openbravo.properties to use MM/DD/YYYY date-format
- Deploy changes
- Change the scheduling time for Heartbeat process. Every 2 minutes
- Check the the process is triggered in the expected time
- Check that the next_fire_time column is filled with data (ad_process_request)
- Restart tomcat and check that the process is still triggering in the expected time interval

Tested in PostgreSQL 9.1.2 and Oracle 11.2.0.1.0
(0044364)
hudsonbot   
2012-01-14 21:21   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/0f91795528e4 [^]

Maturity status: Test