Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8262173
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T03:40:56+00:00 2026-06-08T03:40:56+00:00

I am using Slick (Scalaquery) in my play framework application. According to slick tutorial

  • 0

I am using Slick (Scalaquery) in my play framework application. According to slick tutorial – I can define a projection for columns I want to insert into. (I am defining this projection because my index is an auto-incrementing column.) But, when I use this projection in an insert, I get a type-error saying:

[NoSuchMethodError: scala.Predef$.augmentString(Ljava/lang/String;)Ljava/lang/String;].

My model is defined like this:

package models

import play.api.db._
import play.api.Play.current

import scala.slick.driver.PostgresDriver.simple._
import scala.slick.ql.{MappedTypeMapper}
import scala.slick.session.{Session, Database}

case class Book(name: String, filename: String)

object Book extends Table[(Long, String, String)]("book") {

  lazy val database = Database.forDataSource(DB.getDataSource())
  def id = column[Long]("id", O PrimaryKey, O AutoInc)
  def name = column[String]("name", O NotNull)
  def filename = column[String]("filename", O NotNull)
  def * = id ~ name ~ filename
  def withoutId = name ~ filename

  def findAll() : Seq[Book] = database.withSession { implicit db:Session =>
    (for(t <- this) yield t.name ~ t.filename).list.map(attrs => Book(attrs._1, attrs._2))
  }

  def create(book: Book): Unit = database.withSession { implicit db:Session =>
    this.withoutId insert(book.name, book.filename)
  }

}

Here is the stack trace:

! @6b1eg7f2d - Internal server error, for request [POST /addBook] ->

play.core.ActionInvoker$$anonfun$receive$1$$anon$1: Execution exception [[NoSuchMethodError: scala.Predef$.augmentString(Ljava/lang/String;)Ljava/lang/String;]]
    at play.core.ActionInvoker$$anonfun$receive$1.apply(Invoker.scala:134) [play_2.9.1-2.0.2.jar:2.0.2]
    at play.core.ActionInvoker$$anonfun$receive$1.apply(Invoker.scala:115) [play_2.9.1-2.0.2.jar:2.0.2]
    at akka.actor.Actor$class.apply(Actor.scala:318) [akka-actor-2.0.2.jar:2.0.2]
    at play.core.ActionInvoker.apply(Invoker.scala:113) [play_2.9.1-2.0.2.jar:2.0.2]
    at akka.actor.ActorCell.invoke(ActorCell.scala:626) [akka-actor-2.0.2.jar:2.0.2]
    at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:197) [akka-actor-2.0.2.jar:2.0.2]
Caused by: java.lang.NoSuchMethodError: scala.Predef$.augmentString(Ljava/lang/String;)Ljava/lang/String;
    at scala.slick.driver.BasicSQLUtilsComponent$class.quoteIdentifier(BasicSQLUtilsComponent.scala:12) ~[slick_2.10.0-M4-0.10.0-M2.jar:0.10.0-M2]
    at scala.slick.driver.PostgresDriver$.quoteIdentifier(PostgresDriver.scala:69) ~[slick_2.10.0-M4-0.10.0-M2.jar:0.10.0-M2]
    at scala.slick.driver.BasicStatementBuilderComponent$InsertBuilder.appendNamedColumn(BasicStatementBuilderComponent.scala:400) ~[slick_2.10.0-M4-0.10.0-M2.jar:0.10.0-M2]
    at scala.slick.driver.BasicStatementBuilderComponent$InsertBuilder.scala$slick$driver$BasicStatementBuilderComponent$InsertBuilder$$f$1(BasicStatementBuilderComponent.scala:387) ~[slick_2.10.0-M4-0.10.0-M2.jar:0.10.0-M2]
    at scala.slick.driver.BasicStatementBuilderComponent$InsertBuilder$$anonfun$scala$slick$driver$BasicStatementBuilderComponent$InsertBuilder$$f$1$1.apply$mcVI$sp(BasicStatementBuilderComponent.scala:377) ~[slick_2.10.0-M4-0.10.0-M2.jar:0.10.0-M2]
    at scala.collection.immutable.Range.foreach$mVc$sp(Range.scala:75) ~[scala-library.jar:0.11.3]

Can someone help me by pointing out what’s wrong with my insert?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T03:40:57+00:00Added an answer on June 8, 2026 at 3:40 am

    SLICK is not supported on Scala 2.9 (as used by Play). All “proper” SLICK builds (in the scala.slick namepace and with the new frontend) require Scala 2.10.0-M4 or -M5. The latest supported version on Scala 2.9 is ScalaQuery 0.10.0-M1.

    Judging by the feature you’re using in the snippet, everything should work the same way with ScalaQuery 0.10.0-M1 or even 0.9 (except for the different imports).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using LWJGL and Slick framework to load Textures to my OpenGL-application. I'm using
I'm using Slickgrid but I'd prefer not to use slick.model.js . How can I
How can I unselect all rows in a Slick Grid? I'm using RowSelectionModel and
I m using MVC Contrib grid in the application , i want to change
I'm creating an app using the very slick KnockoutJS library, but I've run into
Can someone please clarify using a SIMPLE user story the full slice of what
Using a populated Table Type as the source for a TSQL-Merge. I want to
using this http://bl.ocks.org/950642 we can see how to add images to nodes, the question
I basically want a method I can call that will set a boolean to
I am using this code, which was snipped and modified from the Slick Wiki

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.