[MarkLogic Dev General] Session insertContent issue with non us locale settings

ADemidov at wiley.ru ADemidov at wiley.ru
Tue Oct 31 07:13:08 PST 2006


Hi all,

I have tried to insert new content into MarkLogic.
This code should work:

                session = getMlSession();
                ContentCreateOptions opts = new ContentCreateOptions();
                opts.setLocale(Locale.US);
                opts.setLanguage("en");
                Content content = ContentFactory.newContent(uri, 
out.toByteArray(), opts);
                session.insertContent(content);

But it generates the following error:

com.marklogic.xcc.exceptions.XQueryException: XDMP-LANG: Unsupported 
language ru in /insert
        at 
com.marklogic.xcc.impl.handlers.ServerExceptionHandler.handleResponse(ServerExceptionHandler.java:31)
        at 
com.marklogic.xcc.impl.handlers.ContentInsertController.serverDialog(ContentInsertController.java:118)
        at 
com.marklogic.xcc.impl.handlers.AbstractRequestController.runRequest(AbstractRequestController.java:72)
        at 
com.marklogic.xcc.impl.SessionImpl.insertContent(SessionImpl.java:189)
        at 
com.marklogic.xcc.impl.SessionImpl.insertContent(SessionImpl.java:209)

When I change the client locale settings to United States, everything 
works fine. What is wrong in the code and how to change the default 
language for content?

Regards,
Andrey
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://xqzone.marklogic.com/pipermail/general/attachments/20061031/0fc16eba/attachment.html


More information about the General mailing list