Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0035561
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformminorhave not tried2017-03-17 14:092017-03-20 23:12
ReporteralostaleView Statuspublic 
Assigned Toalostale 
PriorityimmediateResolutionfixedFixed in Version3.0PR17Q2
StatusclosedFix in branchFixed in SCM revision0f00bec42b48
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tocaristu
Web browser
ModulesCore
Regression levelPre packaging ( pi )
Regression date2017-01-30
Regression introduced in releasepi
Regression introduced by commithttp://code.openbravo.com/erp/devel/pi/rev/72cf9d166978c4cf23b1fd261fb81728e65172bc [^]
Triggers an Emergency PackNo
Summary

0035561: logged NPE in audit trail creating tickets from POS

DescriptionHaving activated audit trail and using tomcat jdbc pool, a NPE is logged whenever a ticket is created from POS.

Though this is logged, it has no effect as the error is properly handled.

Steps To Reproduce1. In a retail instance activate audit trail for c_order
2. Create a ticket in WebPOS
  -> check logs:
ERROR org.openbravo.database.SessionInfo - Error setting audit info
java.lang.NullPointerException
    at java.lang.reflect.Proxy.getInvocationHandler(Proxy.java:815)
    at org.apache.tomcat.jdbc.pool.DisposableConnectionFacade.invoke(DisposableConnectionFacade.java:64)
    at com.sun.proxy.$Proxy24.equals(Unknown Source)
    at org.openbravo.database.SessionInfo.saveContextInfoIntoDB(SessionInfo.java:221)
    at org.openbravo.dal.service.OBDal.flush(OBDal.java:258)
    at org.openbravo.dal.service.OBDal.getConnection(OBDal.java:185)
    at org.openbravo.dal.service.OBDal.getConnection(OBDal.java:169)
    at org.openbravo.mobile.core.process.DataSynchronizationProcess.saveRecord(DataSynchronizationProcess.java:253)
    at org.openbravo.mobile.core.process.DataSynchronizationProcess.exec(DataSynchronizationProcess.java:153)
    at org.openbravo.mobile.core.process.DataSynchronizationProcess.exec(DataSynchronizationProcess.java:85)
    at org.openbravo.mobile.core.process.MobileImportEntryProcessorRunnable.processEntry(MobileImportEntryProcessorRunnable.java:42)
    at org.openbravo.retail.posterminal.importprocess.OrderImportEntryProcessor$OrderLoaderRunnable.processEntry(OrderImportEntryProcessor.java:59)
    at org.openbravo.service.importprocess.ImportEntryProcessor$ImportEntryProcessRunnable.doRunCycle(ImportEntryProcessor.java:370)
    at org.openbravo.service.importprocess.ImportEntryProcessor$ImportEntryProcessRunnable.run(ImportEntryProcessor.java:292)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
Proposed SolutionIt occurs for DB connections obtained from ImportEntryProcess, in this line of code:

if (conn.equals(sessionConnection.get())) {

The root cause of this problem is unknown and difficult to debug as it occurs in a proxy which code is not accessible com.sun.proxy.$Proxy24.equals(Unknown Source) which for some reason fails for ImpoertEntry connections.

This comparison can be safely replaced with a reference comparison, as the connection would always be the same instance to satisfy the if statemented.

TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
caused by design defect 0035007 closedalostale audit trail causes excessive overhead 

-  Notes
(0095378)
hgbot (developer)
2017-03-17 14:22

Repository: erp/devel/pi
Changeset: 0f00bec42b482af94926e6f16f6bc4997149fb3e
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Fri Mar 17 14:18:39 2017 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/0f00bec42b482af94926e6f16f6bc4997149fb3e [^]

fixed bug 35561: logged NPE in audit trail creating tickets from POS

  When connection was obtained by ImportEntry a NPE was logged while setting
  audit trail. In this situation the proxied connection fails when invoking
  its equals method.

  In this case, equals was not necessary as what we really want to check is
  we're working with the same connection instance.

---
M src-core/src/org/openbravo/database/SessionInfo.java
---
(0095381)
caristu (developer)
2017-03-17 15:00

Code reviewed + tested OK:

- The ticket is created correctly
- Audit Info is created correctly
- Exception is not thrown
(0095448)
hudsonbot (developer)
2017-03-20 23:12

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/ba27e12a1e16 [^]
Maturity status: Test

- Issue History
Date Modified Username Field Change
2017-03-17 14:09 alostale New Issue
2017-03-17 14:09 alostale Assigned To => alostale
2017-03-17 14:09 alostale Modules => Core
2017-03-17 14:09 alostale Regression level => Pre packaging ( pi )
2017-03-17 14:09 alostale Regression date => 2017-01-30
2017-03-17 14:09 alostale Regression introduced in release => pi
2017-03-17 14:09 alostale Regression introduced by commit => http://code.openbravo.com/erp/devel/pi/rev/72cf9d166978c4cf23b1fd261fb81728e65172bc [^]
2017-03-17 14:09 alostale Triggers an Emergency Pack => No
2017-03-17 14:10 alostale Relationship added caused by 0035007
2017-03-17 14:10 alostale Review Assigned To => caristu
2017-03-17 14:22 hgbot Checkin
2017-03-17 14:22 hgbot Note Added: 0095378
2017-03-17 14:22 hgbot Status new => resolved
2017-03-17 14:22 hgbot Resolution open => fixed
2017-03-17 14:22 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/0f00bec42b482af94926e6f16f6bc4997149fb3e [^]
2017-03-17 15:00 caristu Note Added: 0095381
2017-03-17 15:00 caristu Status resolved => closed
2017-03-17 15:00 caristu Fixed in Version => 3.0PR17Q2
2017-03-20 23:12 hudsonbot Checkin
2017-03-20 23:12 hudsonbot Note Added: 0095448


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker