What you did does not work, but I think that it should.
ModeShape basically has a tree of namespace registries that handle the translation from prefixes to URIs and back. There's a top-level namespace registry at the JcrEngine level and separate registries for each JCR repository. The repository registries are based on the top-level registry but can also add additional mappings that only apply to that repository.
When you add namespaces to the repository (with the mode:namespaces tag), you are adding them in the namespace registry for that repository only. But sequencers use the top-level repository. That's why your sequencer doesn't recognize the mapping. I suspect that the other error that you're seeing when you try to register from JCR is because that prefix is already mapped.
I suspect that this behavior will be changed in trunk in the next few days, but in the meantime, a workaround is to add some code like this to wherever you initialize your JcrEngine:
JcrConfiguration config = ...;
JcrEngine engine = config.loadFrom(...).build();
String uri = ...;
Once you do this, you can comment out the mode:namespaces section from your configuration file for now.
So, in short, you're not wrong - this should work. Thanks for catching this!
Thanks for clearing this up, good to know whats happening!
I am getting the JCR repository from JNDI and I dont want to introduce modeshape as dependency at the moment, so I can't use the workaround.
Is there already an issue for this? I will work with the trunk as soon as its fixed.
I committed the MODE-771 changes to trunk a few minutes ago. Please let me know if this resolves your problem. Thanks!
Thank you very much! I built modeshape from trunk today and its sequencing my uploaded images now . I appreciate your fast response and support!
Good deal. Thanks for the feedback!