Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0015638Openbravo ERP01. General setuppublic2011-01-13 12:062011-02-28 22:53
jonalegriaesarte 
adrianromero 
urgentmajoralways
closedfixed 
5
2.50MP25 
2.50MP272.50MP27 
Core
No
0015638: When you create a lot of organizations assigned to a role, the processes do not work
When you create a lot of organizations assigned to a role, the processes do not work
- Create 400 organizations assigned to a role.
- Identify in Openbravo ERP with this role
- Financial Management || Accounting || Setup || Fiscal Calendar
- Create a new calendar
- Year
- Launch "Create Periods" process.
- Error "ORA-01461: can bind a LONG value only for insert into a LONG column " appears
The problem is in org.openbravo.scheduling.ProcessRunner, because it tries to store all the organizations separated by commas in the database.

Probably the solution is just to change the type of the column OB_CONTEXT of the table AD_PROCESS_REQUEST from VARCHAR(4000) to LONG
No tags attached.
blocks defect 0015940 closed adrianromero When you create a lot of organizations assigned to a role, the processes do not work 
Issue History
2011-01-13 12:06jonalegriaesarteNew Issue
2011-01-13 12:06jonalegriaesarteAssigned To => adrianromero
2011-01-13 12:06jonalegriaesarteModules => Core
2011-01-13 12:07jonalegriaesarteIssue Monitored: networkb
2011-02-07 10:37jonalegriaesarteNote Added: 0034065
2011-02-07 10:47jonalegriaesarteNote Added: 0034066
2011-02-07 12:27adrianromeroProposed Solution updated
2011-02-09 13:27adrianromeroTarget Version2.50MP26 => 2.50MP27
2011-02-10 16:35adrianromeroStatusnew => scheduled
2011-02-10 16:35adrianromerofix_in_branch => pi
2011-02-10 16:35adrianromeroTypedefect => backport
2011-02-10 16:35adrianromerofix_in_branchpi =>
2011-02-10 16:36adrianromeroIssue cloned0015940
2011-02-10 16:36adrianromeroRelationship addedblocks 0015940
2011-02-16 12:05hgbotCheckin
2011-02-16 12:05hgbotNote Added: 0034224
2011-02-16 12:05hgbotStatusscheduled => resolved
2011-02-16 12:05hgbotResolutionopen => fixed
2011-02-16 12:05hgbotFixed in SCM revision => http://code.openbravo.com/erp/stable/2.50/rev/9679d1715f3b0913838c2cb5d3472eaec8fbe497 [^]
2011-02-16 12:22adrianromeroNote Added: 0034226
2011-02-28 20:06jonalegriaesarteNote Added: 0034447
2011-02-28 20:06jonalegriaesarteStatusresolved => closed
2011-02-28 20:06jonalegriaesarteFixed in Version => 2.50MP27
2011-02-28 22:53dalsasuaNote Added: 0034449

Notes
(0034065)
jonalegriaesarte   
2011-02-07 10:37   
The same problem occurs when trying to schedule a new process. The error is:

ERROR
org.openbravo.scheduling.ProcessRequestData - SQL error in query: UPDATE
AD_Process_Request SET Updatedby = ?, AD_User_ID = ?, Status = substr(?, 1,
60), Channel = substr(?, 1, 20), Previous_Fire_Time = TO_TIMESTAMP(?, ?),
Next_Fire_Time = TO_TIMESTAMP(?, ?), Scheduled_Finish = TO_TIMESTAMP(?, ?),
Ob_Context = ? WHERE AD_Process_Request_ID =
?Exception:java.sql.SQLException: ORA-01461: can bind a LONG value only for insert into a LONG column " appears

So the problem is the same, because the process is trying to update a value in Ob_Context column bigger that the column size (because of the big amount of organizations)
(0034066)
jonalegriaesarte   
2011-02-07 10:47   
This second problem is in org.openbravo.scheduling.ProcessMonitor in line

ProcessRequestData.update(getConnection(), ctx.getUser(), ctx.getUser(), SCHEDULED, bundle
          .getChannel().toString(), null, null, null, null, ctx.toString(), trigger.getName());

the problem is in parameter ctx.toString()
(0034224)
hgbot   
2011-02-16 12:05   
Repository: erp/stable/2.50
Changeset: 9679d1715f3b0913838c2cb5d3472eaec8fbe497
Author: Adrián Romero <adrianromero <at> openbravo.com>
Date: Wed Feb 16 12:03:08 2011 +0100
URL: http://code.openbravo.com/erp/stable/2.50/rev/9679d1715f3b0913838c2cb5d3472eaec8fbe497 [^]

Fixes issue 0015638: When you create a lot of organizations assigned to a role, the processes do not work
It has been modified the type of the OB_CONTEXT column to CLOB

---
M src-db/database/model/tables/AD_PROCESS_REQUEST.xml
---
(0034226)
adrianromero   
2011-02-16 12:22   
* Testing the issue

Follow the steps to test and verify that the process can be executed. Test also that processes can be scheduled too.

* Other areas affected.

Areas related to the execution of processes can be affected. There must be reviewed all different areas.
(0034447)
jonalegriaesarte   
2011-02-28 20:06   
Verified
(0034449)
dalsasua   
2011-02-28 22:53   
Verified with > 500 organizations