使用Scala连接Couchbase?

时间:2018-04-11 16:46:46

标签: scala couchbase

我有一个scala项目,我正在尝试连接到具有Reactive Couchbase的couchbase存储桶。相关代码如下所示:

object CouchDriver {



val system = ActorSystem("ReactiveCouchbaseSystem")

  implicit val materializer = ActorMaterializer.create(system)
  implicit val ec = system.dispatcher

  val driver = ReactiveCouchbase(ConfigFactory.parseString(
    s"""
       |  buckets = {
       |    test {
       |       name = "test"
       |       hosts = ["localhost"]
       |       bucket = "test"
       |      }
       |  }
    """.stripMargin))


  def init = {
   var testBucket = driver.bucket("test")
  }
}

当我运行它时,我收到以下错误:

Exception in thread "main" com.couchbase.client.java.error.InvalidPasswordException: Passwords for bucket "test" do not match.  

我不明白,因为我没有为桶设置密码!

0 个答案:

没有答案