Questions tagged [scalatra]

Scalatra is a tiny Scala web framework, inspired by Sinatra.

Scalatra is a microframework written in Scala. It is a port of the Sinatra framework written in Ruby. Scalatra can be expanded into a minimal but full-featured model-view-controller web framework.

Website: http://scalatra.org/

Source: https://github.com/scalatra/scalatra

309 questions
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

FAILED org.eclipse.jetty.annotations.ServletContainerInitializersStarter@59309333

I'm working on Spark application which is build using sbt,scalatra when i compile a project, i get following error $ my-spark-app git:(master) ✗ sbt [info] Loading project definition from…
KARTHIKEYAN.A
  • 18,210
  • 6
  • 124
  • 133
0
votes
1 answer

How to troubleshoot SBT's library dependency warnings?

I'm trying to build a "hello world"-esque app that uses Spark streaming to stream data from a Kafka broker (this works), filters/processes this data, and pushes it to a (local) web browser using the Scalatra web framework and its supported web…
EyeWrite
  • 233
  • 2
  • 6
0
votes
1 answer

Download Excel as xlsx instead of zip format in Scalatra

I'm writing the Excel Workbook created using Apache POI to the response object directly as follows without creating a file: val outputStream: ByteArrayOutputStream = new…
Putt
  • 299
  • 4
  • 10
0
votes
1 answer

How can I include fields from a superclass in the generated Swagger spec (using Scalatra+Swagger)?

I have this case class that's extending an abstract class: @ApiModel(description = "A price for an offer.") case class OfferPrice( override val amount: Double, override val taxAmount: Double, …
L42
  • 3,052
  • 4
  • 28
  • 49
0
votes
1 answer

Some SBT dependencies are ignored

I use SBT to include dependencies in my project, but I couldn't find the reason why some dependencies are ignored randomly. Even if they exist in .ivy2/cache directory, I tried to delete the content of it and retry but I still have the same…
Ismail Addou
  • 383
  • 1
  • 2
  • 17
0
votes
1 answer

Scala, Sangria and Scalatra

We have a Scala application using Scalatra (http://scalatra.org/) as our web framework. I'm wondering if there are any good (or just any) resources out there on how to implement a GraphQL endpoint using Sangria (http://sangria-graphql.org/) and…
KimHafr
  • 2,922
  • 3
  • 26
  • 28
0
votes
1 answer

Scala Breeze does not find my file on a webserver, while Java does

I'm new to Scala, so there's probably something obvious I'm missing. I've got a Scalatra webserver running, with a csv-file in the same folder as the Scalatra servlet. The webserver recognizes the file just find, and the following…
P4nd4b0b3r1n0
  • 1,951
  • 3
  • 22
  • 31
0
votes
1 answer

Handle Any data type dynamically in Scala

I have a map in Scala returned by a function which is of type Map[String, Any] For example: val map: Map[String, Any] = Map("key1" -> "strVal", "key2" -> List[Map[String, Any]](), "key3" -> Map("k1" -> "v1")) Now the problem is, to work on the…
Putt
  • 299
  • 4
  • 10
0
votes
1 answer

Scalatra Swagger UI Unable To Map $ref For Nested Model

I created the JSON Schema path on my localhost. Copied the Swagger-UI module. Added the url in the Swagger-UI. I am getting this error that model not found. This is very strange because the JSON has all the models associated to the JSON Schema. Why…
gursahib.singh.sahni
  • 1,559
  • 3
  • 26
  • 51
0
votes
1 answer

Convert File to FileItem Using Scala

I have a web UI that accepts a file uploaded as scalatra.servlet.FileItem and is passed to several functions that do something with the file uploaded. This is working properly. Now, I need to make a junit test for this feature. With this junit test,…
oneDerer
  • 287
  • 3
  • 10
0
votes
1 answer

Handling chunked requests in Scalatra

I’m interesting in processing chunked requests with Scalatra. Does Scalatra support an access to the single chunk of chunked http request? Or I only have to wait the end of a chunked request and process the whole request after?
StEVee
  • 48
  • 4
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…
0
votes
1 answer

Handling huge number of fields in scalatra model

I'm building a rest api using scalatra and cassandra. My cassandra data model is having 1000+ fields. I need to read these fields into scalatra middleware and do a lot of json manipulation as per business logic. What are the ways in which I can…
Gayatri Mahesh
  • 327
  • 1
  • 3
  • 12
0
votes
0 answers

Persistence in Scalatra

I am writing a web app with a angularJS front-end and Scalatra back-end. I have followed this tutorial on adding persistence using Slick and H2: http://www.scalatra.org/2.4/guides/persistence/slick.html I want to know how to have the data in the…