This page is a collection of popular tools, libraries, and frameworks for the Scala programming language.Back to top
libraryDependencies ++= Seq( guice, "org.scalatestplus.play" %% "scalatestplus-play" % "3.1.2" % Test, jdbc, "mysql" % "mysql-connector-java" % "5.1.46", "com.typesafe.play" %% "anorm" % "2.5.3" )
[error] (run-main-0) java.lang.OutOfMemoryError: GC overhead limit exceeded java.lang.OutOfMemoryError: GC overhead limit exceeded
The solution to the problem was to allocate more memory when I start SBT. To give SBT more RAM I first issue this command at the command line:
If you want to use Lightbend Config configuration files in your Scala or Java application, here’s a quick example of how to configure and use Lightbend Config in your application. In this case I’m specifically using Scala and SBT.
This example shows how to connect-to and read-from multiple databases with ScalikeJdbc (a Scala JDBC library). I assume you already know how to use ScalikeJdbc with one database, so I’m only going to show the code and configuration file. (I’m not going to explain the details.)
The ScalikeJdbc configuration file
My ScalikeJdbc code is in an SBT project, so the ScalikeJdbc configuration file is at src/main/resources/application.conf:
Play Framework FAQ: How do I generate a secret key (application key) with Play Framework 2.6?
Answer: Use the
playGenerateSecret command in the SBT shell. Here’s an example:
$ sbt [Scrupal6] $ playGenerateSecret [info] Generated new secret: TozWYjreCna1QlVBGqfK4D/C6wZyQOm9gm<9;D_KO@]n [success] Total time: 0 s, completed Apr 4, 2018 2:21:57 PM
January 8, 2018: I just added lessons on SBT, ScalaTest, and a brief introduction to FP to the “Hello, Scala” website.
I haven’t tried it yet, but Pants is a build system that supports Scala and Java projects (and other languages).