Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0016313Openbravo ERP01. General setuppublic2011-03-15 17:372011-03-17 00:00
adrianromero 
adrianromero 
highminoralways
closedfixed 
5
pi 
3.0RC6 
Core
No
0016313: When importing a big number of POS orders (500 different orders with 2 lines each) an appears
When importing a big number of POS orders (500 different orders with 2 lines each) an appears. The error is:
ERROR org.openbravo.erpCommon.ad_process.ImportProcessData - SQL error in query: UPDATE AD_PInstance SET IsProcessing='N', Updated=to_date(now()), Result=to_number(?), ErrorMsg=TO_CHAR(?) WHERE AD_PInstance_ID = ?Exception:org.postgresql.util.PSQLException: ERROR: value too long for type character varying(2000)
ERROR org.openbravo.erpCommon.ad_process.ImportProcess - Unable to unlock instance - javax.servlet.ServletException: @CODE=0@ERROR: value too long for type character varying(2000)

The problem is in the ErrorMsg column, because the message is bigger than the column size.
- Master Data Management || Import Data || Import Orders
- Import 1000 lines (500 different orders)
- The process fails
The column type MsgText could be changed to LONG
No tags attached.
blocks backport 00159832.50MP28 closed adrianromero When importing a big number of POS orders (500 different orders with 2 lines each) an appears 
Issue History
2011-03-15 17:37adrianromeroNew Issue
2011-03-15 17:37adrianromeroAssigned To => adrianromero
2011-03-15 17:37adrianromeroModules => Core
2011-03-15 17:37adrianromeroIssue generated from0015983
2011-03-15 17:37adrianromeroRelationship addedblocks 0015983
2011-03-15 17:44hgbotCheckin
2011-03-15 17:44hgbotNote Added: 0034909
2011-03-15 17:44hgbotStatusnew => resolved
2011-03-15 17:44hgbotResolutionopen => fixed
2011-03-15 17:44hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/8965c2e909635e44e7e63b28b3a5a4d3761b8dcd [^]
2011-03-15 17:44adrianromeroNote Added: 0034910
2011-03-16 19:08jonalegriaesarteNote Added: 0034966
2011-03-16 19:08jonalegriaesarteStatusresolved => closed
2011-03-16 19:08jonalegriaesarteFixed in Version => 3.0RC6
2011-03-17 00:00anonymoussf_bug_id0 => 3217700

Notes
(0034909)
hgbot   
2011-03-15 17:44   
Repository: erp/devel/pi
Changeset: 8965c2e909635e44e7e63b28b3a5a4d3761b8dcd
Author: Adrián Romero <adrianromero <at> openbravo.com>
Date: Tue Mar 15 17:44:07 2011 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/8965c2e909635e44e7e63b28b3a5a4d3761b8dcd [^]

Fixes issue 0016313: When importing a big number of POS orders (500 different orders with 2 lines each) an appears
It has been protected the import code to not to save more than 2000 characters in the ErrorMsg field

---
M src-db/database/sourcedata/AD_MESSAGE.xml
M src/org/openbravo/erpCommon/ad_process/ImportOrder.java
M src/org/openbravo/erpCommon/ad_process/ImportProcess.java
---
(0034910)
adrianromero   
2011-03-15 17:44   
*Testing the issue

Follow the steps to test and verify that now it does not appear the error and the message generated is less than 2000 characters.

* Other areas affected

No other areas affected. It has only been modified the Import classes.

It has been implemented this fix instead of changing the type of the ErrorMsg field to long because the implemented fix is a local fix that does not affect any other area. To change the type of the ErrorMsg field would be more risky because it will affect globally to the execution of processes all over the application
(0034966)
jonalegriaesarte   
2011-03-16 19:08   
Verified