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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0041892
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformminorhave not tried2019-09-26 17:072019-09-27 15:35
ReporteralostaleView Statuspublic 
Assigned Toalostale 
PriorityimmediateResolutionfixedFixed in Version3.0PR19Q4
StatusclosedFix in branchFixed in SCM revision38a0a6f1f23a
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tocaristu
Web browser
ModulesCore
Regression levelProduction - Confirmed Stable
Regression date2018-11-22
Regression introduced in release3.0PR19Q1
Regression introduced by commithttps://code.openbravo.com/erp/devel/pi/rev/4d71d9e4d6d5c9be49d1a301da6dbeefeb5d9048 [^]
Triggers an Emergency PackNo
Summary

0041892: Masked String reference can leave ADCS in an inconsitent state

DescriptionWindows with tabs with fields which columns have a Masked String reference can lead the system to an inconsistent state making fail that windows generation.

ADCS does not completely initialize those references.
Steps To ReproducePreparation
1. As Sys Admin
2. Edit Organization table, description column
3. Change its reference to Masked String
4. Add a sub reference to a new mask
5. Set all modules as not in development
6. Restart Tomcat

Steps
1. Open Organization window (to cache window definition in browser)
2. Restart Tomcat
3. Log in with the same browser, open any record in Organization window (to trigger ADCS partial initialization through FIC)
4. In a different browser log in and open Organization window (to generate Organization view consuming partially initialized ADCS)
ERROR:

Caused by: java.lang.IllegalStateException: freemarker.template.TemplateModelException: get(fieldProperties) failed on instance of org.openbravo.client.application.window.OBViewFieldHandler$OBViewField
    at org.openbravo.client.kernel.freemarker.FreemarkerTemplateProcessor.processTemplate(FreemarkerTemplateProcessor.java:70) ~[classes/:?]
...
Caused by: org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: ADReference.oBCLKERREFMASKList, could not initialize proxy - no Session
    at org.hibernate.collection.internal.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:602) ~[hibernate-core-5.4.2.Final.jar:5.4.2.Final]
    at org.hibernate.collection.internal.AbstractPersistentCollection.withTemporarySessionIfNeeded(AbstractPersistentCollection.java:217) ~[hibernate-core-5.4.2.Final.jar:5.4.2.Final]
    at org.hibernate.collection.internal.AbstractPersistentCollection.readSize(AbstractPersistentCollection.java:161) ~[hibernate-core-5.4.2.Final.jar:5.4.2.Final]
    at org.hibernate.collection.internal.PersistentBag.size(PersistentBag.java:287) ~[hibernate-core-5.4.2.Final.jar:5.4.2.Final]
    at org.openbravo.client.kernel.reference.MaskedStringUIDefinition.getFieldProperties(MaskedStringUIDefinition.java:34) ~[classes/:?]
    at org.openbravo.client.application.window.OBViewFieldHandler$OBViewField.getFieldProperties(OBViewFieldHandler.java:1435) ~[classes/:?]
Proposed SolutionWorkaround while the problem is not solved:
1) Download jmxterm-1.0.1-uber.jar
2) java -jar jmxterm-1.0.1-uber.jar
3) open <PID>
4) bean
Openbravo:context=<contexto>,name=ApplicationDictionaryCachedStructures
5) run resetCache

** to the step 3) open <PID>: execute the "jps" command. It returns an id, to use.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0041338 closedalostale error when opening some backoffice windows 
depends on backport 00418933.0PR19Q3.1 closedalostale Masked String reference can leave ADCS in an inconsitent state 
depends on backport 00418943.0PR19Q2.3 closedalostale Masked String reference can leave ADCS in an inconsitent state 
caused by design defect 0039670 closedalostale view generation scalability issues 

-  Notes
(0114833)
hgbot (developer)
2019-09-27 10:14

Repository: erp/devel/pi
Changeset: e20c28462cb98f02fa9a628075cb7ef0feeaf6b8
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Fri Sep 27 09:53:09 2019 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/e20c28462cb98f02fa9a628075cb7ef0feeaf6b8 [^]

related to issue 41892: added test case

---
M modules/org.openbravo.client.application/src-test/org/openbravo/client/application/test/ADCSTest.java
---
(0114834)
hgbot (developer)
2019-09-27 10:14

Repository: erp/devel/pi
Changeset: 38a0a6f1f23a01f3c42706bc6893197dcc861640
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Fri Sep 27 09:56:29 2019 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/38a0a6f1f23a01f3c42706bc6893197dcc861640 [^]

fixed bug 41892: Masked String reference can leave ADCS in an inconsitent state

  Masked String reference was partially initialized in ADCS, causing errors when
  a record in a tab with this reference triggered ADCS initialization for that
  window and later a view definition for the same window was requested.

  Now we are eagerly initializating masked string references.

---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/window/ApplicationDictionaryCachedStructures.java
---
(0114835)
caristu (developer)
2019-09-27 10:53

Code reviewed + tested OK.
(0114851)
hudsonbot (developer)
2019-09-27 15:35

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/9bb02a9054b3 [^]
Maturity status: Test
(0114852)
hudsonbot (developer)
2019-09-27 15:35

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

- Issue History
Date Modified Username Field Change
2019-09-26 17:07 alostale New Issue
2019-09-26 17:07 alostale Assigned To => platform
2019-09-26 17:07 alostale Modules => Core
2019-09-26 17:07 alostale Triggers an Emergency Pack => No
2019-09-26 17:08 alostale Regression level => Production - Confirmed Stable
2019-09-26 17:08 alostale Regression date => 2018-11-22
2019-09-26 17:08 alostale Regression introduced in release => 3.0PR19Q1
2019-09-26 17:08 alostale Regression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/4d71d9e4d6d5c9be49d1a301da6dbeefeb5d9048 [^]
2019-09-26 17:08 alostale Relationship added caused by 0039670
2019-09-26 17:09 alostale Relationship added related to 0041338
2019-09-26 17:10 alostale Steps to Reproduce Updated View Revisions
2019-09-26 17:11 alostale Proposed Solution updated
2019-09-26 17:12 alostale Review Assigned To => caristu
2019-09-26 17:12 alostale Assigned To platform => alostale
2019-09-26 17:12 alostale Priority normal => immediate
2019-09-26 17:14 alostale Status new => scheduled
2019-09-27 09:50 alostale Steps to Reproduce Updated View Revisions
2019-09-27 10:14 hgbot Checkin
2019-09-27 10:14 hgbot Note Added: 0114833
2019-09-27 10:14 hgbot Checkin
2019-09-27 10:14 hgbot Note Added: 0114834
2019-09-27 10:14 hgbot Status scheduled => resolved
2019-09-27 10:14 hgbot Resolution open => fixed
2019-09-27 10:14 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/38a0a6f1f23a01f3c42706bc6893197dcc861640 [^]
2019-09-27 10:53 caristu Note Added: 0114835
2019-09-27 10:53 caristu Status resolved => closed
2019-09-27 10:53 caristu Fixed in Version => 3.0PR19Q4
2019-09-27 15:35 hudsonbot Checkin
2019-09-27 15:35 hudsonbot Note Added: 0114851
2019-09-27 15:35 hudsonbot Checkin
2019-09-27 15:35 hudsonbot Note Added: 0114852


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker