Frage

I've been getting this error whenever I'm using Scala libraries for MongoDB.

bad symbolic reference. A signature in Implicits.class refers to type MongoCursor in 
package com.mongodb which is not available. It may be completely missing from the 
current classpath, or the version on the classpath might be incompatible with the 
version used when compiling Implicits.class.  

I get the error in response to the line:
val client = MongoClient("localhost", 27017)

I've tried different versions of the various jar files, but it hasn't fixed it. I've been using only the most up-to-date versions, so I don't know what the problem is. It won't give me a line reference, and I can't find a reference to a "MongoCursor" type in the Implicits.class source. I get the feeling that I'm missing another library, but I don't know what it would be.

I'm using:
joda-time-2.3.jar
mongo-java-driver-2.11.4.jar
casbah_2.10-2.7.0-SNAPSHOT.jar
casbah-commons_2.10-2.7.0-SNAPSHOT.jar
casbah-core_2.10-2.7.0-SNAPSHOT.jar
casbah-gridfs_2.10-2.7.0-SNAPSHOT.jar
casbah-query_2.10-2.7.0-SNAPSHOT.jar

War es hilfreich?

Lösung

You will need to update the Java driver as the 2.7.0-SNAPSHOT relies on the mongo-java-driver 2.12.0-SNAPSHOT - then it should be able to find MongoCursor correctly.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top