Openbravo Issue Tracking System - Openbravo ERP | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0002962 | Openbravo ERP | Z. Others | public | 2008-05-12 23:42 | 2008-06-18 19:08 |
Reporter | user71 | ||||
Assigned To | anthony_wolski | ||||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | OS | 5 | OS Version | ||
Product Version | |||||
Target Version | Fixed in Version | 2.40alpha-r3 | |||
Merge Request Status | |||||
Review Assigned To | |||||
OBNetwork customer | No | ||||
Web browser | |||||
Modules | Core | ||||
Support ticket | |||||
Regression level | |||||
Regression date | |||||
Regression introduced in release | |||||
Regression introduced by commit | |||||
Triggers an Emergency Pack | No | ||||
Summary | 0002962: Heartbeat fails on pospone | ||||
Description | Choosing the "Later" option on the Heartbeat config popup fails giving the following error on the application server: javax.servlet.ServletException: @CODE=0@ERROR: la columna «postpone_date» es de tipo timestamp without time zone pero la expresión es de tipo character varying at org.openbravo.erpCommon.ad_background.PeriodicHeartbeatData.postpone(Unknown Source) at org.openbravo.erpCommon.ad_forms.Heartbeat.doPost(Unknown Source) It refers to the datatypes of field postpone_date. I'm using a SVN Trunk version on Glassfish Application Server v2.1, but it's not an App Srv issue. I suggest this workaround/solution: - File PeriodicHeartbeatData in package org.openbravo.erpCommon.ad_background - Method postpone(...) - Replace line: UtilSql.setValue(st, iParameter, 12, null, postponeDate); with //UtilSql.setValue(st, iParameter, 12, null, postponeDate); UtilSql.setValue(st, iParameter, java.sql.Types.TIMESTAMP, null, postponeDate); (leave original line commented in case of anything) - File UtilSql on package org.openbravo.data - Method setValue(...) - Find: case java.sql.Types.LONGVARCHAR: ps.setString(posicion, strValor); break; - Add after: case java.sql.Types.TIMESTAMP: Date date = (new SimpleDateFormat("dd/MM/yyyy")).parse(strValor); Timestamp timestamp = new Timestamp(date.getTime()); ps.setTimestamp(posicion, timestamp); break; I see a design issue in this, because Timestamps can come in other formats. Perhaps a better solution involves changing the setValue method to receive Objects instead of Strings, so the types are correctly stated on each call. This last suggestion may require changes on every other methods using setValue. | ||||
Steps To Reproduce | |||||
Proposed Solution | |||||
Additional Information | |||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | |||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2008-06-18 19:08 | plujan | Status | resolved => closed |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|