0

I have tried upgrading the xsbt plugin to 1.0.0-M7 in my scalatra project but scalatra does not seem to be compatible with this version. When I try to reload my project I get the error below. I have tried with version 2.3.0 of scalatra

Regards Des

java.lang.NoClassDefFoundError: com/earldouglas/xsbtwebplugin/PluginKeys$
    at org.scalatra.sbt.ScalatraPlugin$.<init>(ScalatraPlugin.scala:15)
    at org.scalatra.sbt.ScalatraPlugin$.<clinit>(ScalatraPlugin.scala)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:270)
    at sbt.ModuleUtilities$.getObject(ModuleUtilities.scala:13)
    at sbt.Load$.loadPlugin(Load.scala:644)
    at sbt.Load$$anonfun$loadPlugins$1.apply(Load.scala:641)
    at sbt.Load$$anonfun$loadPlugins$1.apply(Load.scala:641)
    at scala.collection.immutable.Stream$$anonfun$map$1.apply(Stre...
user79074
  • 4,937
  • 5
  • 29
  • 57
  • What do you mean by "reload my project"? Can you post your sbt configuration? I don't seem to run into this problem when I try it: https://github.com/earldouglas/so-25991296 – earldouglas Sep 24 '14 at 15:49
  • Create a new scalatra project doing: g8 scalatra/scalatra-sbt. Add the line addSbtPlugin("com.earldouglas" % "xsbt-web-plugin" % "1.0.0") to the plugins.sbt. Do an sbt compile and the above error is generated. – user79074 Feb 14 '15 at 11:52
  • Ah, I see the problem - scalatra-sbt [depends on 0.9.0 of xsbt-web-plugin](https://github.com/scalatra/scalatra-sbt/blob/62fcfc623bab59814284f71f0ae20f9510790bfe/build.sbt#L19), so it tries to load classes that just don't exist in 1.0.0. I'll submit a patch for scalatra-sbt. In the meantime, you'll have to use xsbt-web-plugin 0.9.0. – earldouglas Feb 14 '15 at 20:00
  • Note: the above link has been updated to https://earldouglas.com/ext/stackoverflow.com/questions/25991296/ – earldouglas Feb 19 '17 at 01:56

0 Answers0