On Wed, Aug 20, 2008 at 6:06 PM, Michael Harris <[EMAIL PROTECTED]> wrote: > if the project is called proj I have a proj.cnd file > > <ns = 'http://whereIwork.org/proj'> > [ns:file] > nt:file > - lockHolder (STRING) > - lockToken (STRING) > > In my spring config for the jcrsessionfactory config > > <property name="namespaces"> > <props> > <prop key="proj">http://whereIwork.org/proj</prop> > </props> > </property> > > I get a NoSuchNodeTypeException > > I see in my test output > registering namespace [http://whereIwork.org/proj] under [proj] > > > In my test I try > > Node fileNode = parentFolder.addNode(name, "proj:file"); > > what am i missing? Do I change the "ns" to "proj" in my .cnd file?
Yes this will most likely fix your problem. Not sure what the spring jcrsessionfactory does with the namespaces in the config; to handle your case properly, it should set the prefixes on the session, ie. to overwrite the default prefix "ns" for http://whereIwork.org/proj that is stored in the repository. But I guess it just tries to register the namespace on the repository, which probably fails (is there a warning in your logs?) because the namespace uri is already present. Regards, Alex -- Alexander Klimetschek [EMAIL PROTECTED]
