Questions tagged [scalatra-sbt]

20 questions
81
votes
9 answers

How to prevent java.lang.OutOfMemoryError: PermGen space at Scala compilation?

I have noticed a strange behavior of my scala compiler. It occasionally throws an OutOfMemoryError when compiling a class. Here's the error message: [info] Compiling 1 Scala source to…
BumbleGee
  • 2,031
  • 3
  • 18
  • 18
5
votes
4 answers

How can one change the location of the "webapp" directory for a Scalatra application?

By default, Scalatra expects the "webapp" directory to be at src/main/webapp. How could that be changed to, e.g., content/doc-root? sbt allows for customizing its default directories using something like the following: scalaSource <<=…
Chris W.
  • 1,680
  • 16
  • 35
3
votes
1 answer

JSONWebTokens in Scalatra

So I'm trying to secure my web application by using JWT in Scalatra. At the moment I'm using Scentry with both User-Password and RememberMe strategies and my intention is to swap the cookie-based authentication in RememberMe strategy with JWT…
Hellzzar
  • 185
  • 1
  • 9
3
votes
2 answers

java.lang.NoClassDefFoundError: org/eclipse/jetty/plus/webapp/PlusConfiguration

I was following the tutorial from the Scalatra docs, installed the Consript and Giter8 and initialized the project using g8 as described. However when I cannot start the Jetty container using container:start as I am getting following…
Karel Horak
  • 1,022
  • 1
  • 8
  • 19
2
votes
1 answer

Scalatra could not find or load main class

I have hello world scalatra application. I added scalatra-sbt plugin and: val myDistSettings = DistPlugin.distSettings ++ Seq( mainClass in Dist := Some("WebServerLauncher"), memSetting in Dist := "2g", permGenSetting in Dist :=…
0xAX
  • 20,957
  • 26
  • 117
  • 206
2
votes
1 answer

deploy scalatra app on heroku error plugin not found

I followed the guide of deploying a Scalatra app on Heroku [lien] http://www.scalatra.org/guides/deployment/heroku.html#toc_177 and I get the following error: > [error] (*:update) sbt.ResolveException: unresolved dependency:…
yotta
  • 35
  • 4
1
vote
1 answer

Scalatra - not found: object scalate

Context: I'm looking to pick up Scalatra for the first time. I'm following instructions from Scalatra In Action as well as the sample code repo provided. I'm able to get a template project created using g8. When I update the code in the…
emalcolmb
  • 1,585
  • 4
  • 18
  • 43
1
vote
2 answers

how to return custom json in scalatra

Scalatra Code: import org.scalatra._ import org.json4s.{DefaultFormats, Formats} import org.scalatra.json._ class AppServlet extends AppStack with JacksonJsonSupport{ protected implicit lazy val jsonFormats: Formats = DefaultFormats …
Hassan Abbas
  • 1,166
  • 20
  • 47
1
vote
0 answers

Can't use scalatra authentication with latest version 2.5.0

I am trying build a basic authentication demo project with Scalatra. I am not able to find the right dependency for "scalatra-auth". My scala version is 2.11.8. I am bound to use scalatra version 2.2.0 Are there any recent developments in…
Manish Mishra
  • 796
  • 6
  • 21
1
vote
0 answers

Scalatra set port on http server

I want to use scalatra for my http server mocks, I´m using gradle to run my bdd test. I´ve been reading the documentation but I cannot find a way to specify the port where to listen without use scala.build, but again my problem is that my project…
paul
  • 12,873
  • 23
  • 91
  • 153
0
votes
1 answer

Scala- Conscript - "An unexpected error occurred: Please check your internet connection"

Context: I'd like to install conscript and giter8 so that I can more efficiently create and work with Scalatra project files. I've followed the instructions here and here to download and run the jar. When I do so I get the following error. I get the…
emalcolmb
  • 1,585
  • 4
  • 18
  • 43
0
votes
1 answer

unable to run web-app developed using scalatra scala

I have developed a web app using scalatra 2.6.3 and scala 2.11.8 for the first time and it is not getting executed using jar. Below are my dependencies in build.sbt scalaVersion := "2.11.8" val scalatraVersion = "2.6.3" dependencyOverrides +=…
Monika
  • 143
  • 2
  • 3
  • 11
0
votes
1 answer

Scalatra livereload when changing static files such as *.js or *.css in the webapp dir

So after running the command recommended in Scalatras guides, at root dir: $ sbt > ~;jetty:stop;jetty:start I get jetty to reload changes when I make changes in scala files, but if I make changes in js or css I must end jetty and relaunch the same…
CommonSenseCode
  • 23,522
  • 33
  • 131
  • 186
0
votes
2 answers

Jetty-webapp unknown artifact in sbt

I created Scalatara application to build a web service. It uses Jetty server and it was included in the build.sbt file when I created the project itself. But when I try to start the jetty server using the command - jetty:start, it shows me an error…
Rajashree Gr
  • 519
  • 1
  • 9
  • 18
0
votes
1 answer

Can't import from slick.driver.H2Driver.simple._ in Scala

I'm trying to use Slick in Scala, I've followed the docs and the examples, installed the sbt dependencies and I have this problem: api-scala\src\main\scala\com\example\app\MyScalatraServlet.scala:7: value simple is not a member of object…
1
2