

初めて投稿させていただきます。よろしくお願いします。  
scala+play初心者です。

play2.5で作成されたsampleコードを、2.6のlocalhostの環境でrunしたところ、以下のようなコンパイルエラーが出てしまいます。

> [error] ....(省略)/Desktop/spetstore-master/play-hands-
> on2/app/com/github/j5ik2o/spetstore/infrastructure/db/Records.scala:390:16:
> erroneous or inaccessible type  
>  [error] override def extract(  
>  [error] ^
>
> at
> play.sbt.PlayExceptions$CompilationException$.apply(PlayExceptions.scala:34)  
>  at
> play.sbt.PlayExceptions$CompilationException$.apply(PlayExceptions.scala:34)  
>  at scala.Option.map(Option.scala:146)  
>  at
> play.sbt.run.PlayReload$.$anonfun$taskFailureHandler$1(PlayReload.scala:33)  
>  at scala.Option.map(Option.scala:146)  
>  at play.sbt.run.PlayReload$.taskFailureHandler(PlayReload.scala:28)  
>  at play.sbt.run.PlayReload$.compileFailure(PlayReload.scala:24)  
>  at play.sbt.run.PlayReload$.$anonfun$compile$3(PlayReload.scala:51)  
>  at scala.util.Either$LeftProjection.map(Either.scala:573)  
>  at play.sbt.run.PlayReload$.compile(PlayReload.scala:51)

以下のQiitaのマイグレーションの記事を参考に、一通り、依存性注入をbuild.sbtの方に行い、またもともとサンプルにあったDIについても一通りバージョンを更新し、エラーが出たファイルについては、2.6以降コアplayモジュールから外れたguiceなどのライブラリのimportもいくつかして見たのですが、状況が変わりません。plugin.sbtについても同様にバージョンを更新してあります。

Play 2.6の移行ガイド【翻訳】
<https://qiita.com/nazoking@github/items/3b715a30657cf358a1fc>

[code]

    // Comment to get more information during initialization
    logLevel := Level.Warn
    
    resolvers += Resolver.typesafeRepo("releases")
    resolvers += "Flyway" at "https://flywaydb.org/repo"
    
    // The Play plugin
    addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.6.11")
    
    // web plugins
    addSbtPlugin("com.typesafe.sbt" % "sbt-coffeescript" % "1.0.2")
    
    addSbtPlugin("com.typesafe.sbt" % "sbt-less" % "1.1.2")
    
    addSbtPlugin("com.typesafe.sbt" % "sbt-jshint" % "1.0.6")
    
    addSbtPlugin("com.typesafe.sbt" % "sbt-rjs" % "1.0.10")
    
    addSbtPlugin("com.typesafe.sbt" % "sbt-digest" % "1.1.3")
    
    addSbtPlugin("com.typesafe.sbt" % "sbt-mocha" % "1.1.2")   
    
    addSbtPlugin("org.irundaia.sbt" % "sbt-sassify" % "1.4.12")
    
    //addSbtPlugin("org.scalariform" % "sbt-scalariform" % "1.8.2")
    
    addSbtPlugin("io.github.davidmweber" % "flyway-sbt" % "5.0.0")
    
    
    
    name := "spetstore"
     
    version := "1.0-SNAPSHOT"
    
    lazy val root = (project in file(".")).enablePlugins(PlayScala)
    
    scalaVersion := "2.11.5"
    
    resolvers += "Sonatype OSS Release Repository" at "https://oss.sonatype.org/content/repositories/releases/"
    resolvers += "Bintary JCenter" at "http://jcenter.bintray.com"
    
    val circeVersion = "0.7.0"
    
    libraryDependencies ++= Seq(
      jdbc,
      cache,
      ws,
      filters,
    
      "javax.xml.bind"          % "jaxb-api"                        % "2.2.12",
    
      "com.typesafe.play"       %% "play-json"                      % "2.6.7",
      "com.typesafe.play"       %% "play-iteratees"                 % "2.6.1",
      "com.typesafe.play"       %% "play-iteratees-reactive-streams" % "2.6.1",
    
        
      "com.typesafe.akka"       %% "akka-actor"                     % "2.5.11",
      "com.typesafe.akka"       %% "akka-stream"                    % "2.5.11",
        
      "org.scalatestplus.play"  %% "scalatestplus-play"             % "2.0.0-M1"  % Test,
      "org.scala-lang"          % "scala-reflect"                   %     scalaVersion.value,
      "org.hamcrest"            % "hamcrest-all"                    % "1.3"       % Test,
      "org.mockito"             % "mockito-core"                    % "1.10.19"   % Test,
      "org.specs2"              %% "specs2-core"                    % "3.8.9"     % Test,
      "org.specs2"              %% "specs2-junit"                   % "3.8.9"     % Test,
      "net.codingwell"          %% "scala-guice"                    % "4.1.0",
      "com.github.nscala-time"  %% "nscala-time"                    % "2.16.0",
      "org.scalikejdbc"         %% "scalikejdbc"                    % "3.2.+",
      "ch.qos.logback"          %  "logback-classic"                % "1.2.+",
      "org.scalikejdbc"         %% "scalikejdbc-test"               % "3.2.+",
      "org.scalikejdbc"         %% "scalikejdbc-config"             % "3.2.2",
      "org.scalikejdbc"         %% "scalikejdbc-play-initializer"   % "2.6.0-scalikejdbc-3.2",
      "org.scalikejdbc"         %% "scalikejdbc-play-dbapi-adapter" % "2.6.0-scalikejdbc-3.2",
      "org.skinny-framework"    %% "skinny-orm"                     % "2.3.5",
      "com.h2database"          %  "h2"                             % "1.4.191",
    //  "ch.qos.logback"          %  "logback-classic"                % "1.2.1",
      //"io.swagger" %% "swagger-play2" % "1.5.1",
      "org.flywaydb"            %% "flyway-play"                    % "5.0.0",
      "org.flywaydb" % "flyway-core" % "5.0.7",
      "mysql"                   % "mysql-connector-java"            % "6.0.5",
      "io.circe"                %% "circe-core"                     % circeVersion,
      "io.circe"                %% "circe-generic"                  % circeVersion,
      "io.circe"                %% "circe-parser"                   % circeVersion,
      "play-circe" %% "play-circe" % "2.5-0.7.0"
    )
    
    libraryDependencies += guice
    
    routesGenerator := InjectedRoutesGenerator
    
    //scalariformSettings
    
    flywayUrl := "jdbc:mysql://localhost/spetstore?autoReconnect=true&useSSL=false"
    
    flywayUser := "spetstore"
    
    flywayPassword := "phou8Igh"
    
    flywayLocations := Seq("filesystem:conf/db/migration/default")
    
[/code]

> [error] override def extract(

の一行について、エラーが出ているファイルの冒頭のimportの追加と、application.confとbuild.sbt、plugin.sbt以外のサンプルのファイルには、全く手を加えていないため、原因はマイグレーションがうまくいっていないからではないか、と考えているのですが、見当がつきません。

同じような症状のご経験がおありの方、経験豊富な方がいらっしゃいましたならば、ご回答いただければ幸いです。


CC BY-SA 3.0
2018-04-06T12:26:07.443
43010
2018-04-06T12:45:54.080
2020-06-17T08:14:45.997
-1
28048
question
scala playframework sbt
erroneous or inaccessible type / play.sbt.PlayExceptions$CompilationException