Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0011886 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Openbravo ERP] A. Platform | critical | have not tried | 2009-12-31 13:10 | 2010-01-19 01:41 | |||
Reporter | plujan | View Status | public | |||||
Assigned To | mtaal | |||||||
Priority | immediate | Resolution | fixed | Fixed in Version | ||||
Status | closed | Fix in branch | pi | Fixed in SCM revision | 480b6bd9f54f | |||
Projection | none | ETA | none | Target Version | 2.50MP10 | |||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | 2.50MP10 | SCM revision | ||||||
Merge Request Status | ||||||||
Review Assigned To | ||||||||
OBNetwork customer | No | |||||||
Web browser | ||||||||
Modules | Core | |||||||
Support ticket | ||||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0011886: When updating from mp8 to mp10 having spanish pack pro installed, I get an exception | |||||||
Description | While rebuilding after updating an mp8 with spanish pack pro, I got this error: [java] Generating entities... [java] Dataset DS updated succesfully. Reinitializing DAL [java] Initializing in-memory model... [java] Building runtime model [java] Model read in-memory, generating mapping... [java] Property leaseBusiness not defined for entity Product [java] org.hibernate.InstantiationException: could not instantiate test objectorg.openbravo.model.common.plm.Product [java] at org.hibernate.engine.UnsavedValueFactory.instantiate(UnsavedValueFactory.java:25) [java] at org.hibernate.engine.UnsavedValueFactory.getUnsavedIdentifierValue(UnsavedValueFactory.java:44) [java] at org.hibernate.tuple.PropertyFactory.buildIdentifierProperty(PropertyFactory.java:44) [java] at org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:123) [java] at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:434) [java] at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:109) [java] at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55) [java] at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:226) [java] at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1294) [java] at org.openbravo.base.session.SessionFactoryController.initialize(SessionFactoryController.java:150) [java] at org.openbravo.dal.core.DalLayerInitializer.initialize(DalLayerInitializer.java:78) [java] at org.openbravo.ddlutils.task.AlterDatabaseDataAll.doExecute(AlterDatabaseDataAll.java:195) [java] at org.openbravo.dal.core.DalInitializingTask.execute(DalInitializingTask.java:116) [java] at org.openbravo.ddlutils.task.BaseDalInitializingTask.execute(BaseDalInitializingTask.java:88) [java] at org.openbravo.ddlutils.task.AlterDatabaseDataAll.execute(AlterDatabaseDataAll.java:94) [java] at org.openbravo.ddlutils.task.AlterDatabaseJava.main(AlterDatabaseJava.java:43) [java] Caused by: java.lang.reflect.InvocationTargetException [java] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [java] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) [java] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) [java] at java.lang.reflect.Constructor.newInstance(Constructor.java:513) [java] at org.hibernate.engine.UnsavedValueFactory.instantiate(UnsavedValueFactory.java:22) [java] ... 15 more [java] Caused by: org.openbravo.base.exception.OBException: Property leaseBusiness not defined for entity Product [java] at org.openbravo.base.model.Entity.checkValidPropertyAndValue(Entity.java:360) [java] at org.openbravo.base.structure.BaseOBObject.setDefaultValue(BaseOBObject.java:71) [java] at org.openbravo.model.common.plm.Product.<init>(Product.java:194) [java] ... 20 more | |||||||
Steps To Reproduce | 1. Use an Openbravo mp8 with spanish localization pack pro v1.1 installed 2. Check for updates in order to get both mp10 and the 1.2 version of the pack 3. Install updates and rebuild 4. You will see the above error Additional note: This will not happen when starting from mp9. | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
![]() |
||||||||
|
![]() |
|
(0023190) iciordia (viewer) 2010-01-04 12:16 |
Martin, please review this issue, this is a stopper for MP10. Thanks, Ismael |
(0023191) mtaal (viewer) 2010-01-04 12:33 |
Hi Ismael, Afaics this is caused because update.database does not reload the classes, so the old entity class is still in memory. In this case a column was removed from a table. The update.database rereads the model from the database, so the model does not contain the property anymore. However, because the class is not reloaded the class still has a default value call for this property. In mp9 the setting of default values has been made more robust so it won't fail on this. However, the update.database in this step apparently still uses the old class not having this fix. The real solution imo is that update.database should reload the classes after it has done the update of the database. Antonio is not back until thursday, so I will take a look. gr. Martin |
(0023275) hgbot (developer) 2010-01-08 19:19 |
Repository: erp/devel/pi Changeset: 480b6bd9f54f095eb11339ef1e3a4b6284bf6ca2 Author: Antonio Moreno <antonio.moreno <at> openbravo.com> Date: Fri Jan 08 19:19:01 2010 +0100 URL: http://code.openbravo.com/erp/devel/pi/rev/480b6bd9f54f095eb11339ef1e3a4b6284bf6ca2 [^] Fixed issue 11886. Fixed issue 11910. Primary Keys will not be recreated twice if there is more than one module which modifies the same table. --- M src-db/database/build.xml M src-db/database/lib/dbsourcemanager.jar --- |
(0023404) plujan (viewer) 2010-01-14 10:30 |
Tested in 2.50.15806 |
(0023537) hudsonbot (viewer) 2010-01-19 01:41 |
A changeset related to this issue has been promoted to main after passing a series of tests and an OBX has been generated: Changeset: http://code.openbravo.com/erp/devel/main/rev/480b6bd9f54f [^] Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/7f3a35240cf9 [^] Tests: http://builds.openbravo.com/view/devel-int/ [^] OBX: http://builds.openbravo.com/erp/obx/core/OpenbravoERP-2.50CI.15846.obx [^] |
![]() |
|||
Date Modified | Username | Field | Change |
2009-12-31 13:10 | plujan | New Issue | |
2009-12-31 13:10 | plujan | Assigned To | => marvintm |
2009-12-31 13:10 | plujan | OBNetwork customer | => No |
2010-01-04 12:15 | iciordia | Assigned To | marvintm => mtaal |
2010-01-04 12:16 | iciordia | Status | new => scheduled |
2010-01-04 12:16 | iciordia | Note Added: 0023190 | |
2010-01-04 12:16 | iciordia | fix_in_branch | => pi |
2010-01-04 12:33 | mtaal | Note Added: 0023191 | |
2010-01-08 19:19 | hgbot | Checkin | |
2010-01-08 19:19 | hgbot | Note Added: 0023275 | |
2010-01-08 19:19 | hgbot | Status | scheduled => resolved |
2010-01-08 19:19 | hgbot | Resolution | open => fixed |
2010-01-08 19:19 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/480b6bd9f54f095eb11339ef1e3a4b6284bf6ca2 [^] |
2010-01-14 10:30 | plujan | Note Added: 0023404 | |
2010-01-14 10:30 | plujan | Status | resolved => closed |
2010-01-15 00:00 | anonymous | sf_bug_id | 0 => 2932416 |
2010-01-19 01:41 | hudsonbot | Checkin | |
2010-01-19 01:41 | hudsonbot | Note Added: 0023537 | |
2010-01-19 20:29 | mtaal | Relationship added | related to 0011556 |
Copyright © 2000 - 2009 MantisBT Group |