Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0027903Openbravo ERP02. Master data managementpublic2014-10-17 14:212022-02-01 08:08
caristu 
Triage Platform Base 
highminoralways
newopen 
5
 
 
Core
No
0027903: Not possible to assign a characteristic subset having a tab under the [Characteristic Configuration] tab
Is not possible to assign a characteristic subset having a tab under the Characteristic Configuration tab.

The table used by this new tub must have a reference to the m_product_ch_conf table. (Attached table definition as example)

The following error is raised in the log: collection owner not associated with session.

This error is thrown because of the removal operations performed in the onUpdate event of the ProductCharacteristicEventHandler
1) Create the attached table
2) Define it in the application dictionary
3) Create a new tab under the "Characteristic Configuration" tab in the [Product] window (level number 3)
4) Recompile and Restart Tomcat
5) As group admin. Go to the [Product Characteristic] window and create a new variant characteristic with a subset with one value at least.
6) Go to the [Product] window. Create a new generic product. Navigate to the [Characteristics] tab and assign the characteristic created in step 5). Save the record.
7) Check that there are values in [Characteristic Configuration] tab created in step 5.
8) Now, in the [Characteristics] tab tries to assign a subset value in "Characteristic subset" field and try to save the record.
No tags attached.
related to design defect 0024287 closed platform Event Handler runs 2 times when the change is made by another Event Handler 
? tableExample.sql (1,138) 2014-10-17 14:22
https://issues.openbravo.com/file_download.php?file_id=7389&type=bug
Issue History
2014-10-17 14:21caristuNew Issue
2014-10-17 14:21caristuAssigned To => AugustoMauch
2014-10-17 14:21caristuModules => Core
2014-10-17 14:21caristuTriggers an Emergency Pack => No
2014-10-17 14:21caristuIssue Monitored: networkb
2014-10-17 14:22caristuSummaryNot possible to assign a characteristic subset having a tab under the Characteristic Configuration tab => Not possible to assign a characteristic subset having a tab under the [Characteristic Configuration] tab
2014-10-17 14:22caristuDescription Updatedbug_revision_view_page.php?rev_id=6835#r6835
2014-10-17 14:22caristuFile Added: tableExample.sql
2014-10-17 14:25caristuResolution time => 1416351600
2014-10-17 14:25caristuTarget Version => 3.0PR15Q1
2014-10-17 14:25caristuSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=6837#r6837
2014-10-17 14:48heccamIssue Monitored: heccam
2014-10-22 08:54alostaleAssigned ToAugustoMauch => inigosanchez
2014-11-11 17:44caristuSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=7014#r7014
2014-11-12 10:54inigosanchezSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=7029#r7029
2014-11-12 11:06inigosanchezNote Added: 0071593
2014-11-12 11:12inigosanchezAssigned Toinigosanchez => Sandrahuguet
2014-11-12 11:12inigosanchezCategoryA. Platform => 02. Master data management
2014-12-22 12:33vmromanosTarget Version3.0PR15Q1 => 3.0PR15Q2
2015-01-21 18:14aferrazAssigned ToSandrahuguet => AugustoMauch
2015-01-27 10:26alostaleRelationship addedrelated to 0024287
2015-01-28 10:11alostaleNote Added: 0073847
2015-01-28 10:18alostaleNote Added: 0073848
2015-01-28 10:18alostaleAssigned ToAugustoMauch => jonalegriaesarte
2015-01-28 10:18alostaleStatusnew => feedback
2015-02-04 11:51jonalegriaesarteResolution time1416351600 =>
2015-02-04 11:51jonalegriaesarteNote Added: 0074072
2015-02-04 11:51jonalegriaesarteAssigned Tojonalegriaesarte => alostale
2015-02-04 11:51jonalegriaesarteStatusfeedback => new
2015-02-04 11:51jonalegriaesarteTypedefect => design defect
2015-02-04 11:51jonalegriaesarteTarget Version3.0PR15Q2 =>
2017-04-10 14:35alostaleAssigned Toalostale => platform
2022-02-01 08:08alostaleAssigned Toplatform => Triage Platform Base

Notes
(0071593)
inigosanchez   
2014-11-12 11:06   
It seems that the error occurred when it tries to do flush operations after ProductCharacteristicEventHandler. The following error is raised in the log:


988530 [http-8080-2] ERROR org.hibernate.AssertionFailure - an assertion failure occured (this may indicate a bug in Hibernate, but is more likely due to unsafe use of the session)
org.hibernate.AssertionFailure: collection owner not associated with session: ProductCharacteristicConf.sUPSALARYList
    at org.hibernate.engine.Collections.processDereferencedCollection(Collections.java:110)
    at org.hibernate.engine.Collections.processUnreachableCollection(Collections.java:62)
    at org.hibernate.event.def.AbstractFlushingEventListener.flushCollections(AbstractFlushingEventListener.java:241)
    at org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:100)
    at org.hibernate.event.def.DefaultDirtyCheckEventListener.onDirtyCheck(DefaultDirtyCheckEventListener.java:54)
    at org.hibernate.impl.SessionImpl.isDirty(SessionImpl.java:1202)
    at org.openbravo.service.json.DefaultJsonDataService.update(DefaultJsonDataService.java:663)
    at org.openbravo.service.datasource.DefaultDataSourceService.update(DefaultDataSourceService.java:179)
    at org.openbravo.service.datasource.DataSourceServlet.doPut(DataSourceServlet.java:812)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:640)
    at org.openbravo.base.HttpBaseServlet.serviceInitialized(HttpBaseServlet.java:225)
    at org.openbravo.base.secureApp.HttpSecureAppServlet.service(HttpSecureAppServlet.java:449)
    at org.openbravo.client.kernel.BaseKernelServlet.callServiceInSuper(BaseKernelServlet.java:92)
    at org.openbravo.client.kernel.BaseKernelServlet.service(BaseKernelServlet.java:63)
..........
(0073847)
alostale   
2015-01-28 10:11   
The problem is how DAL/Hibernate manages these events. Proper fix requires refactoring these kernel pieces adding a big risk.

Meanwhile workaround:
-Remove "link to parent" flag from new table in AD
-Set the FK contraint in DB as delete on cascade
(0073848)
alostale   
2015-01-28 10:18   
Setting to feedback awaiting for proposed workaround acceptance.

If affected, this issue should be moved to design defect.
(0074072)
jonalegriaesarte   
2015-02-04 11:51   
Accepted, so moved to design defect