Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||||
ID | |||||||||||
0047750 | |||||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | ||||||
design defect | [Openbravo ERP] A. Platform | major | have not tried | 2021-09-23 12:42 | 2022-02-01 08:07 | ||||||
Reporter | cberner | View Status | public | ||||||||
Assigned To | Triage Platform Base | ||||||||||
Priority | normal | Resolution | open | Fixed in Version | |||||||
Status | acknowledged | 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 | ||||||||||
Review Assigned To | |||||||||||
Web browser | |||||||||||
Modules | Core | ||||||||||
Regression level | |||||||||||
Regression date | |||||||||||
Regression introduced in release | |||||||||||
Regression introduced by commit | |||||||||||
Triggers an Emergency Pack | No | ||||||||||
Summary | 0047750: Warning attempts to update an immutable entity M_Transaction when running hibernate with warn log | ||||||||||
Description | If running Openbravo with hibernate log level set to warning(we currently have it on error only) it will show up a warning related with updating an immutable entity. Check the provided warning from log. Warning from log: 2021-08-20 11:39:05,353 [DefaultQuartzScheduler_Worker-1] WARN org.hibernate.internal.SessionImpl - HHH000487: The query: [ update MaterialMgmtMaterialTransaction as trx set trx.isProcessed = false where trx.isProcessed = true and trx.isCostCalculated = false and trx.costingStatus <> 'S' and trx.organization.id in (:orgs_0, :orgs_1, :orgs_2, :orgs_3, :orgs_4, :orgs_5, :orgs_6, :orgs_7, :orgs_8, :orgs_9, :orgs_10, :orgs_11)] attempts to update an immutable entity: [M_Transaction] | ||||||||||
Steps To Reproduce | 1. Modify log4j2-web.xml and set this property to warn, which previously was error: <Logger name="org.hibernate" level="warn"/> 2. Run tomcat and check logs after a minute or so. That warning should appear in the log. Alternatively: 1. Modify log4j2-web.xml and set this property to warn, which previously was error: <Logger name="org.hibernate" level="warn"/> 2. Open backoffice and login. 3. Go to Process Request 4. Add a new row with process "Costing Background process" and Timing: "Run immediatly" 5. Save it and schedule it, you should be able to see the logged warning. | ||||||||||
Proposed Solution | This is already reported to hibernate, we're waiting for a response on the status of the issue: https://hibernate.atlassian.net/browse/HHH-13860 [^] [^] However, we do have a workaround for this issue in particular, instead of doing a mass update query through hibernate, we could as a solution, use sqlc like in the same CostingBackground file in InitializeCostingMTransCostDateacctData.initializeCostingMTransCostDateacct(cp.getConnection(), cp); line | ||||||||||
Tags | No tags attached. | ||||||||||
Attached Files | |||||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | |||||||||||||||
|
Notes | |
(0132272) cberner (developer) 2021-10-08 12:30 |
This warning seems to be due to how we handle computed columns. We have 2 hibernate mapping classes when we define computed columns. For example: Order and Order_ComputedColumns, first one is mutable and the second one is read-only immutable. It seems that using Hibernate update hql queries through session.createQuery API results in the warning, because it checks both the first class, and also the class of the computed columns, although we don't modify any property on that second class. This is already reported to hibernate, we're waiting for a response on the status of the issue: https://hibernate.atlassian.net/browse/HHH-13860 [^] However, we do have a workaround for this issue in particular, instead of doing a mass update query through hibernate, we could as a solution, use sqlc like in the same CostingBackground file in InitializeCostingMTransCostDateacctData.initializeCostingMTransCostDateacct(cp.getConnection(), cp); line |
(0132414) cberner (developer) 2021-10-18 14:32 |
After talking with vmromanos, they'll probably remove the CostingBackground process in the near future, as such, we're marking this issue as aknowledged, waiting for 2 things: 1. Removal of CostingBackground process, and recheck that the warning doesn't exist anymore. 2. Fix from hibernate to this warning, when done update and recheck for this warning. Whatever happens first, this issue should be rechecked. |
Issue History | |||
Date Modified | Username | Field | Change |
2021-09-23 12:42 | cberner | New Issue | |
2021-09-23 12:42 | cberner | Assigned To | => platform |
2021-09-23 12:42 | cberner | Modules | => Core |
2021-09-23 12:42 | cberner | Triggers an Emergency Pack | => No |
2021-09-23 15:27 | shuehner | Issue Monitored: shuehner | |
2021-10-05 14:42 | cberner | Severity | minor => major |
2021-10-08 12:30 | cberner | Note Added: 0132272 | |
2021-10-13 14:26 | cberner | Steps to Reproduce Updated | View Revisions |
2021-10-13 14:26 | cberner | Proposed Solution updated | |
2021-10-18 14:32 | cberner | Note Added: 0132414 | |
2021-10-18 14:32 | cberner | Status | new => acknowledged |
2021-10-18 14:45 | cberner | Type | defect => design defect |
2021-10-18 14:45 | cberner | Relationship added | related to 0045969 |
2021-10-18 14:59 | cberner | Relationship added | blocks 0047873 |
2022-02-01 08:07 | alostale | Assigned To | platform => Triage Platform Base |
Copyright © 2000 - 2009 MantisBT Group |