我正在将 play2.0 应用程序迁移到 play2.1,它实现了很多 scalaquery。随着所有迁移更改最终编译(不使用异常),scalaqueries 仍然存在。
播放编译和阶段成功,但它给出以下错误
java.lang.NoClassDefFoundError: scala/Right
org.scalaquery.ql.basic.BasicImplicitConversions$class.queryToQueryInvoker(BasicImplicitConversions.scala:26)
org.scalaquery.ql.extended.MySQLDriver$$anon$1.queryToQueryInvoker(MySQLDriver.scala:13)
models.SynonymMappings$$anonfun$updateCommonSynonymMappingTable$1.apply(SynonymMapping.scala:234)
models.SynonymMappings$$anonfun$updateCommonSynonymMappingTable$1.apply(SynonymMapping.scala:224)
org.scalaquery.session.Database.withSession(Database.scala:38)
models.SynonymMappings$.updateCommonSynonymMappingTable(SynonymMapping.scala:224)
Global$.onStart(Global.scala:48)
play.api.GlobalPlugin.onStart(GlobalSettings.scala:175)
play.api.Play$$anonfun$start$1$$anonfun$apply$mcV$sp$1.apply(Play.scala:85)
play.api.Play$$anonfun$start$1$$anonfun$apply$mcV$sp$1.apply(Play.scala:85)
scala.collection.immutable.List.foreach(List.scala:309)
play.api.Play$$anonfun$start$1.apply$mcV$sp(Play.scala:85)
play.api.Play$$anonfun$start$1.apply(Play.scala:85)
play.api.Play$$anonfun$start$1.apply(Play.scala:85)
play.utils.Threads$.withContextClassLoader(Threads.scala:18)
play.api.Play$.start(Play.scala:84)
SynonymMappings.scala 这是我得到错误的地方
def updateCommonSynonymMappingTable = database.withSession { implicit db: Session =>
val q = for (m <- SynonymMappings) yield m.skill ~ m.synonyms ~ m.function ~ m.industry
Logger.debug("Q for getting common syn mapping: " + q.selectStatement)
var table: java.util.concurrent.ConcurrentHashMap[String, scala.Array[String]] = EfoundrySynonymEngine.getCommonSynonymMappingTable()
var i = 0
Logger.debug("Q for getting common syn mapping: " + q.selectStatement)
var domainSpWords = 0
从这条线跟踪到 org.scalaquery.session.Database.withSession