Questions tagged [lift]
An open source web application framework written in Scala
1,115
questions
1
vote
1
answer
44
views
Strange type mismatch error in a legacy LiftWeb application
In a legacy application that I'm debugging I have
import _root_.net.liftweb.mapper._;
import _root_.java.math.MathContext
class User
extends LongKeyedMapper[User]
with IdPK
{
import User._;
def ...
-2
votes
1
answer
49
views
On Premises Application to AWS LIft And Shift Application Migration
On Premises Application is going to move to AWS Cloud in EC2 as AWS Lift and Shift MIgration.Currently On-Premises applications are running in Tomcat. Once we are going to migrate it to AWS as a Lift ...
0
votes
0
answers
13
views
What means Schemifier.schemify method in liftweb?
I am updating a liftweb project and in Boot.scala, I have this line:
Schemifier.schemify(true, Log.infoF _, HistoricIndicator)
If I try to compile, this line has an error, because a field not found ...
5
votes
1
answer
217
views
Is there a way to commute monads automatically?
I have written a program to pull a Maybe out of a pair:
deMaybe :: (a, Maybe b) -> Maybe (a, b)
deMaybe (_, Nothing) = Nothing
deMaybe (x,Just y) = Just (x, y)
I know that Maybe is a monad and (,) ...
0
votes
0
answers
37
views
Multiple transporters in one elevator
Hi again a new question about lifts in Anylogic,
Is there an manner to simulate that if there are multiple transporters waiting at an elevator that they can together take an lift (since the lift has a ...
0
votes
1
answer
29
views
Lift assigned to specific agent type Anylogic
I've a question, in my model I've multiple lift areas with 2 lifts, but only 1 lift is assigned for good transport (so agent type=AGV ) may use this lifts and the other lift is assigned for persons (...
0
votes
0
answers
50
views
Scala Yield - Liftweb Json for loop not working for single element
The following code is working perfectly for the json has more than one elements but when it encountered single element, it is failing and throwing the following exception.
"Exception":"...
2
votes
1
answer
471
views
Lift, drag or buoyancy using Pymunk
I am new to Pymunk. Thanks to some good tutorials I managed to make my first simulation quite easily. I am now wondering if it is possible to simulate air drag and/or buoyancy easily. Any example of ...
1
vote
1
answer
1k
views
Invalid parameter: JSON must contain an entry for 'default' or 'APNS_SANDBOX'. => APNS Error in Scala (lift framework)
I'm getting APN Invalid parameter: JSON must contain an entry for 'default' or 'APNS_SANDBOX'. the log is here
And the code block is here:
how to fix this? this is built in scala lift framework.
0
votes
1
answer
283
views
Can't install net.liftweb:lift-json_2.13 in Databricks
I am trying to install net.liftweb:lift-json_2.13:3.4.1 into a Databricks cluster (Apache Spark 2.4.4, Scala 2.11)
However I am getting the following error:
java.lang.RuntimeException: unresolved ...
1
vote
1
answer
65
views
Scala throws an error when extract json values using lift web
I'm trying to extract the json response to a case class in my project, but I'm getting an error stating:
Error Message is : No usable value for httpCode Did not find value which can be converted into ...
0
votes
1
answer
25
views
Scala lift's CssBind.calculate does not work for Seq
i'm having trouble while testing Css selectors.
if i have, let's say, the following CssSel:
val mySelector = ".class *" #> "my awesome super String"
the following works:
mySelector....
1
vote
1
answer
234
views
Can not lift multiple parameters in a monad
Hello i am trying to do the following:
module MyMonad where
f::(Monad m),=>m (a->b->c)->m a -> m b -> m c
f mf ma mb=
ma >>= \a ->
mb >>= \b ->
mf >&...
0
votes
1
answer
4k
views
Databricks Scala net.liftweb.json parse() cannot initial error
I can't find anything else relevant on the web.
I tried this with both versions of lift 2.12 & 2.10
My cluster/notebook is in apache spark 2.3 & scala 2.11
this code
import net.liftweb.json....
0
votes
1
answer
53
views
json deserializer with support for parameterized Case Classes
Just encountered that liftweb.json does not work with parameterized Case Classes.
The following fails at runtime:
case class ResponseOrError[R](status: String, responseData: Option[R], exception: ...
0
votes
3
answers
1k
views
Lift state up between components in react
I have a problem with the communication between react components. I want to pass values between the components "ProductNameSave.js" to "readJson.js". The values from "ProductNameSave.js" came from the ...
0
votes
1
answer
346
views
IntelliJ unable to resolve certain types, ex: EnumValue on a Mongo record - Scala
For Example:
object CampaignTypes extends Enumeration {
type CampaignType = Value
val ABC,DEF = Value
}
object campaignTypeId extends EnumNameField(this, CampaignTypes) {
override val ...
0
votes
1
answer
51
views
Extraction an array from JSON string in spark
I am receiving a JSON String on kafka topic of form
{"user_id":"4BtIrO4vgJUZG3wUxDjihnKbYvw2","travel_mode":"plane","travel_with":["family","couple"],"travel_preferences":"national"}
Now I am using ...
0
votes
0
answers
121
views
How can you write to a binary file from a local file in iterations of 5MB Chunks in Scala?
I am currently trying to take a 15MB video file that is stored locally on my machine and write that file into chunks of 5MB in binary file format. I am trying to get this to work for any file size to ...
0
votes
1
answer
854
views
How do you create a file input stream in Scala to download a video from a URL?
I am trying to download the bytecode from a video hosted on facebook CDN with a URL to the video they provide. I am trying to use the approach of creating a fileinputStream, but I don't see that much ...
0
votes
0
answers
203
views
scala upgrade to Java 8
I get errors similar to following when I upgrade to Java 8.
[error] error while loading CharSequence, class file
'/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.101-3.b13.el6_8.x86_64/jre/lib/rt.jar(java/...
1
vote
1
answer
4k
views
Plotting multiple lift curves
I am new to R and trying to learn. I am trying to plot lift curves of multiple classifiers in one graph. I can't figure out a way to do it. I know the below two classifiers are essentially the same ...
0
votes
1
answer
270
views
Extracting a case class with an upper bound
I want to extract a case class from a JSON String, and reuse the code for every class.
Something like this question would have been perfect. But this means that I have to write for every class I want ...
1
vote
1
answer
83
views
Scala liftweb framework
I have two checkboxes and on submit I want the user to download two different files, how do I go about this? I need help as am not able to get any online material on this. I am new to this framework.
...
-1
votes
1
answer
188
views
PayPal for Play2 / Scala
I am looking for a decent implementation of Paypal's IPN for reuse in a play application.
I found https://github.com/liftmodules/paypal but have no idea if this can easily be reused or ported or if ...
1
vote
2
answers
540
views
I want to display a confirmation dialog before displaying output
I want to display a confirmation dialog box like "Do you want to continue?" If "yes", I want to popup a message displaying form output, if "No" I want to stay on the same page.
In the code shown ...
2
votes
1
answer
684
views
Tomcat returning HTTP 500 with one-byte responses
I've been trying to track down some HTTP 500s being sent by my application. They appear as so in the localhost_access_log.txt:
127.0.0.1 - - [30/Aug/2017:16:27:46 +0000] "POST /user/174 HTTP/1.1" 500 ...
0
votes
1
answer
53
views
Specify a list of values for a key in Lift framework config
In scala-lift v2.6, src/main/resources/app/confg/parameters.conf looks very much like a json:
env_type {
dev {
greeting = "greeting: dev"
lift {
runMode = "development"
}
...
0
votes
1
answer
290
views
Modifying the default JSESSIONID cookie, Scala Lift Framework
My goal is to modify the default JSESSIONID cookie (the servlet cookie) but via the scala code.
It works just fine if I directly hard code the values in web.xml like below.
web.xml
<?xml version=...
0
votes
2
answers
260
views
Lift/Scala: How to redirect to a page and add a cookie?
I need to redirect user to the homepage and add a cookie.
Following code only redirects but doesnt add a cookie.
S.addCookie(HTTPCookie("foo", "bar"))
S.redirectTo("/")
Please advise. Thanks.
...
15
votes
3
answers
15k
views
IntelliJ IDEA plugin to fold .conf files?
I have a Scala app built with Lift framework. It has a few .conf files. When I open those .conf files in my IntelliJ IDEA Ultimate Fancy Pants Edition, I do not see any buttons to fold those curly ...
0
votes
1
answer
567
views
Lift/Scala: How do I unit test rest response of an api?
I would like to test the response of the following rest api for valid and invalid requests. For exaple given a valid request it should return 200 and for invalid request it should return 400. How can ...
0
votes
1
answer
37
views
Showing parts of a sitemap in different LocGroup
I have a problem with the LocGroup in Liftweb 3.0.
The main goal is to show a normal user Menu like this:
val userMenu = List(
Menu("First") / "100_first" / "100_first_main" submenus (
Menu("...
2
votes
1
answer
2k
views
Apache Spark Object not Serializable Exception for json parser
I am reading the data[json as String] from kafka queue and tring to parse json as String into case class using liftweb json api.
here is the code Snippet
val sparkStreamingContext = new ...
1
vote
1
answer
54
views
Lift ReplaceOptions causes select to lose action
I make this call to set up a select with a handler:
val options:List[(String,String)] = List(("1","test"),("2","test2"))
"#drugSelect" #> ajaxSelect(drugOptions, Empty, handler)
At this point I ...
0
votes
1
answer
572
views
SBT - How to configure ssl for Jetty running locally?
I need to implement local ssl for my project for an OAuth implementation. I read through the xsbt-web-plugin page (here). I created the keystore as advised here.
keytool -genkey -alias localhost -...
1
vote
1
answer
180
views
lift libs in Eclipse ScalaIDE is incompatible with all scala versions
Last day i start Scala with lift framework and Eclipse IDE. after checking this link:
http://scala-ide.org/docs/tutorials/lift24scalaide20/
I setup my project with eclipse. the first time the lift-...
1
vote
1
answer
55
views
intercept lift rest request and verify parameters
I want to validate REST requests (GET and PUT) in LIFT before processing it. i.e. i need to check whether requests has a parameter requestor. if not need to response with exception saying missing ...
0
votes
2
answers
984
views
scala return list of strings to html
I have the code below which is supposed to take retrieve a list of strings and return them to an option menu. However, I get an error at the #> after the autocomplete in the snippet that says "could ...
1
vote
1
answer
133
views
Trying to populate list using scala and lift
I am trying to populate a list using scala and lift and am getting a class not found exception. The code is directly out of the Lift in Action book.
Here is the snippet code with dummy data included ...
0
votes
1
answer
449
views
Convert case class containing objects containing mutableMap to json and back using lift
I have a case class as :
case class Cart(cart_id :UUID, cart_entries :Map[String,CartEntry]){
//override def toString: String = "Saini CartId = " + cart_id.toString
}
I am using net.liftweb.json....
0
votes
1
answer
1k
views
Converting to net.liftweb.json.JsonAST.JObject Lift in Scala
I am trying to construct a JSON object from a list where key is "products" and value is List[Product] where Product is a case class.But I am getting error that says "type mismatch; found : (String, ...
0
votes
1
answer
280
views
Scala/Lift- How do I do a page redirect with params?
I need to redirect all the requests for 'toolsearch' page to 'search' page with all the parameters
so localhost:8080/toolsearch#?q=20 needs to be redirected to localhost:8080/search#?q=20
I am ...
0
votes
1
answer
52
views
SBT does not propagate changes in webapp when using xsbt-web-plugin and JRebel
The set up is as follows:
Lift Web
xsbt-web-plugin
sbt-jrebel-plugin
JRebel
My static web files (html, etc) are in /src/webapp
I run
# sbt
> jetty:start
> ~compile
Problem: even thought ...
2
votes
1
answer
95
views
LiftWeb RESTHelper RestContinuation unit testing
I receive error when trying to test async request handlers that use RestContinuation. The error is simply: ContinuationException: : Continuation. I use WebSpec for testing.
I followed this manual ...
0
votes
1
answer
147
views
Slick and liftweb
As far as I understand latest Slick documentation, there is no straight way to get results immediately from Slick queries, as they always return Future (wrapped, but still).
And liftweb requires ...
0
votes
1
answer
25
views
scala Liftweb - retrieving content of tag
Im new to lift, so the problem is:
I have a div and a textarea in it. I also have a button, and I want to get #code textarea content without refreshing page (actually, it isn't important)
I tried ...
1
vote
1
answer
85
views
How to change the state of a ajaxSubmit in Lift on page load
SHtml.ajaxSubmit
Am using Scala with Lift. I am trying to create a SHtml.ajaxSubmit() using the CSS binding, and I want it enabled or disabled based on an external property. So far I managed to ...
1
vote
2
answers
2k
views
Utilizing Library Dependencies in sbt plugin
I'm working with Lift 3 and trying to get FlywayDb to work, in order to manage database migrations (via Slick). There is a Flyway sbt plugin for Slick, described here. Following those instructions, I ...
0
votes
0
answers
294
views
json4s convert inherited class to json
I am trying to serialize / deserialize to json with json4s native the following case class :
case class UserId(value: String) extends MappedTo[String] with Guid
case class FootballTeamId(value: ...