-
Type: Task
-
Resolution: Done
-
Priority: Critical - P2
-
Affects Version/s: mongodb-3.2
-
Component/s: drivers
-
Labels:
-
Environment:HD Insight ( Linux)
-
9
Hi
I have installed Mongodb 3.2.5 ( latest) on Azure VMs ( 3 nodes) . Also a HDInsight Spark cluster created in the same vNet. Want to collect MongodB mongo instance from the head node of spark cluster. To do that I have downloaded the mongo-scala-driver_2.11-1.0.1.jar. When I run the sample program QuickTour.scala on scala shell prompt I get the error
I believe the driver expects the latest version scala 2.11 but the one that comes with HD Insight is 2.10.4 . Guess the below error is due to that.
Please help me understand whats going on here.
------------------------
scala> import org.mongodb.scala._
import org.mongodb.scala._
scala> import org.mongodb.scala.model.Aggregates._
import org.mongodb.scala.model.Aggregates._
scala> import org.mongodb.scala.model.Filters._
import org.mongodb.scala.model.Filters._
scala> import org.mongodb.scala.model.Projections._
import org.mongodb.scala.model.Projections._
scala> import org.mongodb.scala.model.Sorts._
import org.mongodb.scala.model.Sorts._
scala> import org.mongodb.scala.model.Updates._
import org.mongodb.scala.model.Updates._
scala> import org.mongodb.scala.model._
import org.mongodb.scala.model._
scala> val mongoClient = MongoClient("mongodb://10.1.0.7")
error: bad symbolic reference. A signature in MongoClient.class refers to term client
in package com.mongodb.async 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 MongoClient.class.
scala> util.Properties.versionString
res0: String = version 2.10.4
scala> util.Properties.versionNumberString
res1: String = 2.10.4
scala> util.Properties.versionMsg
res2: String = Scala library version 2.10.4 – Copyright 2002-2013, LAMP/EPFL
scala> exit