Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0038671Openbravo ERPA. Platformpublic2018-05-31 13:402019-09-27 15:08
ALopetegui 
alostale 
noneminorrandom
closedfixed 
0
3.0PR17Q2 
3.0PR19Q4 
caristu
Core
No
0038671: random NPE getting data for some date/datetime fields
Null Pointer getting data for several columns in FormInitializationComponent

There are Several colums getting nullPointer exception:

Created
DateAcct
DateInvoiced
Dateordered
DateOrdered
DatePromised
EM_OBBUTF_Agio
EM_OBBUTF_CommissionAmt
EM_OBBUTF_ComPercentage
EM_Obbutf_Finalamount
EM_OBBUTF_FirstPaymentDate
EM_OBBUTF_FundedAmount
EM_OBPOS_App_Cashup_ID
em_poss_businessdate
End_Date
End_Time
Documentdate
DueDate
EM_OBBUTF_FirstPaymentDate
Paymentdate
Statementdate
Status
Taxdate
......
Attached some logs
No tags attached.
causes defect 0044640 closed cberner Exported grid csv with enabled creation date column value does not match in the application 
causes defect 0044574 closed cberner The date is not displayed correctly in the "Costing Rules" window -> "Fix Backdated Transactions" process 
txt issue152.txt (47,146) 2018-05-31 13:40
https://issues.openbravo.com/file_download.php?file_id=11820&type=bug
? Openbravo.properties (7,393) 2018-06-19 14:01
https://issues.openbravo.com/file_download.php?file_id=11872&type=bug
txt 38671_log.txt (22,556) 2018-09-11 11:11
https://issues.openbravo.com/file_download.php?file_id=12126&type=bug
Issue History
2018-05-31 13:40ALopeteguiNew Issue
2018-05-31 13:40ALopeteguiAssigned To => platform
2018-05-31 13:40ALopeteguiFile Added: issue152.txt
2018-05-31 13:40ALopeteguiModules => Core
2018-05-31 13:40ALopeteguiTriggers an Emergency Pack => No
2018-05-31 13:51ALopeteguiDescription Updatedbug_revision_view_page.php?rev_id=17230#r17230
2018-05-31 13:51ALopeteguiSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=17232#r17232
2018-06-04 12:06ALopeteguiNote Added: 0104910
2018-06-04 13:45alostaleNote Added: 0104914
2018-06-04 13:45alostaleAssigned Toplatform => ALopetegui
2018-06-04 13:45alostaleStatusnew => feedback
2018-06-04 19:29ALopeteguiNote Added: 0104927
2018-06-08 11:41ALopeteguiAssigned ToALopetegui => platform
2018-06-08 11:41ALopeteguiStatusfeedback => new
2018-06-15 11:27alostaleNote Added: 0105176
2018-06-15 11:27alostaleStatusnew => feedback
2018-06-15 11:27alostaleAssigned Toplatform => ALopetegui
2018-06-19 10:03ALopeteguiNote Added: 0105212
2018-06-19 10:05ALopeteguiFile Added: Openbravo.properties
2018-06-19 10:07ALopeteguiAssigned ToALopetegui => alostale
2018-06-19 10:07ALopeteguiStatusfeedback => new
2018-06-19 10:07ALopeteguiNote Edited: 0105212bug_revision_view_page.php?bugnote_id=0105212#r17320
2018-06-19 13:21alostaleFile Deleted: Openbravo.properties
2018-06-19 14:01ALopeteguiFile Added: Openbravo.properties
2018-07-06 13:00hgbotCheckin
2018-07-06 13:00hgbotNote Added: 0105659
2018-07-06 13:00hgbotCheckin
2018-07-06 13:00hgbotNote Added: 0105660
2018-07-06 13:24alostaleNote Added: 0105663
2018-07-06 13:24alostaleAssigned Toalostale => ALopetegui
2018-07-06 13:24alostaleStatusnew => feedback
2018-08-08 13:06hudsonbotCheckin
2018-08-08 13:06hudsonbotNote Added: 0106207
2018-08-08 13:06hudsonbotCheckin
2018-08-08 13:06hudsonbotNote Added: 0106208
2018-09-11 11:10ALopeteguiNote Added: 0106680
2018-09-11 11:11ALopeteguiFile Added: 38671_log.txt
2018-09-11 11:13ALopeteguiAssigned ToALopetegui => hudsonbot
2018-09-11 11:14ALopeteguiNote Edited: 0106680bug_revision_view_page.php?bugnote_id=0106680#r17615
2019-09-23 11:48alostaleAssigned Tohudsonbot => alostale
2019-09-23 11:48alostaleStatusfeedback => new
2019-09-23 11:48alostaleSeveritymajor => minor
2019-09-23 11:49alostaleReproducibilityhave not tried => random
2019-09-23 11:49alostaleOS5 =>
2019-09-23 11:49alostaleSummaryNull Pointer getting data for several columns in FormInitializationComponent => random NPE getting data for some date/datetime fields
2019-09-24 08:32hgbotCheckin
2019-09-24 08:32hgbotNote Added: 0114743
2019-09-24 08:32hgbotStatusnew => resolved
2019-09-24 08:32hgbotResolutionopen => fixed
2019-09-24 08:32hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/734a9b482068f14842bf1d880690d28c8f1e6baf [^]
2019-09-24 08:32hgbotCheckin
2019-09-24 08:32hgbotNote Added: 0114744
2019-09-24 08:32hgbotCheckin
2019-09-24 08:32hgbotNote Added: 0114745
2019-09-24 08:33alostaleReview Assigned To => caristu
2019-09-24 08:33alostaleOS0 =>
2019-09-24 14:56hudsonbotCheckin
2019-09-24 14:56hudsonbotNote Added: 0114760
2019-09-24 14:56hudsonbotCheckin
2019-09-24 14:56hudsonbotNote Added: 0114761
2019-09-24 14:56hudsonbotCheckin
2019-09-24 14:56hudsonbotNote Added: 0114762
2019-09-27 15:08caristuNote Added: 0114847
2019-09-27 15:08caristuStatusresolved => closed
2019-09-27 15:08caristuFixed in Version => 3.0PR19Q4
2020-07-27 07:14alostaleRelationship addedcauses 0044640
2020-07-27 12:03alostaleRelationship addedcauses 0044574

