【问题标题】:Slick 3.0.0 and Scala 2.10.4Slick 3.0.0 和 Scala 2.10.4
【发布时间】:2015-03-21 21:05:08
【问题描述】:

我试图用 slick 3.0 创建一个 scala 程序,但出现以下错误:

错误:scalac:错误的符号引用。 BasicDriver.class 中的签名是指术语类型安全 在包 com 中不可用。 当前的类路径或版本中可能完全缺少它 类路径可能与编译 BasicDriver.class 时使用的版本不兼容。

我使用的是 scala 2.10.4 和 slick 2.10-3.0.0-RC1,我的 IDE 是 IDEA 14.0.3 社区版

任何有关此编译错误的线索将不胜感激。

非常感谢!!!

【问题讨论】:

    标签: slick-3.0


    【解决方案1】:

    这就是 BasicDriver.class 定义的样子

    package scala.slick.profile
    trait BasicDriver extends scala.AnyRef with scala.slick.profile.BasicProfile {
       val profile : scala.slick.profile.BasicProfile = { /* compiled code */ }
      override def toString() : java.lang.String = { /* compiled code */ }
      final val driverConfig : com.typesafe.config.Config = { /* compiled code */     }
      protected[this] def loadDriverConfig : com.typesafe.config.Config = { /*   compiled code */ }
    

    }

    错误:

    Error:scalac: bad symbolic reference. A signature in BasicDriver.class refers to term typesafe in package com 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 BasicDriver.class
    

    表示类路径中缺少 com.typesafe for (com.typesafe.config.Config)。

    我认为问题在于添加的依赖项,请尝试主快照:

      "com.typesafe.slick" % "slick_2.10" % "3.0.0-M1"
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2014-08-23
      • 2015-02-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多