[Lift] Re: building lift
that fixed it. thank you very much, On Mon, Jul 20, 2009 at 1:56 AM, Derek Chen-Beckerdchenbec...@gmail.com wrote: I've added in an exclusion to prevent this version of the lib from being pulled. We generally use the geronimo version of JEE libs due to a less restrictive license. Derek On Sat, Jul 18, 2009 at 8:00 PM, Ross Mellgren dri...@gmail.com wrote: It looks like the maven central repository only has the POM and not the JAR. Try adding this repository to your POM: repository idjava.net/id urlhttp://download.java.net/maven/2/url /repository Or manually downloading JTA and putting it in your jre/lib directory. -Ross On Jul 18, 2009, at 9:49 PM, Wilson MacGyver wrote: Hi, I git clone the lift source from git hub. then run mvn install to build it. It fails with Downloading: http://scala-tools.org/repo-releases/javax/transaction/jta/1.0.1B/jta-1.0.1B.jar [INFO] Unable to find resource 'javax.transaction:jta:jar:1.0.1B' in repository scala-tools.org (http://scala-tools.org/repo-releases) Downloading: http://scala-tools.org/repo-snapshots/javax/transaction/jta/1.0.1B/jta-1.0.1B.jar [INFO] Unable to find resource 'javax.transaction:jta:jar:1.0.1B' in repository scala-tools.org.snapshots (http://scala-tools.org/repo-snapshots) Downloading: http://repo1.maven.org/maven2/javax/transaction/jta/1.0.1B/jta-1.0.1B.jar [INFO] Unable to find resource 'javax.transaction:jta:jar:1.0.1B' in repository central (http://repo1.maven.org/maven2) [INFO] [ERROR] BUILD ERROR [INFO] [INFO] Failed to resolve artifact. Missing: -- 1) javax.transaction:jta:jar:1.0.1B is this intentional due to some license issue with the jta jar? Thanks, Mac -- Omnem crede diem tibi diluxisse supremum. -- Omnem crede diem tibi diluxisse supremum. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Best practice for creating a view-less, lightweight controller/dispatcher
Good day, guys. First of all, David, thanks for a great tool. I started my first project yesterday and it's been fun so far. I'm creating a URL shortener, and would like to know what the best practice is for creating a light-weight controller that has no view (no associated form). Basically, clients will request: http://localhost:8080/u/123 ...and I will redirect to a URL which was saved under id=123 Here's my first attempt at mapping to the handler for these kind of URLs: line 43/44: http://github.com/opyate/yauser/blob/2ce8feb7da369f7fc3ef755a192c42ae40418811/src/main/scala/bootstrap/liftweb/Boot.scala And, the handler: http://github.com/opyate/yauser/blob/2ce8feb7da369f7fc3ef755a192c42ae40418811/src/main/scala/com/opyate/yauser/snippet/OURL.scala This code does not work, at the moment. Here are the different use-cases and associated failures: 1) If I request: http://localhost:8080/u/123 ...I get The Requested URL /u/123 was not found on this server 2) If I request: http://localhost:8080/u/ ...I get The Requested URL /u/ was not found on this server 3) If I request: http://localhost:8080/u ...I get an HTTP 500 with: net.liftweb.http.ResponseShortcutException: Shortcut ... on the line in the handler which does the actual redirect. Thanks! -- juan Jonathan Swifthttp://www.brainyquote.com/quotes/authors/j/jonathan_swift.html - May you live every day of your life. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: Disabling the lift auto-reload on webapp restart?
Third, if you want the issue resolved, please open a ticket. Done On Jul 16, 6:27 pm, David Pollak feeder.of.the.be...@gmail.com wrote: On Thu, Jul 16, 2009 at 3:20 AM, Ellis ellis.whiteh...@gmail.com wrote: liftweb auto-reinjects it. Hmm, I know it puts some extra code in, but I stopped the auto-loading a few weeks ago by just editing the template file... Another possibility is to tell lift not to use jQuery. It's just a single command you need to put in Boot.scala, but I don't remember it off-hand. It's described in the jQuery section of David's Exploring Lift book, which you can download online. First, I didn't write Exploring Lift... better authors than me wrote it. Second, don't toss jQuery... it's not jQuery that's causing the problem. Lift has built in GC and Comet support. One of the two of those is causing the problem that's you are experiencing. If you pull jQuery, you'll just break a bunch of your application (and Lift puts in jQuery, or YUI or whatever Ajax library you've designated automatically in rendered pages unless you affirmatively disable GC and do not include Comet components in the page.) Third, if you want the issue resolved, please open a ticket. On Jul 15, 4:31 pm, fbettag fr...@bett.ag wrote: liftweb auto-reinjects it. On Jul 15, 2:27 pm, Ellis ellis.whiteh...@gmail.com wrote: This would interest me too. (but if you don't need jQuery, you can comment out the script... tag in the template, e.g. templates-hidden/default.html) On Jul 15, 1:18 pm, fbettag fr...@bett.ag wrote: The Auto-Reload feature done with jQuery really starts to get on my nerves, i often find my self going back to the tab in my firefox and trying to debug the last error i got via ajax in my firebug.. but it's all gone thanks to the auto-reload. Is there any way to turn it off? -- Lift, the simply functional web frameworkhttp://liftweb.net Beginning Scalahttp://www.apress.com/book/view/1430219890 Follow me:http://twitter.com/dpp Git some:http://github.com/dpp --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: Disabling the lift auto-reload on webapp restart?
@ellis, I too found this annoying, thats why I use java rebel as the classes are just replaced wholesale dynamically while the container is running - no need for a restart (unless its a major class change that it is unable to swap out). Cheers, Tim On Jul 20, 10:32 am, Ellis ellis.whiteh...@gmail.com wrote: Third, if you want the issue resolved, please open a ticket. Done On Jul 16, 6:27 pm, David Pollak feeder.of.the.be...@gmail.com wrote: On Thu, Jul 16, 2009 at 3:20 AM, Ellis ellis.whiteh...@gmail.com wrote: liftweb auto-reinjects it. Hmm, I know it puts some extra code in, but I stopped the auto-loading a few weeks ago by just editing the template file... Another possibility is to tell lift not to use jQuery. It's just a single command you need to put in Boot.scala, but I don't remember it off-hand. It's described in the jQuery section of David's Exploring Lift book, which you can download online. First, I didn't write Exploring Lift... better authors than me wrote it. Second, don't toss jQuery... it's not jQuery that's causing the problem. Lift has built in GC and Comet support. One of the two of those is causing the problem that's you are experiencing. If you pull jQuery, you'll just break a bunch of your application (and Lift puts in jQuery, or YUI or whatever Ajax library you've designated automatically in rendered pages unless you affirmatively disable GC and do not include Comet components in the page.) Third, if you want the issue resolved, please open a ticket. On Jul 15, 4:31 pm, fbettag fr...@bett.ag wrote: liftweb auto-reinjects it. On Jul 15, 2:27 pm, Ellis ellis.whiteh...@gmail.com wrote: This would interest me too. (but if you don't need jQuery, you can comment out the script... tag in the template, e.g. templates-hidden/default.html) On Jul 15, 1:18 pm, fbettag fr...@bett.ag wrote: The Auto-Reload feature done with jQuery really starts to get on my nerves, i often find my self going back to the tab in my firefox and trying to debug the last error i got via ajax in my firebug.. but it's all gone thanks to the auto-reload. Is there any way to turn it off? -- Lift, the simply functional web frameworkhttp://liftweb.net Beginning Scalahttp://www.apress.com/book/view/1430219890 Follow me:http://twitter.com/dpp Git some:http://github.com/dpp --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: Best practice for creating a view-less, lightweight controller/dispatcher
Change your dispatcher to be: LiftRules.dispatch.prepend { case r @ Req(u :: id :: Nil, , GetRequest) = () = { // lookup in your database here... Full(RedirectResponse(fullyQualifiedUrl)) } } I can then pass the id parameter to your database query then do a RedirectResponse which is the appropriate LiftResponse. In your snippet your using S.redirectTo which is not the correct context for its use. Does that help? Cheers, Tim On Jul 20, 11:03 am, Juan M Uys opy...@gmail.com wrote: Good day, guys. First of all, David, thanks for a great tool. I started my first project yesterday and it's been fun so far. I'm creating a URL shortener, and would like to know what the best practice is for creating a light-weight controller that has no view (no associated form). Basically, clients will request:http://localhost:8080/u/123 ...and I will redirect to a URL which was saved under id=123 Here's my first attempt at mapping to the handler for these kind of URLs: line 43/44:http://github.com/opyate/yauser/blob/2ce8feb7da369f7fc3ef755a192c42ae... And, the handler:http://github.com/opyate/yauser/blob/2ce8feb7da369f7fc3ef755a192c42ae... This code does not work, at the moment. Here are the different use-cases and associated failures: 1) If I request:http://localhost:8080/u/123 ...I get The Requested URL /u/123 was not found on this server 2) If I request:http://localhost:8080/u/ ...I get The Requested URL /u/ was not found on this server 3) If I request:http://localhost:8080/u ...I get an HTTP 500 with: net.liftweb.http.ResponseShortcutException: Shortcut ... on the line in the handler which does the actual redirect. Thanks! -- juan Jonathan Swifthttp://www.brainyquote.com/quotes/authors/j/jonathan_swift.html - May you live every day of your life. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Hudson not building?
Hi, It seems the latest Lift build on http://hudson.scala-tools.org/job/Lift/ is 10 days old, same with the jars in http://scala-tools.org/repo-snapshots/net/liftweb/lift-webkit/1.1-SNAPSHOT/ Yet, many changes have been committed to github which I assume is the master? I didn't notice until I tried making a release build since I'm building lift from source in the dev env. /Jeppe --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: Hudson not building?
Hey Jeppe, Thats strange, i've just kicked off a hudson build manually, so we'll see if it works or not - i'll report back shortly Derek / DPP can you look into this? Cheers, tim On Jul 20, 12:03 pm, Jeppe Nejsum Madsen je...@ingolfs.dk wrote: Hi, It seems the latest Lift build onhttp://hudson.scala-tools.org/job/Lift/is 10 days old, same with the jars inhttp://scala-tools.org/repo-snapshots/net/liftweb/lift-webkit/1.1-SNA... Yet, many changes have been committed to github which I assume is the master? I didn't notice until I tried making a release build since I'm building lift from source in the dev env. /Jeppe --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: Hudson not building?
ScalaModules is also not building and I do not know any reasons for that ... Heiko 2009/7/20 Timothy Perrett timo...@getintheloop.eu Hey Jeppe, Thats strange, i've just kicked off a hudson build manually, so we'll see if it works or not - i'll report back shortly Derek / DPP can you look into this? Cheers, tim On Jul 20, 12:03 pm, Jeppe Nejsum Madsen je...@ingolfs.dk wrote: Hi, It seems the latest Lift build onhttp:// hudson.scala-tools.org/job/Lift/is 10 days old, same with the jars inhttp:// scala-tools.org/repo-snapshots/net/liftweb/lift-webkit/1.1-SNA... Yet, many changes have been committed to github which I assume is the master? I didn't notice until I tried making a release build since I'm building lift from source in the dev env. /Jeppe -- My blog: heikoseeberger.name Follow me: twitter.com/hseeberger OSGi on Scala: www.scalamodules.org Lift, the simply functional web framework: liftweb.net --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: Hudson not building?
Jeppe, There is something odd going on with hudson it seems - even the manual build does nothing... the modules say that didnt run even tho its taking nearly an hour to complete. Derek, is this perhaps related to the increase in open file handles you made previously? Cheers, Tim On Jul 20, 12:15 pm, Timothy Perrett timo...@getintheloop.eu wrote: Hey Jeppe, Thats strange, i've just kicked off a hudson build manually, so we'll see if it works or not - i'll report back shortly Derek / DPP can you look into this? Cheers, tim On Jul 20, 12:03 pm, Jeppe Nejsum Madsen je...@ingolfs.dk wrote: Hi, It seems the latest Lift build onhttp://hudson.scala-tools.org/job/Lift/is10 days old, same with the jars inhttp://scala-tools.org/repo-snapshots/net/liftweb/lift-webkit/1.1-SNA... Yet, many changes have been committed to github which I assume is the master? I didn't notice until I tried making a release build since I'm building lift from source in the dev env. /Jeppe --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Article: Lift snippet selection - DispatchSnippet vs snippet reflection
Hey guys, Just posted a new article about lift snippets: http://is.gd/1FbDw - perhaps it will help someone :-) Cheers, Tim --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] how to create data transfer object in lift
Hi, i want to create DTO(data transfer object) of employee. Then i want to create list of this employee object. want to display this list on GUI. How can i do this in lift. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: Best practice for creating a view-less, lightweight controller/dispatcher
Thanks, Timothy, it works now! Your suggestion incorporated here: http://github.com/opyate/yauser/commit/eb7af882ea8bdcfc3e621e3b0b8e77ad72b8ef58 Yauser v 0.1-SNAPSHOT is now a fully functional URL shortener, but check the roadmap for future features. Thanks guys, Juan 2009/7/20 Timothy Perrett timo...@getintheloop.eu Change your dispatcher to be: LiftRules.dispatch.prepend { case r @ Req(u :: id :: Nil, , GetRequest) = () = { // lookup in your database here... Full(RedirectResponse(fullyQualifiedUrl)) } } I can then pass the id parameter to your database query then do a RedirectResponse which is the appropriate LiftResponse. In your snippet your using S.redirectTo which is not the correct context for its use. Does that help? Cheers, Tim On Jul 20, 11:03 am, Juan M Uys opy...@gmail.com wrote: Good day, guys. First of all, David, thanks for a great tool. I started my first project yesterday and it's been fun so far. I'm creating a URL shortener, and would like to know what the best practice is for creating a light-weight controller that has no view (no associated form). Basically, clients will request:http://localhost:8080/u/123 ...and I will redirect to a URL which was saved under id=123 Here's my first attempt at mapping to the handler for these kind of URLs: line 43/44: http://github.com/opyate/yauser/blob/2ce8feb7da369f7fc3ef755a192c42ae... And, the handler: http://github.com/opyate/yauser/blob/2ce8feb7da369f7fc3ef755a192c42ae... This code does not work, at the moment. Here are the different use-cases and associated failures: 1) If I request:http://localhost:8080/u/123 ...I get The Requested URL /u/123 was not found on this server 2) If I request:http://localhost:8080/u/ ...I get The Requested URL /u/ was not found on this server 3) If I request:http://localhost:8080/u ...I get an HTTP 500 with: net.liftweb.http.ResponseShortcutException: Shortcut ... on the line in the handler which does the actual redirect. Thanks! -- juan Jonathan Swift http://www.brainyquote.com/quotes/authors/j/jonathan_swift.html - May you live every day of your life. -- juan +44 7702 783 956 Stephen Leacockhttp://www.brainyquote.com/quotes/authors/s/stephen_leacock.html - I detest life-insurance agents: they always argue that I shall some day die, which is not so. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: Hudson not building?
I'm showing these errors in the log: Jul 20, 2009 5:31:30 AM hudson.model.AbstractProject checkout INFO: Lift #1045 aborted java.lang.InterruptedException at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireInterruptibly(AbstractQueuedSynchronizer.java:813) at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireInterruptibly(AbstractQueuedSynchronizer.java:1137) at java.util.concurrent.locks.ReentrantLock.lockInterruptibly(ReentrantLock.java:312) at hudson.model.AbstractProject.checkout(AbstractProject.java:800) at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:314) at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:266) at hudson.model.Run.run(Run.java:923) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:234) at hudson.model.ResourceController.execute(ResourceController.java:93) at hudson.model.Executor.run(Executor.java:119) Jul 20, 2009 5:31:30 AM hudson.model.Run run INFO: Lift #1045 main build action completed: FAILURE Jul 20, 2009 6:05:55 AM hudson.triggers.SCMTrigger$Runner runPolling SEVERE: Failed to record SCM polling hudson.plugins.git.GitException: Failed to fetch at hudson.plugins.git.GitAPI.fetch(GitAPI.java:92) at hudson.plugins.git.GitAPI.fetch(GitAPI.java:103) at hudson.plugins.git.GitSCM$1.invoke(GitSCM.java:143) at hudson.plugins.git.GitSCM$1.invoke(GitSCM.java:129) at hudson.FilePath.act(FilePath.java:552) at hudson.plugins.git.GitSCM.pollChanges(GitSCM.java:129) at hudson.model.AbstractProject.pollSCMChanges(AbstractProject.java:857) at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:382) at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:417) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619) I'm going to restart hudson and see if that helps... Derek On Mon, Jul 20, 2009 at 6:09 AM, Timothy Perrett timo...@getintheloop.euwrote: Jeppe, There is something odd going on with hudson it seems - even the manual build does nothing... the modules say that didnt run even tho its taking nearly an hour to complete. Derek, is this perhaps related to the increase in open file handles you made previously? Cheers, Tim On Jul 20, 12:15 pm, Timothy Perrett timo...@getintheloop.eu wrote: Hey Jeppe, Thats strange, i've just kicked off a hudson build manually, so we'll see if it works or not - i'll report back shortly Derek / DPP can you look into this? Cheers, tim On Jul 20, 12:03 pm, Jeppe Nejsum Madsen je...@ingolfs.dk wrote: Hi, It seems the latest Lift build onhttp:// hudson.scala-tools.org/job/Lift/is10 days old, same with the jars inhttp:// scala-tools.org/repo-snapshots/net/liftweb/lift-webkit/1.1-SNA... Yet, many changes have been committed to github which I assume is the master? I didn't notice until I tried making a release build since I'm building lift from source in the dev env. /Jeppe --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: Generating valid JSON
I still don't understand how JsObj works.. I've tried almost every combination, it's more like luck that some stuff i do works. def listLanguages(): LiftResponse = { def displayLanguage(l: Locale): (String, String) = { var r = l.getDisplayLanguage if (l.getDisplayCountry != ) r += | + l.getDisplayCountry return (l.toString, r) } JsonResponse(JsObj( results - JsArray(Locale.getAvailableLocales.flatMap(s = displayLanguage(s)) :_*) )) } Believe me, i tried every possible combination of JsObj in there, it *always* got to nag something. We really need some samples for stuff like that.. One time it tells me that it needs a List(String, String), as soon as i have that, it want's a List(String, JsExp), so i change it to that, then it complains again over the first problem.. it really is the big time killer for beginners to play around with stuff like that because the API-Docs are too dry to understand anything from it. best regards. On 13 Jul., 18:06, David Pollak feeder.of.the.be...@gmail.com wrote: pushed On Mon, Jul 13, 2009 at 8:17 AM, David Pollak feeder.of.the.be...@gmail.com wrote: On Mon, Jul 13, 2009 at 7:18 AM, Jeppe Nejsum Madsen je...@ingolfs.dkwrote: Jeppe Nejsum Madsen je...@ingolfs.dk writes: Hi, Just figured out that while JsObj generates valid javascript expressions, it doesn't generate valid JSON objects since it uses single quotes instead of double quotes for strings. Is there another way in Lift to generate JSON? On a slightly related note it seems as if JSONParser also accepts input which is not really JSON: scala JSONParser.parse({'text':2}) res0: net.liftweb.util.Box[Any] = Full(Map(text - 2.0)) scala JSONParser.parse({text:2}) res1: net.liftweb.util.Box[Any] = Full(Map(text - 2.0)) JSON requires strings to be surrounded with quotation marks () This leads me to believe that this is all intentional :-) I fixed the problem many months ago. The fix broke some apps. I backed out the fix. I'll un-back out the fix now. /Jeppe -- Lift, the simply functional web frameworkhttp://liftweb.net Beginning Scalahttp://www.apress.com/book/view/1430219890 Follow me:http://twitter.com/dpp Git some:http://github.com/dpp -- Lift, the simply functional web frameworkhttp://liftweb.net Beginning Scalahttp://www.apress.com/book/view/1430219890 Follow me:http://twitter.com/dpp Git some:http://github.com/dpp --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: Hudson not building?
Awesome - appears to have built again... what a strange error; guess we'll just have to keep an eye on it. http://hudson.scala-tools.org/job/Lift/lastSuccessfulBuild/ Cheers, Tim On Jul 20, 2:25 pm, Derek Chen-Becker dchenbec...@gmail.com wrote: I'm showing these errors in the log: Jul 20, 2009 5:31:30 AM hudson.model.AbstractProject checkout INFO: Lift #1045 aborted java.lang.InterruptedException at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireInterruptibl y(AbstractQueuedSynchronizer.java:813) at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireInterruptibly( AbstractQueuedSynchronizer.java:1137) at java.util.concurrent.locks.ReentrantLock.lockInterruptibly(ReentrantLock.ja va:312) at hudson.model.AbstractProject.checkout(AbstractProject.java:800) at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:314) at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:266) at hudson.model.Run.run(Run.java:923) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:234) at hudson.model.ResourceController.execute(ResourceController.java:93) at hudson.model.Executor.run(Executor.java:119) Jul 20, 2009 5:31:30 AM hudson.model.Run run INFO: Lift #1045 main build action completed: FAILURE Jul 20, 2009 6:05:55 AM hudson.triggers.SCMTrigger$Runner runPolling SEVERE: Failed to record SCM polling hudson.plugins.git.GitException: Failed to fetch at hudson.plugins.git.GitAPI.fetch(GitAPI.java:92) at hudson.plugins.git.GitAPI.fetch(GitAPI.java:103) at hudson.plugins.git.GitSCM$1.invoke(GitSCM.java:143) at hudson.plugins.git.GitSCM$1.invoke(GitSCM.java:129) at hudson.FilePath.act(FilePath.java:552) at hudson.plugins.git.GitSCM.pollChanges(GitSCM.java:129) at hudson.model.AbstractProject.pollSCMChanges(AbstractProject.java:857) at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:382) at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:417) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.j ava:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java: 908) at java.lang.Thread.run(Thread.java:619) I'm going to restart hudson and see if that helps... Derek On Mon, Jul 20, 2009 at 6:09 AM, Timothy Perrett timo...@getintheloop.euwrote: Jeppe, There is something odd going on with hudson it seems - even the manual build does nothing... the modules say that didnt run even tho its taking nearly an hour to complete. Derek, is this perhaps related to the increase in open file handles you made previously? Cheers, Tim On Jul 20, 12:15 pm, Timothy Perrett timo...@getintheloop.eu wrote: Hey Jeppe, Thats strange, i've just kicked off a hudson build manually, so we'll see if it works or not - i'll report back shortly Derek / DPP can you look into this? Cheers, tim On Jul 20, 12:03 pm, Jeppe Nejsum Madsen je...@ingolfs.dk wrote: Hi, It seems the latest Lift build onhttp:// hudson.scala-tools.org/job/Lift/is10 days old, same with the jars inhttp:// scala-tools.org/repo-snapshots/net/liftweb/lift-webkit/1.1-SNA... Yet, many changes have been committed to github which I assume is the master? I didn't notice until I tried making a release build since I'm building lift from source in the dev env. /Jeppe --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: Hudson not building?
Yeah, I restarted it. I think Josh was talking about upgrading to the latest version of Hudson at some point. I don't know if that would fix it. Derek On Mon, Jul 20, 2009 at 8:37 AM, Timothy Perrett timo...@getintheloop.euwrote: Awesome - appears to have built again... what a strange error; guess we'll just have to keep an eye on it. http://hudson.scala-tools.org/job/Lift/lastSuccessfulBuild/ Cheers, Tim On Jul 20, 2:25 pm, Derek Chen-Becker dchenbec...@gmail.com wrote: I'm showing these errors in the log: Jul 20, 2009 5:31:30 AM hudson.model.AbstractProject checkout INFO: Lift #1045 aborted java.lang.InterruptedException at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireInterruptibl y(AbstractQueuedSynchronizer.java:813) at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireInterruptibly( AbstractQueuedSynchronizer.java:1137) at java.util.concurrent.locks.ReentrantLock.lockInterruptibly(ReentrantLock.ja va:312) at hudson.model.AbstractProject.checkout(AbstractProject.java:800) at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:314) at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:266) at hudson.model.Run.run(Run.java:923) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:234) at hudson.model.ResourceController.execute(ResourceController.java:93) at hudson.model.Executor.run(Executor.java:119) Jul 20, 2009 5:31:30 AM hudson.model.Run run INFO: Lift #1045 main build action completed: FAILURE Jul 20, 2009 6:05:55 AM hudson.triggers.SCMTrigger$Runner runPolling SEVERE: Failed to record SCM polling hudson.plugins.git.GitException: Failed to fetch at hudson.plugins.git.GitAPI.fetch(GitAPI.java:92) at hudson.plugins.git.GitAPI.fetch(GitAPI.java:103) at hudson.plugins.git.GitSCM$1.invoke(GitSCM.java:143) at hudson.plugins.git.GitSCM$1.invoke(GitSCM.java:129) at hudson.FilePath.act(FilePath.java:552) at hudson.plugins.git.GitSCM.pollChanges(GitSCM.java:129) at hudson.model.AbstractProject.pollSCMChanges(AbstractProject.java:857) at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:382) at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:417) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.j ava:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java: 908) at java.lang.Thread.run(Thread.java:619) I'm going to restart hudson and see if that helps... Derek On Mon, Jul 20, 2009 at 6:09 AM, Timothy Perrett timo...@getintheloop.eu wrote: Jeppe, There is something odd going on with hudson it seems - even the manual build does nothing... the modules say that didnt run even tho its taking nearly an hour to complete. Derek, is this perhaps related to the increase in open file handles you made previously? Cheers, Tim On Jul 20, 12:15 pm, Timothy Perrett timo...@getintheloop.eu wrote: Hey Jeppe, Thats strange, i've just kicked off a hudson build manually, so we'll see if it works or not - i'll report back shortly Derek / DPP can you look into this? Cheers, tim On Jul 20, 12:03 pm, Jeppe Nejsum Madsen je...@ingolfs.dk wrote: Hi, It seems the latest Lift build onhttp:// hudson.scala-tools.org/job/Lift/is10 days old, same with the jars inhttp:// scala-tools.org/repo-snapshots/net/liftweb/lift-webkit/1.1-SNA... Yet, many changes have been committed to github which I assume is the master? I didn't notice until I tried making a release build since I'm building lift from source in the dev env. /Jeppe --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] calling java: AWSCredentials does not have a constructor - anybody recongnize this type of error ?
I'm trying out the jets3t library for handling S3 storage. But when I try to make calls to methods in the library I get: AWSCredentials does not have a constructor. Here's my code: package s3test object Main { import org.jets3t.service.S3Service import org.jets3t.service.S3ServiceException import org.jets3t.service.impl.rest.httpclient.RestS3Service import org.jets3t.service.model.S3Bucket import org.jets3t.service.security.AWSCredentials def main(args: Array[String]) :Unit = { val awsAccessKey = 0MC80SD02DQTGPP5XZ02 val awsSecretKey = EZDhuveb/94Fibwu48SCKVuiCV4T3PGlkYQTWdCr var awsCredentials = new AWSCredentials(awsAccessKey, awsSecretKey) println() } } I've tried the equivalent code in Java, and that works, so the library should be imported correctly. (Using NetBeans) Have anybody succeeded using this library ? Doe's anybody know what's going on here ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: Generating valid JSON
On Mon, Jul 20, 2009 at 2:11 PM, fbettag fr...@bett.ag wrote: I still don't understand how JsObj works.. I've tried almost every combination, it's more like luck that some stuff i do works. def listLanguages(): LiftResponse = { def displayLanguage(l: Locale): (String, String) = { var r = l.getDisplayLanguage if (l.getDisplayCountry != ) r += | + l.getDisplayCountry return (l.toString, r) } JsonResponse(JsObj( results - JsArray(Locale.getAvailableLocales.flatMap(s = displayLanguage(s)) :_*) )) } Believe me, i tried every possible combination of JsObj in there, it *always* got to nag something. We really need some samples for stuff like that.. One time it tells me that it needs a List(String, String), as soon as i have that, it want's a List(String, JsExp), so i change it to that, then it complains again over the first problem.. it really is the big time killer for beginners to play around with stuff like that because the API-Docs are too dry to understand anything from it. The best thing to do is to break your expressions out into multiple lines and then make sure that each line has a type declaration: So, if you've got a List[Thing] and you want a JsObj, you can work through each of the steps. First, define a method that will convert a Thing into a (String, JsExp): def cvt(in: Thing): (String, JsExp) = ... next, convert the List[Thing] into a List[(String, JsExp)]: val lstOfPair = listOfThing.map(cvt _) finally, create the JsObj: JsObj(lstOfPair :_* ) When is doubt, break things up into smaller pieces and explicitly declare the types for each piece. That'll help you narrow things down. best regards. On 13 Jul., 18:06, David Pollak feeder.of.the.be...@gmail.com wrote: pushed On Mon, Jul 13, 2009 at 8:17 AM, David Pollak feeder.of.the.be...@gmail.com wrote: On Mon, Jul 13, 2009 at 7:18 AM, Jeppe Nejsum Madsen je...@ingolfs.dk wrote: Jeppe Nejsum Madsen je...@ingolfs.dk writes: Hi, Just figured out that while JsObj generates valid javascript expressions, it doesn't generate valid JSON objects since it uses single quotes instead of double quotes for strings. Is there another way in Lift to generate JSON? On a slightly related note it seems as if JSONParser also accepts input which is not really JSON: scala JSONParser.parse({'text':2}) res0: net.liftweb.util.Box[Any] = Full(Map(text - 2.0)) scala JSONParser.parse({text:2}) res1: net.liftweb.util.Box[Any] = Full(Map(text - 2.0)) JSON requires strings to be surrounded with quotation marks () This leads me to believe that this is all intentional :-) I fixed the problem many months ago. The fix broke some apps. I backed out the fix. I'll un-back out the fix now. /Jeppe -- Lift, the simply functional web frameworkhttp://liftweb.net Beginning Scalahttp://www.apress.com/book/view/1430219890 Follow me:http://twitter.com/dpp Git some:http://github.com/dpp -- Lift, the simply functional web frameworkhttp://liftweb.net Beginning Scalahttp://www.apress.com/book/view/1430219890 Follow me:http://twitter.com/dpp Git some:http://github.com/dpp -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Git some: http://github.com/dpp --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: JTA Transaction Monad - Early Access Program
I'm really sorry. I never checked building with an empty maven repo. Thanks for fixing it. 2009/7/20 Derek Chen-Becker dchenbec...@gmail.com: FYI, it looks like the Hibernate dependency you had in your pom was pulling in the javax.transactions:jta lib, which isn't available in maven repos. I added an exclusion to prevent that from breaking the build. Derek On Sun, Jul 19, 2009 at 3:08 AM, Jonas Bonér jbo...@gmail.com wrote: Thanks Tim and David. 2009/7/19 David Pollak feeder.of.the.be...@gmail.com: On Sat, Jul 18, 2009 at 11:20 AM, Timothy Perrett timo...@getintheloop.eu wrote: Awesome - kudos Jonas. +1 And more generally, it's great to have such a diverse and talented group of people contributing to Lift! Cheers, Tim On Jul 18, 11:53 am, Jonas Bonér jbo...@gmail.com wrote: JTA stuff is in github master branch now.http://github.com/dpp/liftweb/tree/4d8405a3dcf93570da8142c078784f9dc1... Have fun. /Jonas -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Git some: http://github.com/dpp -- Jonas Bonér twitter: @jboner blog: http://jonasboner.com work: http://crisp.se work: http://scalablesolutions.se code: http://github.com/jboner -- Jonas Bonér twitter: @jboner blog:http://jonasboner.com work: http://crisp.se work: http://scalablesolutions.se code: http://github.com/jboner --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: JTA Transaction Monad - Early Access Program
2009/7/20 Derek Chen-Becker dchenbec...@gmail.com: ... hit the enter key too quickly! Kudos on the work in this library. I really like how this is coming together. Thanks Derek. Derek On Sun, Jul 19, 2009 at 11:52 PM, Derek Chen-Becker dchenbec...@gmail.com wrote: FYI, it looks like the Hibernate dependency you had in your pom was pulling in the javax.transactions:jta lib, which isn't available in maven repos. I added an exclusion to prevent that from breaking the build. Derek On Sun, Jul 19, 2009 at 3:08 AM, Jonas Bonér jbo...@gmail.com wrote: Thanks Tim and David. 2009/7/19 David Pollak feeder.of.the.be...@gmail.com: On Sat, Jul 18, 2009 at 11:20 AM, Timothy Perrett timo...@getintheloop.eu wrote: Awesome - kudos Jonas. +1 And more generally, it's great to have such a diverse and talented group of people contributing to Lift! Cheers, Tim On Jul 18, 11:53 am, Jonas Bonér jbo...@gmail.com wrote: JTA stuff is in github master branch now.http://github.com/dpp/liftweb/tree/4d8405a3dcf93570da8142c078784f9dc1... Have fun. /Jonas -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Git some: http://github.com/dpp -- Jonas Bonér twitter: @jboner blog: http://jonasboner.com work: http://crisp.se work: http://scalablesolutions.se code: http://github.com/jboner -- Jonas Bonér twitter: @jboner blog:http://jonasboner.com work: http://crisp.se work: http://scalablesolutions.se code: http://github.com/jboner --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: calling java: AWSCredentials does not have a constructor - anybody recongnize this type of error ?
On Mon, Jul 20, 2009 at 8:04 AM, kjetilge kjeti...@gmail.com wrote: I'm trying out the jets3t library for handling S3 storage. But when I try to make calls to methods in the library I get: AWSCredentials does not have a constructor. Here's my code: package s3test object Main { import org.jets3t.service.S3Service import org.jets3t.service.S3ServiceException import org.jets3t.service.impl.rest.httpclient.RestS3Service import org.jets3t.service.model.S3Bucket import org.jets3t.service.security.AWSCredentials def main(args: Array[String]) :Unit = { val awsAccessKey = 0MC80SD02DQTGPP5XZ02 val awsSecretKey = EZDhuveb/94Fibwu48SCKVuiCV4T3PGlkYQTWdCr var awsCredentials = new AWSCredentials(awsAccessKey, awsSecretKey) println() } } I've tried the equivalent code in Java, and that works, so the library should be imported correctly. (Using NetBeans) Have anybody succeeded using this library ? Doe's anybody know what's going on here ? I was able to compile the above code with: scalac -cp ~/lang/jets3t/jars/jets3t-0.5.0.jar S3.scala -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Git some: http://github.com/dpp --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: calling java: AWSCredentials does not have a constructor - anybody recongnize this type of error ?
I agree, looks fine you don¹t mention if your using maven or whatever, but IMO, make sure you¹ve set the dependencies properly and that your running the right goal on your pom.xml Also, you probably don¹t want to post your secret for S3 as people could log into your account with it. Cheers, Tim On 20/07/2009 16:52, David Pollak feeder.of.the.be...@gmail.com wrote: On Mon, Jul 20, 2009 at 8:04 AM, kjetilge kjeti...@gmail.com wrote: I'm trying out the jets3t library for handling S3 storage. But when I try to make calls to methods in the library I get: AWSCredentials does not have a constructor. Here's my code: package s3test object Main { import org.jets3t.service.S3Service import org.jets3t.service.S3ServiceException import org.jets3t.service.impl.rest.httpclient.RestS3Service import org.jets3t.service.model.S3Bucket import org.jets3t.service.security.AWSCredentials def main(args: Array[String]) :Unit = { val awsAccessKey = 0MC80SD02DQTGPP5XZ02 val awsSecretKey = EZDhuveb/94Fibwu48SCKVuiCV4T3PGlkYQTWdCr var awsCredentials = new AWSCredentials(awsAccessKey, awsSecretKey) println() } } I've tried the equivalent code in Java, and that works, so the library should be imported correctly. (Using NetBeans) Have anybody succeeded using this library ? Doe's anybody know what's going on here ? I was able to compile the above code with: scalac -cp ~/lang/jets3t/jars/jets3t-0.5.0.jar S3.scala --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: Article: Lift snippet selection - DispatchSnippet vs snippet reflection
Good article but do you have some concrete benchmarks between Snippet and DispatchSnippet? In modern JVM memory allocation is pretty cheap due to heap preparation JVM makes and reflection invocation doesn't bring too much overhead ... not anymore. The article seams to present the two from an optimization perspective but I don;t see much optimization here. Of course DispatchSnippet invocation is faster but the question is how much. And for say thousands of concurrent requests per cluster node I have the feeling that the delta is not that significant. Furthermore these deltas become totally negligible when during a request life cycle we're hitting DB-s. remote services etc. Personally I don't really agree regular snippets should be used in Dev mode only, well not until I see some compelling numbers. Br's, Marius On Jul 20, 3:36 pm, Timothy Perrett timo...@getintheloop.eu wrote: Hey guys, Just posted a new article about lift snippets:http://is.gd/1FbDw- perhaps it will help someone :-) Cheers, Tim --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: Article: Lift snippet selection - DispatchSnippet vs snippet reflection
Hey Marius, Thanks for the critical feedback :-) I have no benchmarks to speak of, just pouring out my general understanding onto my blog - I do remember DPP saying some time ago that DispatchSnippets were really the way to go for most things of any serious implementation. Cheers, Tim On 20/07/2009 17:12, marius d. marius.dan...@gmail.com wrote: Good article but do you have some concrete benchmarks between Snippet and DispatchSnippet? In modern JVM memory allocation is pretty cheap due to heap preparation JVM makes and reflection invocation doesn't bring too much overhead ... not anymore. The article seams to present the two from an optimization perspective but I don;t see much optimization here. Of course DispatchSnippet invocation is faster but the question is how much. And for say thousands of concurrent requests per cluster node I have the feeling that the delta is not that significant. Furthermore these deltas become totally negligible when during a request life cycle we're hitting DB-s. remote services etc. Personally I don't really agree regular snippets should be used in Dev mode only, well not until I see some compelling numbers. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] PocketChange app. problems
Hello, I checked out the PocketChange app. like this: git clone git://github.com/tjweir/pocketchangeapp.git When I run it, log in, and click on the Change Password link, Firefox says This XML file does not appear to have any style information associated with it. The document tree is shown below. The source I get looks like this: ?xml version=1.0 encoding=UTF-8? !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http:// www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd form action=/user_mgt/change_password method=post tabletrtd colspan=2Change Password/td/tr trtdOld password/tdtdinput name=F178147327358EIZ type=password value= //td/tr trtdNew password/tdtdinput name=F178147327359TLB type=password value= //td/tr trtdNew password (repeat)/tdtdinput name=F178147327359TLB type=password value= //td/tr trtdnbsp;/tdtdinput name=F178147337360QVW type=submit value=Change //td/tr /table /form The same problem happens when I click on the Edit User link. I'm running the standard Lift 1.0 (on a Mac), except that I just had to replace the included maven with maven 2.2.0, since the included one suddenly gave me this message: The plugin 'org.apache.maven.plugins:maven-jetty-plugin' does not exist ... The PocketChange problems also occurred with the included maven. Sincerely, Jon Kleiser --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: Article: Lift snippet selection - DispatchSnippet vs snippet reflection
The process for looking up snippets is not a single reflection operation, but a series of reflection operations. Some of the operations are cached in production mode. However, as a matter of strongly typed style, I like DispatchSnippets because you know what you are getting. On Mon, Jul 20, 2009 at 9:21 AM, Timothy Perrett timo...@getintheloop.euwrote: Hey Marius, Thanks for the critical feedback :-) I have no benchmarks to speak of, just pouring out my general understanding onto my blog - I do remember DPP saying some time ago that DispatchSnippets were really the way to go for most things of any serious implementation. Cheers, Tim On 20/07/2009 17:12, marius d. marius.dan...@gmail.com wrote: Good article but do you have some concrete benchmarks between Snippet and DispatchSnippet? In modern JVM memory allocation is pretty cheap due to heap preparation JVM makes and reflection invocation doesn't bring too much overhead ... not anymore. The article seams to present the two from an optimization perspective but I don;t see much optimization here. Of course DispatchSnippet invocation is faster but the question is how much. And for say thousands of concurrent requests per cluster node I have the feeling that the delta is not that significant. Furthermore these deltas become totally negligible when during a request life cycle we're hitting DB-s. remote services etc. Personally I don't really agree regular snippets should be used in Dev mode only, well not until I see some compelling numbers. -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Git some: http://github.com/dpp --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: How to use selectObj over a range of integers
Ross, Your example does not compile. I get a missing parameter type error on i =... function. On Jul 17, 3:29 pm, Ross Mellgren dri...@gmail.com wrote: selectObj((0 until 11).map(i = Pair(i, i.toString)), Full(0), i = println(the number chosen was + i + and 10 plus that was + (10 + i))) -Ross On Jul 17, 2009, at 6:27 PM, glenn wrote: I would like to know how to create a selectObj over a range of integers. Do I have to use val numList = List(0-0, 1-2, 2-3 ...) def numbers = selectObj(numLists, Full(0), someFunc)? It seems a load to have to create a list of pairs. And what does the third param to selectObj look like in this instance? Please tell me there is shortcut. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: how to create data transfer object in lift
On Mon, Jul 20, 2009 at 5:52 AM, pravin pravinka...@gmail.com wrote: Hi, i want to create DTO(data transfer object) of employee. Then i want to create list of this employee object. want to display this list on GUI. How can i do this in lift. Lift is neutral on the DTO part of things... use whatever persistence mechanism you want. Assuming you've got a view that looks like: table lift:Employees.list trtdemp:firstname//tdtdemp:lastname//td/tr /lift:Employees.list /table You can create a snippet (in the .snippet package): import scala.xml._ import net.liftweb._ import util._ import Helpers._ class Employees { def list(xhmtl: NodeSeq): NodeSeq = listOfEmployeesInDTO.flatMap( e = bind(emp, xhtml, firstname - e.firstName(), lastname - e.lastName()) ) } -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Git some: http://github.com/dpp --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: How to use selectObj over a range of integers
On Fri, Jul 17, 2009 at 3:27 PM, glenn gl...@exmbly.com wrote: I would like to know how to create a selectObj over a range of integers. Do I have to use val numList = List(0-0, 1-2, 2-3 ...) def numbers = selectObj(numLists, Full(0), someFunc)? selectObj[Int](numLists, Full(0), someFunc) The type inferencer doesn't get this one right... so you have to give it a hint. It seems a load to have to create a list of pairs. And what does the third param to selectObj look like in this instance? Please tell me there is shortcut. -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Git some: http://github.com/dpp --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: PocketChange app. problems
I just saw that the other day. The problem is those pages aren't being wrapped by the default template. In newer versions of Lift there is a default screenWrap, but 1.0 doesn't seem to have it. In order to add the wrapper, you need to add lines similar to the following to com.pocketchangeapp.model.User.scala override def changePasswordXhtml = lift:surround with=default at=content div id=formBox{ super.changePasswordXhtml }/div /lift:surround That fixes the change password page. You'll need to look at the source of ProtoUser to see the other page names: http://scala-tools.org/scaladocs/liftweb/1.0/ On Mon, Jul 20, 2009 at 11:22 AM, Jon jon.klei...@usit.uio.no wrote: Hello, I checked out the PocketChange app. like this: git clone git://github.com/tjweir/pocketchangeapp.git When I run it, log in, and click on the Change Password link, Firefox says This XML file does not appear to have any style information associated with it. The document tree is shown below. The source I get looks like this: ?xml version=1.0 encoding=UTF-8? !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http:// www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd form action=/user_mgt/change_password method=post tabletrtd colspan=2Change Password/td/tr trtdOld password/tdtdinput name=F178147327358EIZ type=password value= //td/tr trtdNew password/tdtdinput name=F178147327359TLB type=password value= //td/tr trtdNew password (repeat)/tdtdinput name=F178147327359TLB type=password value= //td/tr trtdnbsp;/tdtdinput name=F178147337360QVW type=submit value=Change //td/tr /table /form The same problem happens when I click on the Edit User link. I'm running the standard Lift 1.0 (on a Mac), except that I just had to replace the included maven with maven 2.2.0, since the included one suddenly gave me this message: The plugin 'org.apache.maven.plugins:maven-jetty-plugin' does not exist ... The PocketChange problems also occurred with the included maven. Sincerely, Jon Kleiser --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: How to use selectObj over a range of integers
Sorry, I meant it as more of an example so I did not compile it, and Scala's type inferencer is never as good as I hope. Here is one that compiles: SHtml.selectObj((0 until 11).map(i = Pair(i, i.toString)), Full(0), (i: Int) = { println(the number chosen was + i + and 10 plus that was + (10 + i)) }) Just had to add a type annotation and put some braces in. The major point I had though was that you can use (0 until 11) to generate a range of ints and then map those into pairs. Hope this helps, -Ross On Jul 20, 2009, at 12:45 PM, glenn wrote: Ross, Your example does not compile. I get a missing parameter type error on i =... function. On Jul 17, 3:29 pm, Ross Mellgren dri...@gmail.com wrote: selectObj((0 until 11).map(i = Pair(i, i.toString)), Full(0), i = println(the number chosen was + i + and 10 plus that was + (10 + i))) -Ross On Jul 17, 2009, at 6:27 PM, glenn wrote: I would like to know how to create a selectObj over a range of integers. Do I have to use val numList = List(0-0, 1-2, 2-3 ...) def numbers = selectObj(numLists, Full(0), someFunc)? It seems a load to have to create a list of pairs. And what does the third param to selectObj look like in this instance? Please tell me there is shortcut. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: How to use selectObj over a range of integers
Ross, I fixed my problem. def sumFunc(i:Int){ somOtherFunc(i) println() } selectObj((0 until 11).map(i = Pair(i, i.toString)), Full(0), somFunc) Thanks for your help. On Jul 17, 3:29 pm, Ross Mellgren dri...@gmail.com wrote: selectObj((0 until 11).map(i = Pair(i, i.toString)), Full(0), i = println(the number chosen was + i + and 10 plus that was + (10 + i))) -Ross On Jul 17, 2009, at 6:27 PM, glenn wrote: I would like to know how to create a selectObj over a range of integers. Do I have to use val numList = List(0-0, 1-2, 2-3 ...) def numbers = selectObj(numLists, Full(0), someFunc)? It seems a load to have to create a list of pairs. And what does the third param to selectObj look like in this instance? Please tell me there is shortcut. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: JSON handler doesn't respond
On Sun, Jul 19, 2009 at 3:20 AM, Vassil Dichev vdic...@gmail.com wrote: Hello folks, I've gathered some information on the recent problems where ESME was hanging. The problem seems to be that the json handler, generated with S.buildJsonFunc, sometimes stops working after the browser has been open for awhile. Not all user sessions stop working though (I'm currently trying with 3 open sessions). I've also tried calling the generated JavaScript function manually from each of the browsers and it confirms the fact that for some sessions the handler is not invoked. I execute the function e.g. in the url bar like this: javascript:F6669067195625JG({'command': 'post', 'params':{'msg': document.getElementById('textdude').value, 'tags': document.getElementById('tagdude').value, 'access_pool': document.getElementById('access_pool').value, 'reply-to': currentConvNumber}}); As a result, in the sessions where things don't work the pattern matching on JsonCmd is not reached at all, whereas case JsonCmd matches fine where it works. Any ideas on how to debug this? Has anyone experienced the same problem? Vassil, I have not seen problems like this. The debugging tools I user are Firebug on the client and the catch-all pattern match on the server. If you can create a reproducible case for me, I'll look into it (although I'm slammed this week.) Thanks, David Greetings, Vassil P.S. We are running Lift version 1.1-SNAPSHOT. I experienced the problem under OpenJDK 6, but it occurs with Sun's JDK 6 too. -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Git some: http://github.com/dpp --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] MetaMapper type
- Naftoli Gugenheimnaftoli...@gmail.com wrote: Assuming trait Mapper[T : Mapper[T]] trait MetaMapper[T : Mapper]] extends Mapper[T] I have a function def eachField[T : Mapper[T]](mapper: T, fn: MappedField[_, T] = ...) ... I need to call it using a val declared currently as val metaMapper: MetaMapper[T] with T where T is a type argument of its containing class. I can't figure out how to pass metaMapper to eachField and satisfy the compiler. The definitions can be changed somewhat but not too much because they are used elsewhere. Thanks. - From: Naftoli Gugenheimnaftoli...@gmail.com To: liftweb@googlegroups.com; Subject: MetaMapper type Date: Jul 19, 5:38 PM I have a function def eachField[T : Mapper[T]](mapper: T, fn: MappedField[_, T] = ...) ... I need to call it using a val declared currently as val metaMapper: MetaMapper[T] with T where T is a type argument of its containing class. I can't figure out how to pass metaMapper to eachField and satisfy the compiler. The definitions can be changed somewhat but not too much because they are used elsewhere. Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: How to use selectObj over a range of integers
You can omit the word Pair. - glenngl...@exmbly.com wrote: Ross, I fixed my problem. def sumFunc(i:Int){ somOtherFunc(i) println() } selectObj((0 until 11).map(i = Pair(i, i.toString)), Full(0), somFunc) Thanks for your help. On Jul 17, 3:29 pm, Ross Mellgren dri...@gmail.com wrote: selectObj((0 until 11).map(i = Pair(i, i.toString)), Full(0), i = println(the number chosen was + i + and 10 plus that was + (10 + i))) -Ross On Jul 17, 2009, at 6:27 PM, glenn wrote: I would like to know how to create a selectObj over a range of integers. Do I have to use val numList = List(0-0, 1-2, 2-3 ...) def numbers = selectObj(numLists, Full(0), someFunc)? It seems a load to have to create a list of pairs. And what does the third param to selectObj look like in this instance? Please tell me there is shortcut. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: How to use selectObj over a range of integers
Sometimes yeah you can, and you can in this case. I use it by habit because the parsing of it varies from place to place (I think it sometimes takes it as an argument list). -Ross On Jul 20, 2009, at 2:53 PM, Naftoli Gugenheim wrote: You can omit the word Pair. - glenngl...@exmbly.com wrote: Ross, I fixed my problem. def sumFunc(i:Int){ somOtherFunc(i) println() } selectObj((0 until 11).map(i = Pair(i, i.toString)), Full(0), somFunc) Thanks for your help. On Jul 17, 3:29 pm, Ross Mellgren dri...@gmail.com wrote: selectObj((0 until 11).map(i = Pair(i, i.toString)), Full(0), i = println(the number chosen was + i + and 10 plus that was + (10 + i))) -Ross On Jul 17, 2009, at 6:27 PM, glenn wrote: I would like to know how to create a selectObj over a range of integers. Do I have to use val numList = List(0-0, 1-2, 2-3 ...) def numbers = selectObj(numLists, Full(0), someFunc)? It seems a load to have to create a list of pairs. And what does the third param to selectObj look like in this instance? Please tell me there is shortcut. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Scala as an alternative for complex length xml/xslt transformation?
Because Scala currently is not mainstream (yet), I think changes are very small that Scala will used soon in of our projects. However we do have a large app that relies very heavily on very many, complex and time consuming xml/xslt transformation. I can image that Scala being a functional language as well, may be the perfect alternative to replace this app. From what from the Scala documentation so far, is that it could have the following advantages over xslt: - much much faster, because it is compiled - more productive, with the help of the IDE debugger etc - more maintainable, due to the OO nature when making reusable functions etc. My questions is: - Are the above statements correct. - Are the demo programs demonstrating the xslt functionality - What performance boost (if any) are realistic thank in advance --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Scala project in eclipse - showing Java build errors?
Me again. I resolved my previous problem but hit a new one in the world of Eclipse/Scala integration. First: a confession. I'm trying to ditch Maven. I have to; I'm trying to write a webapp that will be embedded inside another Java app, and the whole lot will be built together. I can't go compromising the build of the larger project by imposing requirements of smaller modules. Been down that road once with OSGI and I'm not going back. I have created a lib/ directory in my scala project, imported a few jars in and added them to the build path. Now I am getting errors in my scala project as so: For the line: package bootstrap.liftweb I get the error: Syntax error on token liftweb, ; expected after this token Which is suggesting to me the JDT is compiling this, rather than the scala compiler. The Java builder is turned off for the project. At one stage, before I ditched maven, this was working. Any thoughts? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: Scala as an alternative for complex length xml/xslt transformation?
more info here:http://www.scala-lang.org/node/199 On Mon, Jul 20, 2009 at 9:58 PM, Timothy Perrett timo...@getintheloop.euwrote: Robin, Whilst your questions are valid and there are a lot of very very good Scala folk on the lift mailing list, you'll probably get broader Scala audience over at the main Scala mailing list hosted by EPFL. Cheers, Tim On Jul 20, 8:49 pm, robin bakkerus robin.bakke...@gmail.com wrote: Because Scala currently is not mainstream (yet), I think changes are very small that Scala will used soon in of our projects. However we do have a large app that relies very heavily on very many, complex and time consuming xml/xslt transformation. I can image that Scala being a functional language as well, may be the perfect alternative to replace this app. From what from the Scala documentation so far, is that it could have the following advantages over xslt: - much much faster, because it is compiled - more productive, with the help of the IDE debugger etc - more maintainable, due to the OO nature when making reusable functions etc. My questions is: - Are the above statements correct. - Are the demo programs demonstrating the xslt functionality - What performance boost (if any) are realistic thank in advance --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: Scala project in eclipse - showing Java build errors?
On Mon, Jul 20, 2009 at 10:08 PM, Dan Gravelldan.grav...@talk21.com wrote: For the line: package bootstrap.liftweb I get the error: Syntax error on token liftweb, ; expected after this token Which is suggesting to me the JDT is compiling this, rather than the scala compiler. Is JDT Weaving enabled? Cheers, Miles -- Miles Sabin tel: +44 (0)7813 944 528 skype: milessabin http://www.chuusai.com/ http://twitter.com/milessabin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: Scala project in eclipse - showing Java build errors?
On Jul 20, 10:33 pm, Miles Sabin mi...@milessabin.com wrote: Is JDT Weaving enabled? Dunno, to be honest. It says it's disabled but I've done everything it suggests to enable it (specifically: manually enabling in the config.ini file and then the contradictory advice at http://wiki.eclipse.org/JDT_weaving_features ). But it still says it's disabled. And as I said it was all working before. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: Scala project in eclipse - showing Java build errors?
On Mon, Jul 20, 2009 at 10:45 PM, Dan Gravelldan.grav...@talk21.com wrote: On Jul 20, 10:33 pm, Miles Sabin mi...@milessabin.com wrote: Is JDT Weaving enabled? Dunno, to be honest. It says it's disabled but I've done everything it suggests to enable it (specifically: manually enabling in the config.ini file and then the contradictory advice at http://wiki.eclipse.org/JDT_weaving_features ). But it still says it's disabled. And as I said it was all working before. JDT weaving being enabled is your problem. What versions of Eclipse and the Scala IDE? Also is the filesystem layout of your Eclipse install unusual in any way? Is it read only? Cheers, Miles -- Miles Sabin tel: +44 (0)7813 944 528 skype: milessabin http://www.chuusai.com/ http://twitter.com/milessabin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: Feedback on presentation
+1 it looks really good mate. Presumably your doing a live demo at the start or similar? Cheers, Tim Sent from my iPhone On 20 Jul 2009, at 23:09, David Pollak feeder.of.the.be...@gmail.com wrote: Looks good to me. On Mon, Jul 20, 2009 at 3:05 PM, Derek Chen-Becker dchenbec...@gmail.com wrote: I've attached the slides that I'll be using for my talk to the Boulder JUG in August. It's mainly cribbed from the excellent presentations that other people here have made, but I would appreciate any feedback on content or structure. Thanks, Derek -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Git some: http://github.com/dpp --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] MIME type help?
Hi, This is really a servlet question, but I'll ask here because it is a Lift project I'm having a problem with. I have some media files (MP3s) which aren't being given the correct MIME headers. I have other binary files (GIFs, PNGs, JPGs) which work fine but when I visit the URL for the MP3 file, it renders the binary stream as text in the browser rather than identifying the file as an MP3. I'm no expert at this, but I assume it's the servlet container not identifying the file type and therefore not sending the correct MIME header. The files are stored on disc and are being served statically, no Scala or Lift code involved. Works fine with Jetty on my dev machine; the problem happens when I'm running Winstone on the production machine. I'd rather not change container for the sake of the problem although I'll switch to Jetty if I really can't solve this. Any suggestions? Cheers Joe --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: Feedback on presentation
Derek, Any chance you could rent a time machine and give me these slides back in 2007 when i was first working out how to build a lift app? Nice work. Best wishes, --greg On Mon, Jul 20, 2009 at 3:22 PM, Timothy Perrett timo...@getintheloop.euwrote: +1 it looks really good mate. Presumably your doing a live demo at the start or similar? Cheers, Tim Sent from my iPhone On 20 Jul 2009, at 23:09, David Pollak feeder.of.the.be...@gmail.com wrote: Looks good to me. On Mon, Jul 20, 2009 at 3:05 PM, Derek Chen-Becker dchenbec...@gmail.com dchenbec...@gmail.com wrote: I've attached the slides that I'll be using for my talk to the Boulder JUG in August. It's mainly cribbed from the excellent presentations that other people here have made, but I would appreciate any feedback on content or structure. Thanks, Derek -- Lift, the simply functional web framework http://liftweb.net http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpphttp://twitter.com/dpp Git some: http://github.com/dpphttp://github.com/dpp -- L.G. Meredith Managing Partner Biosimilarity LLC 1219 NW 83rd St Seattle, WA 98117 +1 206.650.3740 http://biosimilarity.blogspot.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] S.getHeaders, could i get some examples?
Im trying to get information about the browser the user is using and wanted to get some working snippets around S.getHeaders. Can't get it to work ( S.getHeaders(List((User-Agent,))) returns (User-Agent, )). I guess I'm not calling it right. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: S.getHeaders, could i get some examples?
How about S.getHeader(User-Agent)? Or for {r - S.request; ua - r.userAgent} yield ua? On Mon, Jul 20, 2009 at 4:20 PM, DFectuoso santiago1...@gmail.com wrote: Im trying to get information about the browser the user is using and wanted to get some working snippets around S.getHeaders. Can't get it to work ( S.getHeaders(List((User-Agent,))) returns (User-Agent, )). I guess I'm not calling it right. -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Git some: http://github.com/dpp --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: Hudson not building?
I'll take a shot at upgrading the git plugin and see what happens. There was some fuss on the hudson mailing lists about issues with git earlier, I'm wondering if we ran into the same issue. - Josh On Mon, Jul 20, 2009 at 10:56 AM, Derek Chen-Becker dchenbec...@gmail.comwrote: Yeah, I restarted it. I think Josh was talking about upgrading to the latest version of Hudson at some point. I don't know if that would fix it. Derek On Mon, Jul 20, 2009 at 8:37 AM, Timothy Perrett timo...@getintheloop.euwrote: Awesome - appears to have built again... what a strange error; guess we'll just have to keep an eye on it. http://hudson.scala-tools.org/job/Lift/lastSuccessfulBuild/ Cheers, Tim On Jul 20, 2:25 pm, Derek Chen-Becker dchenbec...@gmail.com wrote: I'm showing these errors in the log: Jul 20, 2009 5:31:30 AM hudson.model.AbstractProject checkout INFO: Lift #1045 aborted java.lang.InterruptedException at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireInterruptibl y(AbstractQueuedSynchronizer.java:813) at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireInterruptibly( AbstractQueuedSynchronizer.java:1137) at java.util.concurrent.locks.ReentrantLock.lockInterruptibly(ReentrantLock.ja va:312) at hudson.model.AbstractProject.checkout(AbstractProject.java:800) at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:314) at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:266) at hudson.model.Run.run(Run.java:923) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:234) at hudson.model.ResourceController.execute(ResourceController.java:93) at hudson.model.Executor.run(Executor.java:119) Jul 20, 2009 5:31:30 AM hudson.model.Run run INFO: Lift #1045 main build action completed: FAILURE Jul 20, 2009 6:05:55 AM hudson.triggers.SCMTrigger$Runner runPolling SEVERE: Failed to record SCM polling hudson.plugins.git.GitException: Failed to fetch at hudson.plugins.git.GitAPI.fetch(GitAPI.java:92) at hudson.plugins.git.GitAPI.fetch(GitAPI.java:103) at hudson.plugins.git.GitSCM$1.invoke(GitSCM.java:143) at hudson.plugins.git.GitSCM$1.invoke(GitSCM.java:129) at hudson.FilePath.act(FilePath.java:552) at hudson.plugins.git.GitSCM.pollChanges(GitSCM.java:129) at hudson.model.AbstractProject.pollSCMChanges(AbstractProject.java:857) at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:382) at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:417) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.j ava:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java: 908) at java.lang.Thread.run(Thread.java:619) I'm going to restart hudson and see if that helps... Derek On Mon, Jul 20, 2009 at 6:09 AM, Timothy Perrett timo...@getintheloop.euwrote: Jeppe, There is something odd going on with hudson it seems - even the manual build does nothing... the modules say that didnt run even tho its taking nearly an hour to complete. Derek, is this perhaps related to the increase in open file handles you made previously? Cheers, Tim On Jul 20, 12:15 pm, Timothy Perrett timo...@getintheloop.eu wrote: Hey Jeppe, Thats strange, i've just kicked off a hudson build manually, so we'll see if it works or not - i'll report back shortly Derek / DPP can you look into this? Cheers, tim On Jul 20, 12:03 pm, Jeppe Nejsum Madsen je...@ingolfs.dk wrote: Hi, It seems the latest Lift build onhttp:// hudson.scala-tools.org/job/Lift/is10 days old, same with the jars inhttp:// scala-tools.org/repo-snapshots/net/liftweb/lift-webkit/1.1-SNA... Yet, many changes have been committed to github which I assume is the master? I didn't notice until I tried making a release build since I'm building lift from source in the dev env. /Jeppe --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: calling java: AWSCredentials does not have a constructor - anybody recongnize this type of error ?
Oooops, sloppy of me to publish my password. Very embarrassing. Moving right along. There are two things that I'm not sure what means: 1. Setting dependencies 2. Goal. I'm using Maven and I have picked up that GOALS are involved. For instance: In Netbeans I can set jetty:run as a goal to execute when the project is run. This compiles and start my Lift application of course. But I have no idea how to run a goal on a pom.xml.Could you provide an example? I probably should read more about Maven I guess. Could I perhaps add a dependency in the pom file like this: dependency groupIdorg.jets3t/groupId artifactIdjets3et/artifactId version0.1.7/version /dependency Will it then also be necessary to add dependencies for commons.codec and commons.httpclient and so on ? I have added all the libraries manually, is that wrong ? On Jul 20, 5:59 pm, Timothy Perrett timo...@getintheloop.eu wrote: I agree, looks fine you don¹t mention if your using maven or whatever, but IMO, make sure you¹ve set the dependencies properly and that your running the right goal on your pom.xml Also, you probably don¹t want to post your secret for S3 as people could log into your account with it. Cheers, Tim On 20/07/2009 16:52, David Pollak feeder.of.the.be...@gmail.com wrote: On Mon, Jul 20, 2009 at 8:04 AM, kjetilge kjeti...@gmail.com wrote: I'm trying out the jets3t library for handling S3 storage. But when I try to make calls to methods in the library I get: AWSCredentials does not have a constructor. Here's my code: package s3test object Main { import org.jets3t.service.S3Service import org.jets3t.service.S3ServiceException import org.jets3t.service.impl.rest.httpclient.RestS3Service import org.jets3t.service.model.S3Bucket import org.jets3t.service.security.AWSCredentials def main(args: Array[String]) :Unit = { val awsAccessKey = 0MC80SD02DQTGPP5XZ02 val awsSecretKey = EZDhuveb/94Fibwu48SCKVuiCV4T3PGlkYQTWdCr var awsCredentials = new AWSCredentials(awsAccessKey, awsSecretKey) println() } } I've tried the equivalent code in Java, and that works, so the library should be imported correctly. (Using NetBeans) Have anybody succeeded using this library ? Doe's anybody know what's going on here ? I was able to compile the above code with: scalac -cp ~/lang/jets3t/jars/jets3t-0.5.0.jar S3.scala --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: S.getHeaders, could i get some examples?
for some reason S.getHeader(User-Agent) returns empty, but the second one(using the so useful for) did the trick, thanks! On Jul 20, 4:34 pm, David Pollak feeder.of.the.be...@gmail.com wrote: How about S.getHeader(User-Agent)? Or for {r - S.request; ua - r.userAgent} yield ua? On Mon, Jul 20, 2009 at 4:20 PM, DFectuoso santiago1...@gmail.com wrote: Im trying to get information about the browser the user is using and wanted to get some working snippets around S.getHeaders. Can't get it to work ( S.getHeaders(List((User-Agent,))) returns (User-Agent, )). I guess I'm not calling it right. -- Lift, the simply functional web frameworkhttp://liftweb.net Beginning Scalahttp://www.apress.com/book/view/1430219890 Follow me:http://twitter.com/dpp Git some:http://github.com/dpp --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---