user1983299
user1983299

Reputation: 393

Connecting from WSO2DSS to MongoDB, receiving error: java.lang.NoClassDefFoundError: com/mongodb/ServerAddres.

I added the mongo Java driver and ds-connector-mongodb java driver jar files.

When I am connecting from WSO2DSS to MongoDB , I get the following error:

ERROR {org.wso2.carbon.dataservices.core.DBDeployer} -  The MongoSampleDS.dbs service, which is not valid, caused {1}
        java.lang.NoClassDefFoundError: com/mongodb/ServerAddres.

Upvotes: 0

Views: 250

Answers (1)

Trisha
Trisha

Reputation: 3931

The missing class looks like ServerAddress (I assume the missing "s" is a copy-paste issue) which is in the MongoDB Java driver (mongo-java-driver). Make sure mongo-java-driver-2.xx.jar is on the runtime classpath. Note that the runtime classpath is not always the same as the compile time classpath.

Upvotes: 1

Related Questions