Project:
| View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
| ID | ||||||||
| 0044871 | ||||||||
| Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
| defect | [Openbravo ERP] A. Platform | major | always | 2020-08-24 09:06 | 2020-08-24 20:07 | |||
| Reporter | joniturralde93 | View Status | public | |||||
| Assigned To | platform | |||||||
| Priority | urgent | Resolution | out of date | Fixed in Version | ||||
| Status | closed | Fix in branch | Fixed in SCM revision | |||||
| Projection | none | ETA | none | Target Version | ||||
| OS | Any | Database | Any | Java version | ||||
| OS Version | Database version | Ant version | ||||||
| Product Version | SCM revision | |||||||
| Merge Request Status | ||||||||
| Review Assigned To | ||||||||
| OBNetwork customer | Gold | |||||||
| Web browser | ||||||||
| Modules | Core | |||||||
| Support ticket | 17758 | |||||||
| Regression level | ||||||||
| Regression date | ||||||||
| Regression introduced in release | ||||||||
| Regression introduced by commit | ||||||||
| Triggers an Emergency Pack | No | |||||||
| Summary | 0044871: Callout SE_Invoice_BPartner doesn't work when there is too much data | |||||||
| Description | When selecting a business partner when creating a sales invoice, the callout won't work for too much data, specifically number of vendors (users marked as vendors and related to a business partner). The business partner gets selected, but the related fields are not automatically selected (payment method and payment terms). This is the error shown in openbravo.log: 2020-08-22 05:49:07,863 [http-194] ERROR org.openbravo.client.application.window.FormInitializationComponent - Couldn't parse callout response. The parsed response was: var calloutName='SE_Invoice_BPartner'; (...) org.mozilla.javascript.EvaluatorException: Encountered code generation error while compiling script: generated bytecode for method exceeds 64K limit. (<cmd>#1) at org.mozilla.javascript.DefaultErrorReporter.runtimeError(DefaultErrorReporter.java:109) at org.mozilla.javascript.Context.reportRuntimeError(Context.java:938) at org.mozilla.javascript.optimizer.Codegen.reportClassFileFormatException(Codegen.java:196) at org.mozilla.javascript.optimizer.Codegen.generateCode(Codegen.java:329) at org.mozilla.javascript.optimizer.Codegen.compileToClassFile(Codegen.java:182) at org.mozilla.javascript.optimizer.Codegen.compile(Codegen.java:91) at org.mozilla.javascript.Context.compileImpl(Context.java:2391) at org.mozilla.javascript.Context.compileString(Context.java:1359) at org.mozilla.javascript.Context.compileString(Context.java:1348) at org.mozilla.javascript.Context.evaluateString(Context.java:1101) at org.openbravo.client.application.window.FormInitializationComponent.parseCalloutResponse(FormInitializationComponent.java:1744) at org.openbravo.client.application.window.FormInitializationComponent.runCallouts(FormInitializationComponent.java:1540) at org.openbravo.client.application.window.FormInitializationComponent.executeCallouts(FormInitializationComponent.java:1444) at org.openbravo.client.application.window.FormInitializationComponent.execute(FormInitializationComponent.java:276) This error means that the javascript generated by FormInitializationComponent is too large (Rhino javascript engine doesn't support that). In our case, there were 1772 results when executing this query: select count(1) from ad_user inner join c_bpartner on ad_user.c_bpartner_id=c_bpartner.c_bpartner_id where issalesrep='Y' and ad_user.isactive='Y'; After we set as inactive the ones created in the last days (440 records), the callout started working again. | |||||||
| Steps To Reproduce | - Configure a lot of vendors (active users with a business partner assigned which has "sales representative" checked), in our case there were 1772 - Create a sales invoice - Select a business partner - The callout doesn't work, the related fields are not automatically selected and there is an error in openbravo.log | |||||||
| Proposed Solution | In this case, in my opinion the first thing would be to review the callout, because the code that is generating a very large amount of data (the ComboTableData call to read the sales representatives) maybe is not needed, as the new selectors should already compute this information in a lazy way if I'm not mistaken | |||||||
| Tags | No tags attached. | |||||||
| Attached Files | ||||||||
Relationships [ Relation Graph ]
[ Dependency Graph ]
|
||||||||
|
||||||||
Notes |
|
|
(0122304) AugustoMauch (administrator) 2020-08-24 13:45 |
The client where this issue was reproduced has a very old Openbravo version (18Q3). We no longer use Rhino to evaluate the response of the callouts [1], and also the callout in question was reimplemented as a SimpleCallout, like many others [2] [1] https://issues.openbravo.com/view.php?id=40535 [^] [2] https://issues.openbravo.com/view.php?id=36067 [^] |
|
(0122317) AugustoMauch (administrator) 2020-08-24 20:06 |
Hello, My previous assessment was not correct. Those callouts I mentioned are already reimplemented in the 18Q3 version, the problem here is that there are some custom callouts (FE_Invoice_BPartner) that overwrites SE_Invoice_BPartner but that is still using the old callout technology. The next step should be to reimplemente that callout like SE_Invoice_BPartner was reimplemented |
|
(0122318) AugustoMauch (administrator) 2020-08-24 20:07 |
To look for other callouts that use the deprecated technology, the following command can be executed on the modules/ folder: grep -Ir --exclude="*productImages/*" 'var respuesta' . | less |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2020-08-24 09:06 | joniturralde93 | New Issue | |
| 2020-08-24 09:06 | joniturralde93 | Assigned To | => platform |
| 2020-08-24 09:06 | joniturralde93 | OBNetwork customer | => Gold |
| 2020-08-24 09:06 | joniturralde93 | Modules | => Core |
| 2020-08-24 09:06 | joniturralde93 | Support ticket | => 17758 |
| 2020-08-24 09:06 | joniturralde93 | Resolution time | => 1600034400 |
| 2020-08-24 09:06 | joniturralde93 | Triggers an Emergency Pack | => No |
| 2020-08-24 09:09 | marvintm | Proposed Solution updated | |
| 2020-08-24 09:42 | joniturralde93 | Relationship added | related to 0020455 |
| 2020-08-24 13:45 | AugustoMauch | Note Added: 0122304 | |
| 2020-08-24 13:45 | AugustoMauch | Status | new => closed |
| 2020-08-24 13:45 | AugustoMauch | Resolution | open => out of date |
| 2020-08-24 20:06 | AugustoMauch | Note Added: 0122317 | |
| 2020-08-24 20:07 | AugustoMauch | Note Added: 0122318 | |
| Copyright © 2000 - 2009 MantisBT Group |