Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Database Toolbox Interface for MongoDB Error Messages

This table describes how to address common errors you can encounter while working with the Database Toolbox™ interface for MongoDB®.

Error CategoryError MessageProbable CausesResolution
Installation and configuration

Unable to verify MongoDB Java driver installation.

The installation did not install the MongoDB Java® driver successfully.

Reinstall the Database Toolbox interface for MongoDB. For details, see Database Toolbox Interface for MongoDB Installation.

Unable to configure MATLAB Java class path.

The installation did not create or modify the Java class path in the MATLAB® preferences folder.Reinstall the Database Toolbox interface for MongoDB using administrator privileges. For details, see Database Toolbox Interface for MongoDB Installation.

Unable to find MongoDB Java driver file on MATLAB Java class path. Install the Database Toolbox interface for MongoDB again.

After installation, the MATLAB preferences folder is missing the javaclasspath.txt file.

Reinstall the Database Toolbox interface for MongoDB. For details, see Database Toolbox Interface for MongoDB Installation.
MongoDB connection

Invalid Mongo connection.

The MongoDB connection is closed.Use the mongo function to connect to MongoDB.
Input validation

Valid input types for server are string scalars and string array.

In the mongo function, the specified data type for the input argument server is not a string scalar or string array.Specify the input argument server as a string scalar or string array.

Each server must have a port.

In the mongo function, the number of servers specified in the mongo function does not match the number of ports specified.Ensure that you specify a port number for each specified server in the mongo function. For example, if the server input argument is set to {"dbtb01","dbtb02"}, then the port input argument must have two port numbers, such as [27017,27018].

Valid input type is cell array of structures.

In the insert function, the documents input argument is specified as a cell array. The cell array contains data types that are not structures.In the documents input argument of the insert function, specify only structures in the cell array.

MongoDB Java driver

[Mongo Driver Error]: Error message.

The MongoDB Java driver throws an error.

Use the MongoDB Manual to search for the MongoDB error message.
MongoDB CRUD operations

Unable to access MongoDB collection collectionname.

The database does not contain the specified collection. Access the CollectionNames property of the mongo object to retrieve a list of all collections in the database. Then, specify an existing collection name.

MongoDB collection collectionname already exists in the database.

The database already contains a collection with the specified name.Access the CollectionNames property of the mongo object to retrieve a list of all collections in the database. Then, specify a unique name to create a collection.

See Also

| | | | |

Related Topics

External Websites

Was this topic helpful?