AnsweredAssumed Answered

Max size of 255 when create a node

Question asked by spilby on Feb 16, 2015
Latest reply on Feb 19, 2015 by spilby
Hi everybody,

I have a doubt with the max size when I try to create a node.

I'm using the getNodeService().createNode. When I set the title and the name properties, and the size exceeds 255 characters, my java webscript returns me a java.lang.IllegalArgumentException "Localname is too long".

I decompile the DbNodeServiceImpl class and I can see the code of this exception:

if(assocQName.getLocalName().length() > QName.MAX_LENGTH) {
            throw new IllegalArgumentException("Localname is too long. Length of " +
                 assocQName.getLocalName().length() + " exceeds the maximum of " + QName.MAX_LENGTH);

QName.MAX_LENGTH value is 255.

But when I create a new folder with the Alfresco share, and put on the name and title properties a string with 500 characters, it could be created ok, without size limit problems. How is possible?? How can I create a longest name with the API like the Alfresco share does? Is possible to change this max_length?

Thanks a lot!