Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0020524Openbravo ERP07. Sales managementpublic2012-05-16 11:522012-05-17 15:05
fleroux 
Sandrahuguet 
normalmajoralways
closedunable to reproduce 
30Professional Appliance
3.0MP10.2 
 
Mozilla Firefox
Core
No
0020524: get a null error when saving an invoice line
when UPDATING an existing invoice line quantity i get a null pointer error
create an invoice line, save it, and then update th quantity field with a new value. hit save and you will see the null pointer error
606961 [http-8080-3] ERROR org.openbravo.base.exception.OBException - Exception when updating InvoiceLine(null)
java.lang.NullPointerException
    at java.util.Calendar.setTime(Calendar.java:1076)
    at org.openbravo.service.json.JsonToDataConverter.areDatesEqual(JsonToDataConverter.java:696)
    at org.openbravo.service.json.JsonToDataConverter.setData(JsonToDataConverter.java:366)
    at org.openbravo.service.json.JsonToDataConverter.toBaseOBObject(JsonToDataConverter.java:335)
    at org.openbravo.service.json.DefaultJsonDataService.update(DefaultJsonDataService.java:403)
    at org.openbravo.service.datasource.DefaultDataSourceService.update(DefaultDataSourceService.java:178)
    at org.openbravo.service.datasource.DataSourceServlet.doPut(DataSourceServlet.java:643)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:640)
    at org.openbravo.base.HttpBaseServlet.serviceInitialized(HttpBaseServlet.java:225)
    at org.openbravo.base.secureApp.HttpSecureAppServlet.service(HttpSecureAppServlet.java:460)
    at org.openbravo.client.kernel.BaseKernelServlet.callServiceInSuper(BaseKernelServlet.java:87)
    at org.openbravo.client.kernel.BaseKernelServlet.service(BaseKernelServlet.java:63)
    at org.openbravo.service.datasource.DataSourceServlet.service(DataSourceServlet.java:124)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.openbravo.utils.SessionExpirationFilter.doFilter(SessionExpirationFilter.java:66)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.openbravo.utils.CharsetFilter.doFilter(CharsetFilter.java:35)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    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:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    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:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
    at java.lang.Thread.run(Thread.java:680)
606962 [http-8080-3] ERROR org.openbravo.service.json.DefaultJsonDataService - Exception when updating InvoiceLine(null)
org.openbravo.base.exception.OBException: Exception when updating InvoiceLine(null)
    at org.openbravo.service.json.JsonToDataConverter.setData(JsonToDataConverter.java:373)
    at org.openbravo.service.json.JsonToDataConverter.toBaseOBObject(JsonToDataConverter.java:335)
    at org.openbravo.service.json.DefaultJsonDataService.update(DefaultJsonDataService.java:403)
    at org.openbravo.service.datasource.DefaultDataSourceService.update(DefaultDataSourceService.java:178)
    at org.openbravo.service.datasource.DataSourceServlet.doPut(DataSourceServlet.java:643)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:640)
    at org.openbravo.base.HttpBaseServlet.serviceInitialized(HttpBaseServlet.java:225)
    at org.openbravo.base.secureApp.HttpSecureAppServlet.service(HttpSecureAppServlet.java:460)
    at org.openbravo.client.kernel.BaseKernelServlet.callServiceInSuper(BaseKernelServlet.java:87)
    at org.openbravo.client.kernel.BaseKernelServlet.service(BaseKernelServlet.java:63)
    at org.openbravo.service.datasource.DataSourceServlet.service(DataSourceServlet.java:124)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.openbravo.utils.SessionExpirationFilter.doFilter(SessionExpirationFilter.java:66)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.openbravo.utils.CharsetFilter.doFilter(CharsetFilter.java:35)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    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:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    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:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
    at java.lang.Thread.run(Thread.java:680)
Caused by: java.lang.NullPointerException
    at java.util.Calendar.setTime(Calendar.java:1076)
    at org.openbravo.service.json.JsonToDataConverter.areDatesEqual(JsonToDataConverter.java:696)
    at org.openbravo.service.json.JsonToDataConverter.setData(JsonToDataConverter.java:366)
    ... 39 more
606965 [http-8080-3] INFO org.openbravo.erpCommon.utility.ErrorTextParserPOSTGRE - did not find constraint name for error message: Exception when updating InvoiceLine(null)
No tags attached.
related to defect 0020474 closed mtaal When you save a register in grid view, amounts fields change to the previous value 
Issue History
2012-05-16 11:52flerouxNew Issue
2012-05-16 11:52flerouxAssigned To => mirurita
2012-05-16 11:52flerouxWeb browser => Mozilla Firefox
2012-05-16 11:52flerouxModules => Core
2012-05-17 09:15SandrahuguetAssigned Tomirurita => Sandrahuguet
2012-05-17 09:16SandrahuguetRelationship addedrelated to 0020474
2012-05-17 11:35mtaalNote Added: 0048721
2012-05-17 13:31SandrahuguetStatusnew => scheduled
2012-05-17 13:31Sandrahuguetfix_in_branch => pi
2012-05-17 15:05SandrahuguetNote Added: 0048735
2012-05-17 15:05SandrahuguetStatusscheduled => closed
2012-05-17 15:05SandrahuguetResolutionopen => unable to reproduce

Notes
(0048721)
mtaal   
2012-05-17 11:35   
I can't reproduce it in pi. As a first change I propose that the areDatesEqual method in JsonToDataConverter should be able to handle null values.

Even with that change it seems strange that the dates is null, I guess that is an other issue, but it is difficult to find if not reproducable in pi. Maybe it is related to the 20474 issue, which I will solve shortly.

gr. Martin
(0048735)
Sandrahuguet   
2012-05-17 15:05   
This problem is not happening in 3.0MP10.2. In PI this problem was resolved in the issue 0020524, they are now both related.