Anonymous | Login
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformcriticalhave not tried2009-12-31 13:102010-01-19 01:41
ReporterplujanView Statuspublic 
Assigned Tomtaal 
PriorityimmediateResolutionfixedFixed in Version
StatusclosedFix in branchpiFixed in SCM revision480b6bd9f54f
ProjectionnoneETAnoneTarget Version2.50MP10
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product Version2.50MP10SCM revision 
Review Assigned To
Web browser
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo

0011886: When updating from mp8 to mp10 having spanish pack pro installed, I get an exception

DescriptionWhile 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(
[java] at org.hibernate.engine.UnsavedValueFactory.getUnsavedIdentifierValue(
[java] at org.hibernate.tuple.PropertyFactory.buildIdentifierProperty(
[java] at org.hibernate.tuple.entity.EntityMetamodel.<init>(
[java] at org.hibernate.persister.entity.AbstractEntityPersister.<init>(
[java] at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(
[java] at org.hibernate.persister.PersisterFactory.createClassPersister(
[java] at org.hibernate.impl.SessionFactoryImpl.<init>(
[java] at org.hibernate.cfg.Configuration.buildSessionFactory(
[java] at org.openbravo.base.session.SessionFactoryController.initialize(
[java] at org.openbravo.dal.core.DalLayerInitializer.initialize(
[java] at org.openbravo.ddlutils.task.AlterDatabaseDataAll.doExecute(
[java] at org.openbravo.dal.core.DalInitializingTask.execute(
[java] at org.openbravo.ddlutils.task.BaseDalInitializingTask.execute(
[java] at org.openbravo.ddlutils.task.AlterDatabaseDataAll.execute(
[java] at org.openbravo.ddlutils.task.AlterDatabaseJava.main(
[java] Caused by: java.lang.reflect.InvocationTargetException
[java] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[java] at sun.reflect.NativeConstructorAccessorImpl.newInstance(
[java] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(
[java] at java.lang.reflect.Constructor.newInstance(
[java] at org.hibernate.engine.UnsavedValueFactory.instantiate(
[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(
[java] at org.openbravo.base.structure.BaseOBObject.setDefaultValue(
[java] at org.openbravo.model.common.plm.Product.<init>(
[java] ... 20 more
Steps To Reproduce1. 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.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0011556 closedmtaal ValidationException when updating from MP8 to MP9 

-  Notes
iciordia (manager)
2010-01-04 12:16


please review this issue, this is a stopper for MP10.


mtaal (developer)
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
hgbot (developer)
2010-01-08 19:19

Repository: erp/devel/pi
Changeset: 480b6bd9f54f095eb11339ef1e3a4b6284bf6ca2
Author: Antonio Moreno <antonio.moreno <at>>
Date: Fri Jan 08 19:19:01 2010 +0100
URL: [^]

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
plujan (manager)
2010-01-14 10:30

Tested in 2.50.15806
hudsonbot (developer)
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: [^]
Merge Changeset: [^]
Tests: [^]
OBX: [^]

- Issue History
Date Modified Username Field Change
2009-12-31 13:10 plujan New Issue
2009-12-31 13:10 plujan Assigned To => marvintm
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 => [^]
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
Powered by Mantis Bugtracker