org.alfresco.service.namespace.NamespaceException: A namespace prefix is not registered for uri http://<your cool custom uri>.
9 out of 10 time this is probably you're missing a model and in very few cases like me you thought of changing the uri cause there was a spelling mistake in it or it didn't match the model.
I'll never do that again, changing the uri :P.
Steps I followed before hacking into the database:
- Created a new model with the old uri, but with a new prefix --> didn't help
- I already created content with the new uri, so couldn't just put back the old one.
- Delete the content by searching on uri instead on prefix --> didn't help
Cause I'm a geek I didn't go for the easy path, the easy path is:
- Delete all the new uri content in Alfresco by adding sys:temporary to the nodes.
- Put back the old uri model and do step 1
- I'm getting the nodeDAO
- Creating a QName for the aspect/property
- Getting the nodes where the old uri is added
- Getting a specialized node id, it's not the NodeRef (tried that)
- removing the aspect in the database
Have fun using this and if you break Alfresco afterwards cause you messed-up --> don't blame me :D.