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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0028852
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformminoralways2015-02-03 17:052015-02-09 08:48
ReporterjecharriView Statuspublic 
Assigned ToAugustoMauch 
PriorityimmediateResolutionfixedFixed in Version3.0PR15Q2
StatusclosedFix in branchFixed in SCM revision963be1616dd5
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Toalostale
Web browserGoogle Chrome
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0028852: When you add or remove a treenode you will receive ugly error in the log and also strange behavior

DescriptionWhen you add or remove a treenode you will receive ugly error in the log and also strange behavior.
Steps To Reproduce-Define a table to include a tree. It must use the ADTree structure, and set the Handle Nodes Manually flag to false (this way the ADTreeNodes will be created automatically).
-Add a record in that table
-You will receive the following error:
867946fe 921928 [http-2080-1] ERROR org.hibernate.jdbc.AbstractBatcher - Exception executing batch:
org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1
    at org.hibernate.jdbc.Expectations$BasicExpectation.checkBatched(Expectations.java:85)
    at org.hibernate.jdbc.Expectations$BasicExpectation.verifyOutcome(Expectations.java:70)
    at org.hibernate.jdbc.BatchingBatcher.checkRowCounts(BatchingBatcher.java:90)
    at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:70)
Proposed Solution-remove the flush commands because it seems that inside an eventhandler is creating problems
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
caused by feature request 00259063.0PR14Q2 closedAugustoMauch Tree Extension Project 

-  Notes
(0074092)
hgbot (developer)
2015-02-04 18:02

Repository: erp/devel/pi
Changeset: 963be1616dd53624ed59eb7b4da876b1fd301f7d
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Wed Feb 04 17:56:52 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/963be1616dd53624ed59eb7b4da876b1fd301f7d [^]

Fixes bug 28852: Adding automatically a tree node does not trigger error in log

In this changeset [1], a flush operation was added after the add, update and delete operations on ADTreeNode entities. This was done because it was needed for the update operation, and was also included fo
r the add and delete operations because it was thought that it would be needed too. The problem was that not only it was not needed, but it also shows an error in the log (the ADTreeNodes are succesfully a
dded/removed, though).

In this case, when an ADTreeNode is updated (i.e. when is moved under another node), the flush done to actually commit the changes must be done just after modifying it to ensure it is done while the contex
t is in admin mode. Otherwise, the next flush that is done might be outside an admin mode block, and the operation will fail if the user had no access to the ADTtreeNode entity. This does not happen with t
he add and remove operation. As long as the OBDal.getInstance().add and OBDal.getInstance().remove methods are invoked in an admin mode block, the operation will work regardless of when the OBDal.getInstan
ce().flush method is invoked.

[1] https://code.openbravo.com/erp/devel/pi/rev/5cec8a63b6c8 [^]

---
M modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/ADTreeDatasourceService.java
---
(0074231)
hudsonbot (developer)
2015-02-05 15:42

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/f60af6e6baca [^]
Maturity status: Test
(0074264)
alostale (manager)
2015-02-09 08:48

code reviewed and tested

- Issue History
Date Modified Username Field Change
2015-02-03 17:05 jecharri New Issue
2015-02-03 17:05 jecharri Assigned To => AugustoMauch
2015-02-03 17:05 jecharri Web browser => Google Chrome
2015-02-03 17:05 jecharri Modules => Core
2015-02-03 17:05 jecharri Resolution time => 1423436400
2015-02-03 17:05 jecharri Regression level => Production - Confirmed Stable
2015-02-03 17:05 jecharri Regression date => 2014-02-27
2015-02-03 17:05 jecharri Regression introduced in release => 3.0PR14Q3
2015-02-03 17:05 jecharri Regression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/5cec8a63b6c8 [^]
2015-02-03 17:05 jecharri Triggers an Emergency Pack => No
2015-02-04 12:13 AugustoMauch Web browser Google Chrome => Google Chrome
2015-02-04 12:13 AugustoMauch Steps to Reproduce Updated View Revisions
2015-02-04 12:22 AugustoMauch Web browser Google Chrome => Google Chrome
2015-02-04 12:22 AugustoMauch Steps to Reproduce Updated View Revisions
2015-02-04 18:00 AugustoMauch Relationship added caused by 0025906
2015-02-04 18:00 AugustoMauch Issue Monitored: alostale
2015-02-04 18:00 AugustoMauch Review Assigned To => alostale
2015-02-04 18:00 AugustoMauch Web browser Google Chrome => Google Chrome
2015-02-04 18:02 hgbot Checkin
2015-02-04 18:02 hgbot Note Added: 0074092
2015-02-04 18:02 hgbot Status new => resolved
2015-02-04 18:02 hgbot Resolution open => fixed
2015-02-04 18:02 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/963be1616dd53624ed59eb7b4da876b1fd301f7d [^]
2015-02-04 18:33 AugustoMauch Regression level Production - Confirmed Stable =>
2015-02-04 18:33 AugustoMauch Regression date 2014-02-27 =>
2015-02-04 18:33 AugustoMauch Regression introduced in release 3.0PR14Q3 =>
2015-02-04 18:34 AugustoMauch Regression introduced by commit https://code.openbravo.com/erp/devel/pi/rev/5cec8a63b6c8 [^] =>
2015-02-05 15:42 hudsonbot Checkin
2015-02-05 15:42 hudsonbot Note Added: 0074231
2015-02-09 08:48 alostale Note Added: 0074264
2015-02-09 08:48 alostale Status resolved => closed
2015-02-09 08:48 alostale Fixed in Version => 3.0PR15Q2


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker