Mongo Collection name gets truncated RRS feed

  • Question

  • Hi Team,

    We have created a Mongo DB using Azure cosmos and imported JSON file into a collection. However when we try to access collection from Java api (MongoTemplate) to read imported json, we encounter an exception stating collection not exist in DB.

    When we investigated our code more, we have identified the collection name gets truncated. For Ex:- If I have a collection name with "componentTemplates", but the same is displayed with some strange string like "nentTemplates". Because of this our code is not working and application fails to serve the request.


    Elango Boopathy.

    Friday, July 26, 2019 9:29 AM

All replies

  • Hi Elango,

    Thanks for your feedback. Just as initial check, Could you please make sure your are following the naming convention. 

    Collection names must contain from 1 through 255 characters, and they cannot contain /, \\, #, ?, or a trailing space.

    Hope this helps.

    Monday, July 29, 2019 11:41 AM
  • Hi,

    I hope the information provided for your concern is helpful. Please "Mark as answer" if it was helpful, so that it can help the other users with same problem.

    If you need more information, please let us know.

    Tuesday, August 27, 2019 8:56 AM