Michael
Michael

Reputation: 42050

NoSuchMethodError: Matcher.quoteReplacement during sbt execution on Ubuntu

I installed sbt from the Typesafe repository as it is suggested here:

When I run sbt I'm facing the following error:

~/fun/sbt$ sbt
Starting sbt: invoke with -help for other options
java.lang.NoSuchMethodError: method java.util.regex.Matcher.quoteReplacement with signature (Ljava.lang.String;)Ljava.lang.String; was not found.
   at xsbt.boot.ConfigurationParser$.substituteVariables(ConfigurationParser.scala:22)
   at xsbt.boot.ConfigurationParser.id(ConfigurationParser.scala:106)
   at xsbt.boot.ConfigurationParser$$anonfun$3.apply(ConfigurationParser.scala:66)
   at xsbt.boot.ConfigurationParser$$anonfun$processSection$1.apply(ConfigurationParser.scala:101)
   at xsbt.boot.ConfigurationParser.process(ConfigurationParser.scala:102)
   at xsbt.boot.ConfigurationParser.processSection(ConfigurationParser.scala:101)
   at xsbt.boot.ConfigurationParser.xsbt$boot$ConfigurationParser$$apply(ConfigurationParser.scala:60)
   at xsbt.boot.ConfigurationParser$$anonfun$apply$3.apply(ConfigurationParser.scala:52)
   at xsbt.boot.Using$.withResource(Using.scala:11)
   at xsbt.boot.Using$.apply(Using.scala:10)
   at xsbt.boot.Configuration$$anonfun$parse$1.apply(Configuration.scala:15)
   at xsbt.boot.Using$.withResource(Using.scala:11)
   at xsbt.boot.Using$.apply(Using.scala:10)
   at xsbt.boot.Configuration$.parse$fcb646c(Configuration.scala:15)
   at xsbt.boot.Launch$.apply(Launch.scala:14)
   at xsbt.boot.Boot$.runImpl(Boot.scala:25)
   at xsbt.boot.Boot$.main(Boot.scala:15)
   at xsbt.boot.Boot.main(Boot.scala)
Error during sbt execution: java.lang.NoSuchMethodError: method java.util.regex.Matcher.quoteReplacement with signature (Ljava.lang.String;)Ljava.lang.String; was not found.

Upvotes: 2

Views: 473

Answers (1)

user2263578
user2263578

Reputation: 215

The only reason I can think of for sbt to fail this way is an old Java version. SBT requires Java 6 or later. Run java -version to know your version.

Upvotes: 2

Related Questions