cancel
Showing results for 
Search instead for 
Did you mean: 

Change a name model or prefix produces internal inconsistences

dmralfing
Champ in-the-making
Champ in-the-making
I don´t understand why, but sometimes when I change the prefix or name of any content model, it´s like my alfresco get crazy. When I restart, it appears errors like "a namespace prefix is not registered for uri …" referenced a URI that I´m not already using. I have been looking for this error around Internet, but I don´t find it in the case that you simply change the name/prefix of any model. I have deleted caches, reindexed the Solr…but I haven´t success, so I had to clean my schema to start with all new.
  I don´t understand why Alfresco doesn´t delete inside its database tables  information about models that we already deleted in the extensions folders. That produces serious inconsistences, I had to delete and create the database schema, it´s a joke!
  Somebody knows what I have to do if it happens again instead of clean my databases & alf_data?
2 REPLIES 2

mrogers
Star Contributor
Star Contributor
In general updating models is not allowed and needs to be handled carefully.

The model definitions are parsed and stored in the database.  A missing model (or changed namesapace) will not delete the old.   But will probably cause a warning that there is a model missing.

There are some update operations that you can do safely such as adding new optional properties.  But if a namespace/type/aspect/property is in use then you need to be careful and migrate your data.   Alfresco, at the moment, perhaps over simplifies things by not allowing many types of model updates. And its this way to prevent "inconsistencies".

There's a need for a dictionary/data management API to assist with model maintenance but its not there at the moment.

dmralfing
Champ in-the-making
Champ in-the-making
Thank you very much mrogers. It makes sense what you tell me that if I change a model while there is instances of this model created in the repository, it would produces inconsistences, I already knew this fact and I accept it.
  My question is considering that it doesn´t exist  any instance created with this model, being a new model. So when I changed the namespace/prefix my Alfresco gets crazy and doesn´t start - not warnings, I promiss you that it didn´t start -.  Alfresco should have at least any way that let you tell him "update models information in the database". Or at least, I would appreciate if you tell me where can I find the table where I have to do it manually?. I want to insist in the fact that my Alfresco didn´t start while I had not created instances of the model.
   It was no problem because there was a local test environment - standard installation of Alfresco Enterprise 4.1.2 using the PostgreSQL -, but I am afraid I might have this kind of problems in any other more sofistified environment with Oracle 11g in production, in the future.
  Thank you so much again