Notes
(0104910)
ALopetegui   
2018-06-04 12:06   
There is another similar log repeating with several colums.
The difference is Couldn't get the value for colum instead of Couldn't get data for column

cdb72c84 2018-06-02 14:23:43,518 [ajp-nio-127.0.0.1-8009-exec-1] ERROR org.openbravo.client.application.window.FormInitializationComponent - Couldn't get the value for column Created
java.lang.NullPointerException
        at org.openbravo.client.kernel.reference.DateTimeUIDefinition.getClassicFormat(DateTimeUIDefinition.java:84)
        at org.openbravo.client.kernel.reference.DateTimeUIDefinition.convertLocalDateTimeToUTC(DateTimeUIDefinition.java:76)
        at org.openbravo.client.kernel.reference.DateTimeUIDefinition.convertToClassicString(DateTimeUIDefinition.java:63)
        at org.openbravo.client.application.window.FormInitializationComponent.setValueOfColumnInRequest(FormInitializationComponent.java:1317)
        at org.openbravo.client.application.window.FormInitializationComponent.setValuesInRequest(FormInitializationComponent.java:1026)
        at org.openbravo.client.application.window.FormInitializationComponent.execute(FormInitializationComponent.java:255)
        at org.openbravo.client.kernel.BaseActionHandler.execute(BaseActionHandler.java:73)
        at org.openbravo.client.kernel.KernelServlet.processActionRequest(KernelServlet.java:314)
        at org.openbravo.client.kernel.KernelServlet.doGet(KernelServlet.java:206)
        at org.openbravo.client.kernel.KernelServlet.doPost(KernelServlet.java:287)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:648)
        at org.openbravo.base.HttpBaseServlet.serviceInitialized(HttpBaseServlet.java:228)
        at org.openbravo.base.secureApp.HttpSecureAppServlet.service(HttpSecureAppServlet.java:461)
        at org.openbravo.client.kernel.BaseKernelServlet.callServiceInSuper(BaseKernelServlet.java:87)
        at org.openbravo.client.kernel.BaseKernelServlet.service(BaseKernelServlet.java:58)
        at org.openbravo.client.kernel.KernelServlet.service(KernelServlet.java:168)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
        at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
        at org.openbravo.utils.SessionExpirationFilter.doFilter(SessionExpirationFilter.java:66)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
        at org.openbravo.utils.CharsetFilter.doFilter(CharsetFilter.java:35)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
        at org.openbravo.client.kernel.KernelFilter$1.doAction(KernelFilter.java:62)
        at org.openbravo.dal.core.ThreadHandler.run(ThreadHandler.java:46)
        at org.openbravo.client.kernel.KernelFilter.doFilter(KernelFilter.java:71)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
        at org.openbravo.dal.core.DalRequestFilter$1.doAction(DalRequestFilter.java:81)
        at org.openbravo.dal.core.ThreadHandler.run(ThreadHandler.java:46)
        at org.openbravo.dal.core.DalRequestFilter.doFilter(DalRequestFilter.java:103)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:94)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:509)
        at org.apache.coyote.ajp.AbstractAjpProcessor.process(AbstractAjpProcessor.java:877)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:684)
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1524)
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1480)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
        at java.lang.Thread.run(Thread.java:745)
(0104914)
alostale   
2018-06-04 13:45   
Are date/time formats correctly configured in that instance [1]?

[1] http://wiki.openbravo.com/wiki/Openbravo.properties#Date.2Ftime_format [^]
(0104927)
ALopetegui   
2018-06-04 19:29   
Yes, I think date/time are correctly configured in its four nodes, it has a load balancer and 4 nodes.

I all nodes:

####################
# Date/time format #
####################

dateFormat.js=%d-%m-%Y
dateFormat.sql=DD-MM-YYYY
dateFormat.java=dd-MM-yyyy
dateTimeFormat.java=dd-MM-yyyy HH:mm:ss
dateTimeFormat.sql=DD-MM-YYYY HH24:MI:SS
(0105176)
alostale   
2018-06-15 11:27   
Check how those values get into session:
1. Log in as System Admin
2. Open Session Variables window
3. Look for value of #AD_JAVADATETIMEFORMAT object

It also might be useful to provide full Openbravo.properties to try to reproduce
(0105212)
ALopetegui   
2018-06-19 10:03   
(edited on: 2018-06-19 10:07)
AD_JAVADATETIMEFORMAT
value: dd-MM-yyyy HH:mm:ss
Preference: NO
Global: Yes
Acounting:NO


Attached Openbravo.porperties file

(0105659)
hgbot   
2018-07-06 13:00   
Repository: erp/devel/pi
Changeset: 8cdf0c74bec6775d7ff27e873b5840fa7895c561
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Fri Jul 06 12:52:33 2018 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/8cdf0c74bec6775d7ff27e873b5840fa7895c561 [^]

related with issue 38671: removed unused parameter

  field param in FIC.setValueOfColumnInRequest was always null, so no need to
  have it.

---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java
---
(0105660)
hgbot   
2018-07-06 13:00   
Repository: erp/devel/pi
Changeset: eed99aa47f9b71d8a986718db28ce3ecf76af2e7
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Fri Jul 06 12:59:08 2018 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/eed99aa47f9b71d8a986718db28ce3ecf76af2e7 [^]

related to bug 38671: added context information to log in case of failure

---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java
---
(0105663)
alostale   
2018-07-06 13:24   
I cannot reproduce this issue with provided properties.

Please apply changesets associated with this issue in order to add more context information to logs when error occurs, in this way we'll be able to understand where the problem is actually happening.
(0106208)
hudsonbot   
2018-08-08 13:06   
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/bfd7a414183a [^]
Maturity status: Test
(0106207)
hudsonbot   
2018-08-08 13:06   
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/bfd7a414183a [^]
Maturity status: Test
(0106680)
ALopetegui   
2018-09-11 11:10   
(edited on: 2018-09-11 11:14)
Recomended changesets are already applied in production. I attach the log of those errors. 38671_log.txt
There is 3 type of errors related to the issue.

with new log, can we know what the problem is?

(0114743)
hgbot   
2019-09-24 08:32   
Repository: erp/devel/pi
Changeset: 734a9b482068f14842bf1d880690d28c8f1e6baf
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Mon Sep 23 09:58:51 2019 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/734a9b482068f14842bf1d880690d28c8f1e6baf [^]

fixed bug 38671: NPE in FIC getting values for date fields

  When FIC tries to get values for date columns a NPE was trhown in case date
  format was not present in session (?).

  Data format is set in session from Openbravo.properties, so it never changes
  there is no need to retrieve it from session.

---
M modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/AbsoluteDateTimeUIDefinition.java
M modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/DateTimeUIDefinition.java
M modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/DateUIDefinition.java
---
(0114744)
hgbot   
2019-09-24 08:32   
Repository: erp/devel/pi
Changeset: c034c6516fc5281da6a28021a1e1b10347683e3d
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Mon Sep 23 10:02:09 2019 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/c034c6516fc5281da6a28021a1e1b10347683e3d [^]

related to bug 38671: added proper synchronization

  SimpleDateFormat is not threadsafe, it needs to be synchronized for formatting.

---
M modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/DateTimeUIDefinition.java
---
(0114745)
hgbot   
2019-09-24 08:32   
Repository: erp/devel/pi
Changeset: 930f389bdcbf91cc746c9519911d4dc15c18b177
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Mon Sep 23 11:45:02 2019 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/930f389bdcbf91cc746c9519911d4dc15c18b177 [^]

related to bug 38671: use format in Openbravo.properties in other places

  There were other places that created a SimpleDateFormat directly from format
  stored in session. They have been replaced to use the same mechanism defined
  in DateUIDefinition.

---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/OBBindings.java
M modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/DateUIDefinition.java
M modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/UIDefinitionController.java
M modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/DataSourceServlet.java
M modules/org.openbravo.userinterface.selector/src/org/openbravo/userinterface/selector/SelectorDataSourceFilter.java
---
(0114760)
hudsonbot   
2019-09-24 14:56   
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/fab39d1f8dc5 [^]
Maturity status: Test
(0114761)
hudsonbot   
2019-09-24 14:56   
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/fab39d1f8dc5 [^]
Maturity status: Test
(0114762)
hudsonbot   
2019-09-24 14:56   
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/fab39d1f8dc5 [^]
Maturity status: Test
(0114847)
caristu   
2019-09-27 15:08   
Reviewed