[Lift] How do I build reusable modules for lift?
Sorry for a bit of a vague Sunday night question. We now have several lift projects floating round that have common snippets and potentially model objects, which would be nice to reuse without cut paste. Is there documentation on how to do this or best practices? Cheers Jono -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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.
Re: [Lift] Re: How do I build reusable modules for lift?
I was more concerned with the package structure being different between the common module and the projects consuming it. The snippets for the common module would be in, say com.mycompany.common.snippet where as the projects consuming the common module would likely have the package structure com.mycompany.nextbigthing.snippet Does LiftRules support multiple addToPackage call? Is there a nice way to have the common module look after it's own interaction with LiftRules or should the consumer of the module look after it? Jono On 14 February 2010 21:13, ngocdaothanh ngocdaoth...@gmail.com wrote: I think you could install your modules into Maven's repository, then use them from projects as dependencies. On Feb 14, 6:32 pm, Jonathan Ferguson j...@spiralarm.com wrote: Sorry for a bit of a vague Sunday night question. We now have several lift projects floating round that have common snippets and potentially model objects, which would be nice to reuse without cut paste. Is there documentation on how to do this or best practices? Cheers Jono -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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.
Re: [Lift] Is it possible to use CRUDify snippets on non CRUDified pages?
I wasn't able to override listPath, Ill have a bit more of a play to make sure I'm not doing anything to silly; trying to get /crudify/path to / . Rewrite worked wonderfully. Cheers Jono On 5 February 2010 04:45, Jeppe Nejsum Madsen je...@ingolfs.dk wrote: Naftoli Gugenheim naftoli...@gmail.com writes: It's not overridable? Actually, I think it is :-) You might be able to just override lazy val listPath = Nil /Jeppe - Jeppe Nejsum Madsenje...@ingolfs.dk wrote: Jonathan Ferguson j...@spiralarm.com writes: I would like to have the list view of one of my model objects as my home page. Can this done with out having the home page redirect to /mymodel/list ? I don't think you can change the native URL of CRUDify list, but you could add a rewrite (not redirect). See http://blog.getintheloop.eu/2009/5/3/url-rewriting-with-the-lift-framework /Jeppe -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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.
Re: [Lift] Re: Out of Memory Errors Building Lift
I believe it is maven not passing the JVM options through to the forked compile processes. Glad you got it working. Jono On 5 February 2010 10:07, Peter Robinett pe...@bubblefoundry.com wrote: Thanks, Jeppe, that did the trick. I swear, JVM options are such a dark art! Peter On Feb 4, 12:49 pm, Jeppe Nejsum Madsen je...@ingolfs.dk wrote: Peter Robinett pe...@bubblefoundry.com writes: Hmm, I see that it's always when running YUI Compressor on lift- webkit. I actually had issues with YUI Compressor in the past (http:// groups.google.com/group/liftweb/browse_thread/thread/ f338204c6ee02dd3/3025b5ef300b4ee2) but this time I'm running the Sun JVM, not OpenJDK. I have essentially the same setup as you. I have MAVEN_OPTS='-Xmx1624m -XX:MaxPermSize=128m' and can do a 'mvn -U clean install /Jeppe -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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.
Re: [Lift] Is it possible to use CRUDify snippets on non CRUDified pages?
I may have had override lazy val listPath = List(/) On 5 February 2010 09:58, Naftoli Gugenheim naftoli...@gmail.com wrote: What does wasn't able to mean? Did you write override lazy val listPath = List(index) ? - Jonathan Fergusonj...@spiralarm.com wrote: I wasn't able to override listPath, Ill have a bit more of a play to make sure I'm not doing anything to silly; trying to get /crudify/path to / . Rewrite worked wonderfully. Cheers Jono On 5 February 2010 04:45, Jeppe Nejsum Madsen je...@ingolfs.dk wrote: Naftoli Gugenheim naftoli...@gmail.com writes: It's not overridable? Actually, I think it is :-) You might be able to just override lazy val listPath = Nil /Jeppe - Jeppe Nejsum Madsenje...@ingolfs.dk wrote: Jonathan Ferguson j...@spiralarm.com writes: I would like to have the list view of one of my model objects as my home page. Can this done with out having the home page redirect to /mymodel/list ? I don't think you can change the native URL of CRUDify list, but you could add a rewrite (not redirect). See http://blog.getintheloop.eu/2009/5/3/url-rewriting-with-the-lift-framework /Jeppe -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com liftweb%2bunsubscr...@googlegroups.comliftweb%252bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com liftweb%2bunsubscr...@googlegroups.comliftweb%252bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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.
Re: [Lift] Is it possible to use CRUDify snippets on non CRUDified pages?
Is there are reason one or more correct than the other? Is it style or something else ? Cheers Jono On 5 February 2010 10:01, David Pollak feeder.of.the.be...@gmail.comwrote: On Thu, Feb 4, 2010 at 2:58 PM, Naftoli Gugenheim naftoli...@gmail.comwrote: What does wasn't able to mean? Did you write override lazy val listPath = List(index) This is the wrong answer. Jeppe gave the correct answer. ? - Jonathan Fergusonj...@spiralarm.com wrote: I wasn't able to override listPath, Ill have a bit more of a play to make sure I'm not doing anything to silly; trying to get /crudify/path to / . Rewrite worked wonderfully. Cheers Jono On 5 February 2010 04:45, Jeppe Nejsum Madsen je...@ingolfs.dk wrote: Naftoli Gugenheim naftoli...@gmail.com writes: It's not overridable? Actually, I think it is :-) You might be able to just override lazy val listPath = Nil /Jeppe - Jeppe Nejsum Madsenje...@ingolfs.dk wrote: Jonathan Ferguson j...@spiralarm.com writes: I would like to have the list view of one of my model objects as my home page. Can this done with out having the home page redirect to /mymodel/list ? I don't think you can change the native URL of CRUDify list, but you could add a rewrite (not redirect). See http://blog.getintheloop.eu/2009/5/3/url-rewriting-with-the-lift-framework /Jeppe -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com liftweb%2bunsubscr...@googlegroups.comliftweb%252bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com liftweb%2bunsubscr...@googlegroups.comliftweb%252bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Surf the harmonics -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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.
Re: [Lift] Re: lift-Json doesn't appear to be correctly handling attributes.
Thanks Joni, I've opened a ticket http://github.com/dpp/liftweb/issues/issue/323. Cheers Jono On 3 February 2010 17:46, Joni Freeman freeman.j...@gmail.com wrote: Hi Jonathan, Yes, definitely a bug. Could you please open a ticket (http:// github.com/dpp/liftweb/issues) and I will take a look at it. And thanks for the test case! Cheers Joni On Feb 3, 3:41 am, Jonathan Ferguson j...@spiralarm.com wrote: When converting XML to Json attributes are being lost, given the below XML document, we would expect {word:{word:content,self:http://localhost:8080/word/example ,term:example,available:true}} where as we get {word:content} example XML: word term=example self=http://localhost:8080/word/example; available=truecontent/word This is been tested on M1 and trunk. Thanks in advance. To repeat // From the command line, adjust paths as needed $scala -cp /Users/jono/.m2/repository/com/thoughtworks/paranamer/paranamer/2.0/paranamer-2.0.jar:/Users/jono/.m2/repository/net/liftweb/lift-json/2.0-SNAPSHOT/lift-json-2.0-SNAPSHOT.jar import scala.xml._ import net.liftweb.json.JsonAST._ import net.liftweb.json.Printer import net.liftweb.json.Xml val example1 = word term=example self= http://localhost:8080/word/example; available=truecontent/word val expected1 = {word:{word:content,self: http://localhost:8080/word/example ,term:example,available:true}} val got1 = Printer.compact(render(Xml.toJson(example1))) val example2 = word term=example self= http://localhost:8080/word/example; available=true/word val expected2 = {word:{word:content,self: http://localhost:8080/word/example ,term:example,available:true}} val got2 = Printer.compact(render(Xml.toJson(example2))) // Add to src/test/scala/net/liftweb/json/XmlBugs.scala Jono's XML with attributes parses correctly in { val example1 = word term=example self= http://localhost:8080/word/example; available=truecontent/word val expected1 = {word:{word:content,self: http://localhost:8080/word/example ,term:example,available:true}} val example2 = word term=example self= http://localhost:8080/word/example; available=true/word val expected2 = {word:{word:content,self: http://localhost:8080/word/example ,term:example,available:true}} Printer.compact(render(toJson(example1))) mustEqual expected1 Printer.compact(render(toJson(example2))) mustEqual expected2 } Here is what I get when I run the example provided. $scala -cp /Users/jono/.m2/repository/com/thoughtworks/paranamer/paranamer/2.0/paranamer-2.0.jar:/Users/jono/.m2/repository/net/liftweb/lift-json/2.0-SNAPSHOT/lift-json-2.0-SNAPSHOT.jar Welcome to Scala version 2.7.7.final (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_17). Type in expressions to have them evaluated. Type :help for more information. scala import scala.xml._ import scala.xml._ scala import net.liftweb.json.JsonAST._ import net.liftweb.json.JsonAST._ scala import net.liftweb.json.Printer import net.liftweb.json.Printer scala import net.liftweb.json.Xml import net.liftweb.json.Xml scala scala val example1 = word term=example self= http://localhost:8080/word/example; available=truecontent/word example1: scala.xml.Elem = word self= http://localhost:8080/word/example; term=example available=truecontent/word scala val expected1 = {word:{word:content,self: http://localhost:8080/word/example ,term:example,available:true}} expected1: java.lang.String = {word:{word:content,self: http://localhost:8080/word/example,term:example,available:true}} scala val got1 = Printer.compact(render(Xml.toJson(example1))) got1: String = {word:content} scala Jono P.S I thought I had a fix, but it broke one of HarryH's tests. scala scala val example2 = word term=example self= http://localhost:8080/word/example; available=true/word example2: scala.xml.Elem = word self= http://localhost:8080/word/example; term=example available=true/word scala val expected2 = {word:{word:content,self: http://localhost:8080/word/example ,term:example,available:true}} expected2: java.lang.String = {word:{word:content,self: http://localhost:8080/word/example,term:example,available:true}} scala val got2 = Printer.compact(render(Xml.toJson(example2))) got2: String = {word:null} scala -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr
Re: [Lift] Out of Memory Errors Building Lift
Try upgrading to the latest version of maven (2.2.1 or later ). I was having a simliar issue. Cheers Jono j...@192-168-1-69:~ $mvn -version Apache Maven 2.2.1 (r801777; 2009-08-07 05:16:01+1000) Java version: 1.6.0_17 Java home: /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home Default locale: en_US, platform encoding: utf8 OS name: mac os x version: 10.6.2 arch: x86_64 Family: mac j...@192-168-1-69:~ $ On 4 February 2010 13:09, Peter Robinett pe...@bubblefoundry.com wrote: Hi all, I seem to be to doing something wrong, as I keep getting out of memory errors when trying to build Lift from source. My command is: mvn -DXmx1024m -U clean install Am I missing something obvious? I've tried with 1024 and 2048 megabytes of memory. I'm running Java 1.6.0_17 and Maven 2.2.0 on OS X (10.6) and have 4 gigabytes of physical memory. Peter -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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] Is it possible to use CRUDify snippets on non CRUDified pages?
I would like to have the list view of one of my model objects as my home page. Can this done with out having the home page redirect to /mymodel/list ? Cheers Jono -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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] lift-Json doesn't appear to be correctly handling attributes.
When converting XML to Json attributes are being lost, given the below XML document, we would expect {word:{word:content,self:http://localhost:8080/word/example ,term:example,available:true}} where as we get {word:content} example XML: word term=example self=http://localhost:8080/word/example; available=truecontent/word This is been tested on M1 and trunk. Thanks in advance. To repeat // From the command line, adjust paths as needed $scala -cp /Users/jono/.m2/repository/com/thoughtworks/paranamer/paranamer/2.0/paranamer-2.0.jar:/Users/jono/.m2/repository/net/liftweb/lift-json/2.0-SNAPSHOT/lift-json-2.0-SNAPSHOT.jar import scala.xml._ import net.liftweb.json.JsonAST._ import net.liftweb.json.Printer import net.liftweb.json.Xml val example1 = word term=example self=http://localhost:8080/word/example; available=truecontent/word val expected1 = {word:{word:content,self: http://localhost:8080/word/example,term:example,available:true}}; val got1 = Printer.compact(render(Xml.toJson(example1))) val example2 = word term=example self=http://localhost:8080/word/example; available=true/word val expected2 = {word:{word:content,self: http://localhost:8080/word/example,term:example,available:true}}; val got2 = Printer.compact(render(Xml.toJson(example2))) // Add to src/test/scala/net/liftweb/json/XmlBugs.scala Jono's XML with attributes parses correctly in { val example1 = word term=example self=http://localhost:8080/word/example; available=truecontent/word val expected1 = {word:{word:content,self: http://localhost:8080/word/example,term:example,available:true}}; val example2 = word term=example self=http://localhost:8080/word/example; available=true/word val expected2 = {word:{word:content,self: http://localhost:8080/word/example,term:example,available:true}}; Printer.compact(render(toJson(example1))) mustEqual expected1 Printer.compact(render(toJson(example2))) mustEqual expected2 } Here is what I get when I run the example provided. $scala -cp /Users/jono/.m2/repository/com/thoughtworks/paranamer/paranamer/2.0/paranamer-2.0.jar:/Users/jono/.m2/repository/net/liftweb/lift-json/2.0-SNAPSHOT/lift-json-2.0-SNAPSHOT.jar Welcome to Scala version 2.7.7.final (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_17). Type in expressions to have them evaluated. Type :help for more information. scala import scala.xml._ import scala.xml._ scala import net.liftweb.json.JsonAST._ import net.liftweb.json.JsonAST._ scala import net.liftweb.json.Printer import net.liftweb.json.Printer scala import net.liftweb.json.Xml import net.liftweb.json.Xml scala scala val example1 = word term=example self= http://localhost:8080/word/example; available=truecontent/word example1: scala.xml.Elem = word self=http://localhost:8080/word/example; term=example available=truecontent/word scala val expected1 = {word:{word:content,self: http://localhost:8080/word/example,term:example,available:true}}; expected1: java.lang.String = {word:{word:content,self: http://localhost:8080/word/example,term:example,available:true}} scala val got1 = Printer.compact(render(Xml.toJson(example1))) got1: String = {word:content} scala Jono P.S I thought I had a fix, but it broke one of HarryH's tests. scala scala val example2 = word term=example self= http://localhost:8080/word/example; available=true/word example2: scala.xml.Elem = word self=http://localhost:8080/word/example; term=example available=true/word scala val expected2 = {word:{word:content,self: http://localhost:8080/word/example,term:example,available:true}}; expected2: java.lang.String = {word:{word:content,self: http://localhost:8080/word/example,term:example,available:true}} scala val got2 = Printer.compact(render(Xml.toJson(example2))) got2: String = {word:null} scala -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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.
Re: [Lift] Error attempting to build lift source.
Thanks that appears to have most of the build working, it now fails with the below error. However I can build the module I need to, so if there is no immediate answer don't worry. Thanks again for you help. Cheers Jono [INFO] [INFO] [INFO] [INFO] Building Maven Default Project [INFO] [INFO]task-segment: [archetype:generate] (aggregator-style) [INFO] [INFO] [INFO] [INFO] Preparing archetype:generate [INFO] [INFO] No goals needed for project - skipping [INFO] [INFO] Setting property: classpath.resource.loader.class = 'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'. [INFO] [INFO] Setting property: velocimacro.messages.on = 'false'. [INFO] [INFO] Setting property: resource.loader = 'classpath'. [INFO] [INFO] Setting property: resource.manager.logwhenfound = 'false'. [INFO] [INFO] [archetype:generate {execution: default-cli}] [INFO] [INFO] Generating project in Batch mode [INFO] [INFO] Archetype defined by properties [INFO] [INFO] snapshot net.liftweb:lift-archetype-blank:2.0-SNAPSHOT: checking for updates from lift-archetype-blank-repo [INFO] Downloading: /Users/jono/.m2/repository/net/liftweb/lift-archetype-blank/2.0-SNAPSHOT/lift-archetype-blank-2.0-SNAPSHOT.jar [INFO] [INFO] Unable to find resource 'net.liftweb:lift-archetype-blank:jar:2.0-SNAPSHOT' in repository lift-archetype-blank-repo (/Users/jono/.m2/repository) [INFO] [INFO] [INFO] [ERROR] BUILD FAILURE [INFO] [INFO] [INFO] [INFO] The desired archetype does not exist (net.liftweb:lift-archetype-blank:2.0-SNAPSHOT) [INFO] [INFO] [INFO] [INFO] For more information, run Maven with the -e switch [INFO] [INFO] [INFO] [INFO] Total time: 6 seconds [INFO] [INFO] Finished at: Thu Jan 28 19:38:32 EST 2010 [INFO] [INFO] Final Memory: 13M/527M [INFO] [INFO] [INFO] ..FAILED (8.8 s) [INFO] The build exited with code 1. See /Users/jono/Documents/workspace/liftweb/archetypes/lift-archetype-blank/target/it/sample/build.log for details. [INFO] - [INFO] Build Summary: [INFO] Passed: 0, Failed: 1, Errors: 0, Skipped: 0 [INFO] - [ERROR] The following builds failed: [ERROR] * sample [INFO] - [INFO] [ERROR] BUILD FAILURE [INFO] [INFO] : org.apache.maven.plugin.invoker.invokersess...@7dbdc3af 1 build failed. [INFO] [INFO] For more information, run Maven with the -e switch [INFO] [INFO] Total time: 33 minutes 11 seconds [INFO] Finished at: Thu Jan 28 19:38:33 EST 2010 [INFO] Final Memory: 105M/527M [INFO] 2010/1/28 Indrajit Raychaudhuri indraj...@gmail.com Can you please rename the folder read only to read_only and give it another try? Cheers, Indrajit On 28/01/10 12:24 PM, Jonathan Ferguson wrote: Hi all, I get the following error when attempting to build the lift source code. [ERROR] Exception in thread main java.lang.NoClassDefFoundError: -DpackageLinkDefs=file:///Users/jono/Documents/workspace/read only/liftweb/framework/lift-base/lift-common/target/packageLinkDefs/properties I've followed the instructions found on the git wiki ( http://wiki.github.com/dpp/liftweb/how-to-getting-and-building-from-source), my environment details are as follows: OSX 10.6.2, Java 1.6, Maven 2.2.0, scala 2.7.7, I have the following maven options -Dfile.encoding=utf8 -Xmx1024m -Xms512m and I am building from the root of the lift project. I've also tried removing the org directory from the maven repository as it was mentioned in a previous post titled Fwd: Build failed in Hudson: Lift #1307 - see http://groups.google.com/group/liftweb/browse_thread/thread/154810e3419916a8/4ed7332f290fffbf?lnk=gstq=packageLinkDefs#4ed7332f290fffbf http://groups.google.com/group/liftweb/browse_thread/thread/154810e3419916a8/4ed7332f290fffbf?lnk=gstq=packageLinkDefs#4ed7332f290fffbf Any clues as to what I'm doing wrong would be greatly appreciated. For rather more verbose details as to my environment and the error can be found below. Jono. $echo $MAVEN_OPTS -Dfile.encoding=utf8 -Xmx1024m -Xms512m $java -version java version
Re: [Lift] Error attempting to build lift source.
Thats it ! Cheers Jono 2010/1/28 Indrajit Raychaudhuri indraj...@gmail.com Great! Next up move to Maven 2.2.1. Cheers, Indrajit On 28/01/10 2:15 PM, Jonathan Ferguson wrote: Thanks that appears to have most of the build working, it now fails with the below error. However I can build the module I need to, so if there is no immediate answer don't worry. Thanks again for you help. Cheers Jono [INFO] [INFO] [INFO] [INFO] Building Maven Default Project [INFO] [INFO]task-segment: [archetype:generate] (aggregator-style) [INFO] [INFO] [INFO] [INFO] Preparing archetype:generate [INFO] [INFO] No goals needed for project - skipping [INFO] [INFO] Setting property: classpath.resource.loader.class = 'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'. [INFO] [INFO] Setting property: velocimacro.messages.on = 'false'. [INFO] [INFO] Setting property: resource.loader = 'classpath'. [INFO] [INFO] Setting property: resource.manager.logwhenfound = 'false'. [INFO] [INFO] [archetype:generate {execution: default-cli}] [INFO] [INFO] Generating project in Batch mode [INFO] [INFO] Archetype defined by properties [INFO] [INFO] snapshot net.liftweb:lift-archetype-blank:2.0-SNAPSHOT: checking for updates from lift-archetype-blank-repo [INFO] Downloading: /Users/jono/.m2/repository/net/liftweb/lift-archetype-blank/2.0-SNAPSHOT/lift-archetype-blank-2.0-SNAPSHOT.jar [INFO] [INFO] Unable to find resource 'net.liftweb:lift-archetype-blank:jar:2.0-SNAPSHOT' in repository lift-archetype-blank-repo (/Users/jono/.m2/repository) [INFO] [INFO] [INFO] [ERROR] BUILD FAILURE [INFO] [INFO] [INFO] [INFO] The desired archetype does not exist (net.liftweb:lift-archetype-blank:2.0-SNAPSHOT) [INFO] [INFO] [INFO] [INFO] For more information, run Maven with the -e switch [INFO] [INFO] [INFO] [INFO] Total time: 6 seconds [INFO] [INFO] Finished at: Thu Jan 28 19:38:32 EST 2010 [INFO] [INFO] Final Memory: 13M/527M [INFO] [INFO] [INFO] ..FAILED (8.8 s) [INFO] The build exited with code 1. See /Users/jono/Documents/workspace/liftweb/archetypes/lift-archetype-blank/target/it/sample/build.log for details. [INFO] - [INFO] Build Summary: [INFO] Passed: 0, Failed: 1, Errors: 0, Skipped: 0 [INFO] - [ERROR] The following builds failed: [ERROR] * sample [INFO] - [INFO] [ERROR] BUILD FAILURE [INFO] [INFO] : org.apache.maven.plugin.invoker.invokersess...@7dbdc3af 1 build failed. [INFO] [INFO] For more information, run Maven with the -e switch [INFO] [INFO] Total time: 33 minutes 11 seconds [INFO] Finished at: Thu Jan 28 19:38:33 EST 2010 [INFO] Final Memory: 105M/527M [INFO] 2010/1/28 Indrajit Raychaudhuri indraj...@gmail.com mailto:indraj...@gmail.com Can you please rename the folder read only to read_only and give it another try? Cheers, Indrajit On 28/01/10 12:24 PM, Jonathan Ferguson wrote: Hi all, I get the following error when attempting to build the lift source code. [ERROR] Exception in thread main java.lang.NoClassDefFoundError: -DpackageLinkDefs=file:///Users/jono/Documents/workspace/read only/liftweb/framework/lift-base/lift-common/target/packageLinkDefs/properties I've followed the instructions found on the git wiki ( http://wiki.github.com/dpp/liftweb/how-to-getting-and-building-from-source ), my environment details are as follows: OSX 10.6.2, Java 1.6, Maven 2.2.0, scala 2.7.7, I have the following maven options -Dfile.encoding=utf8 -Xmx1024m -Xms512m and I am building from the root of the lift project. I've also tried removing the org directory from the maven repository as it was mentioned in a previous post titled Fwd: Build failed in Hudson: Lift #1307 - see http://groups.google.com/group/liftweb/browse_thread/thread/154810e3419916a8/4ed7332f290fffbf
[Lift] Error attempting to build lift source.
Hi all, I get the following error when attempting to build the lift source code. [ERROR] Exception in thread main java.lang.NoClassDefFoundError: -DpackageLinkDefs=file:///Users/jono/Documents/workspace/read only/liftweb/framework/lift-base/lift-common/target/packageLinkDefs/properties I've followed the instructions found on the git wiki ( http://wiki.github.com/dpp/liftweb/how-to-getting-and-building-from-source ), my environment details are as follows: OSX 10.6.2, Java 1.6, Maven 2.2.0, scala 2.7.7, I have the following maven options -Dfile.encoding=utf8 -Xmx1024m -Xms512m and I am building from the root of the lift project. I've also tried removing the org directory from the maven repository as it was mentioned in a previous post titled Fwd: Build failed in Hudson: Lift #1307 - see http://groups.google.com/group/liftweb/browse_thread/thread/154810e3419916a8/4ed7332f290fffbf?lnk=gstq=packageLinkDefs#4ed7332f290fffbf Any clues as to what I'm doing wrong would be greatly appreciated. For rather more verbose details as to my environment and the error can be found below. Jono. $echo $MAVEN_OPTS -Dfile.encoding=utf8 -Xmx1024m -Xms512m $java -version java version 1.6.0_17 Java(TM) SE Runtime Environment (build 1.6.0_17-b04-248-10M3025) Java HotSpot(TM) 64-Bit Server VM (build 14.3-b01-101, mixed mode) $mvn -version Apache Maven 2.2.0 (r788681; 2009-06-26 23:04:01+1000) Java version: 1.6.0_17 Java home: /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home Default locale: en_US, platform encoding: utf8 OS name: mac os x version: 10.6.2 arch: x86_64 Family: mac $scala -version Scala code runner version 2.7.7.final -- Copyright 2002-2009, LAMP/EPFL j...@192-168-1-69:lift-base $echo $MAVEN_OPTS -Dfile.encoding=utf8 -Xmx1024m -Xms512m j...@192-168-1-69:liftweb $mvn -e clean install + Error stacktraces are turned on. [INFO] Scanning for projects... [INFO] Reactor build order: [INFO] Lift Web Framework [INFO] Lift Base Components [INFO] Lift Common [INFO] Lift Actor [INFO] Lift Json [INFO] Lift Util [INFO] Lift WebKit [INFO] Lift Persistence Components [INFO] Lift Mapper [INFO] Lift JPA [INFO] Lift Record [INFO] Lift Addon Modules [INFO] Lift TestKit [INFO] Lift OSGi [INFO] Lift Wizard [INFO] Lift Widgets [INFO] Lift Machine [INFO] Lift Textile [INFO] Lift Facebook [INFO] Lift AMQP [INFO] Lift XMPP [INFO] Lift OpenID [INFO] Lift OAuth [INFO] Lift OAuth Mapper [INFO] Lift PayPal [INFO] Lift JTA [INFO] Lift Imaging [INFO] Lift Core (full lift) [INFO] Lift Archetypes [INFO] lift-archetype-blank [INFO] lift-archetype-basic [INFO] lift-archetype-jpa-blank-single [INFO] lift-archetype-jpa-blank [INFO] lift-archetype-jpa-basic [INFO] Lift Examples [INFO] Lift Standard Example [INFO] OSGi Examples for Lift [INFO] OSGi Examples for Lift - Hello [INFO] Skittr Example [INFO] HelloLift example application [INFO] HelloDarwin tutorial application [INFO] JPA Demo Master [INFO] JPADemo-spa [INFO] JPADemo-web [INFO] Lift Flot widget example [INFO] HTTP Authentication example [INFO] Lift Web Framework Parent Aggregator WAGON_VERSION: 1.0-beta-2 [INFO] [INFO] Building Lift Web Framework [INFO]task-segment: [clean, install] [INFO] [INFO] [clean:clean {execution: default-clean}] [INFO] Deleting /Users/jono/Documents/workspace/read only/liftweb/framework/target [INFO] [enforcer:enforce {execution: default}] [INFO] [resources:copy-resources {execution: default-copy-resources}] [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 0 resource [INFO] [scala:compile {execution: default}] [INFO] Checking for multiple versions of scala [INFO] includes = [**/*.scala,**/*.java,] [INFO] excludes = [] [WARNING] No source files found. [INFO] [scala:testCompile {execution: default}] [INFO] Checking for multiple versions of scala [INFO] includes = [**/*.scala,**/*.java,] [INFO] excludes = [] [WARNING] No source files found. [INFO] [site:attach-descriptor {execution: default-attach-descriptor}] [INFO] [source:jar-no-fork {execution: default}] [INFO] [changes:changes-validate {execution: default-changes-validate}] [INFO] [install:install {execution: default-install}] [INFO] Installing /Users/jono/Documents/workspace/read only/liftweb/framework/pom.xml to /Users/jono/.m2/repository/net/liftweb/framework/2.0-SNAPSHOT/framework-2.0-SNAPSHOT.pom [INFO] [INFO] Building Lift Base Components [INFO]task-segment: [clean, install] [INFO] [INFO] [clean:clean {execution: default-clean}] [INFO] Deleting /Users/jono/Documents/workspace/read only/liftweb/framework/lift-base/target [INFO] [enforcer:enforce {execution: default}] [INFO]
Re: [Lift] intro mvn critique
What about using mvn archetype:generate? It gives a wizard style interface to create new projects. Jono 2010/1/23 Tim Nelson tnell...@gmail.com I've been meaning to do this for awhile: http://dl.dropbox.com/u/1154284/lift-mvn.html Feel free to add this to the main Lift site. Tim On Thu, Jan 21, 2010 at 6:35 PM, Raoul Duke rao...@gmail.com wrote: I wish, but no. I've written my own shell script. ugh. could the html verison perhaps be improved to not have extra blank lines which prevent me from successfully copy and pasting it into my shell? :-) http://liftweb.net/docs/getting_started/mod_master.html#x1-40001.2 sincerely. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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.
Re: [Lift] Goals for type and method renaming for Lift 2.0 - was: Open discussion on Lift Name Calling practices
2009/12/15 David Pollak feeder.of.the.be...@gmail.com 5) Avoid using abbreviations I disagree. When coding with a non-IDE, abbreviations make life much easier. When using abbreviations, could the abbreviation be documented even it if it the most mind numbingly obvious abbreviation as there will always be people from a different background who don't grok it. Cheers Jono -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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.
Re: [Lift] Is there a togglable ajax button in lift?
Will have a look over the next few days. Thanks you very much. Jono 2009/11/26 Derek Chen-Becker dchenbec...@gmail.com I haven't tried it, but I'm pretty sure that if you give the button an id you should be able to fire the text change from the AJAX handler. Something like: import net.liftweb.http.js._ import JE._ SHtml.ajaxButton(Click me!, () = { doSomethingServerSide(); JsCmds.SetElemById(myButton, Click me again!, innerHtml)}, id - myButton) That's off the top of my head, so let me know if that doesn't work. Derek On Tue, Nov 24, 2009 at 4:23 PM, Jonathan Ferguson j...@spiralarm.comwrote: I've looked through the API and couldn't find anything that seemed suitable. We need an ajax button that when clicked will fire an event to the server and then toggle the button text. This could be by having two different buttons and only showing one. Cheers Jono -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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.
Re: [Lift] Re: Call it Lift 2.0
2009/11/18 David Pollak feeder.of.the.be...@gmail.com - Jonathan Fergusonj...@spiralarm.com wrote: I was thinking about this earlier, if there is to be a 2.0 I would hope there was a chance to remove deprecated code. Which particular deprecated code are you thinking. Generally, nothing concrete, there have been a few conversations on the list where you have said to leave deprecated code in place rather than remove so as not to cause undue pain. Also consider making breaking changes @dpp hasn't been in favour of making to date. Which changes are you thinking about? Once again, it was a general there have been a few conversations on the list where changing from Option to Box or renaming functions and you've suggested leaving them, once again not to cause undue pain. Not to annoy him. As 1.X to 2.X is a big enough change that people who don't want to move can stay with a stable 1.X and those of us who are running HEAD/TRUNK whatever these new fangled git kids call it nowadays can keep racing along. I'm not sure we have the resources to support a 1.X and a 2.X and a 2.7.x and a 2.8.x branch. If there are any folks who want to step up and maintain a branch (or if there's money to hire someone), it's something worth a discussion, but I don't think there's anyone I know of who could maintain a 1.X branch if we're going to get radical with a 2.X. I think it's one branch. I may not have thought of this, we have 1.0.X and 1.1 at the moment. I guess I thought a 1.1 and 1.0.X would be unsupported if people didn't have money. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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=.
Re: [Lift] Re: Call it Lift 2.0
I was thinking about this earlier, if there is to be a 2.0 I would hope there was a chance to remove deprecated code. Also consider making breaking changes @dpp hasn't been in favour of making to date. Not to annoy him. As 1.X to 2.X is a big enough change that people who don't want to move can stay with a stable 1.X and those of us who are running HEAD/TRUNK whatever these new fangled git kids call it nowadays can keep racing along. Jono. 2009/11/17 Heiko Seeberger heiko.seeber...@googlemail.com 2009/11/17 David Pollak feeder.of.the.be...@gmail.com The current Lift is not a major change to Lift 1.0, it's a minor progression and a lot of tuning of the developer experience. There are breaking changes to the API which in the version policy suggested by me (the OSGi way) means increasing the major version number. OK, of course we need not stick to this particular version policy, but it would be beneficial to have one. What about: Increasing the minor version number (e.g. 1.0 - 1.1) means breaking changes to the API. Increasing the micro version number (e.g. 1.1.0 - 1.1.1) means *no* breaking changes to the API. Heiko My job: weiglewilczek.com My blog: heikoseeberger.name Follow me: twitter.com/hseeberger OSGi on Scala: 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 lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@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=.
[Lift] Re: Wizard at BASE
Surely you mean Sydney :) 2009/11/11 Randinn rand...@gmail.com Its sounds like your presentation went well, congrats. now we need to talk you into a Melbourne trip. :) On Nov 11, 5:15 am, David Pollak feeder.of.the.be...@gmail.com wrote: On Tue, Nov 10, 2009 at 9:52 AM, Peter Robinett pe...@bubblefoundry.com wrote: Hi David, Thanks for presenting your latest work on Wizard last night at the Bay Area Scala Enthusiasts meetup. I enjoyed hearing about Wizard and have a few comments that I wanted to share with you and the rest of the Lift community. I know Wizard is very new and I'm only going by what I learned last night, so please bear with me if I misunderstood anything! As I understand it a Wizard instance is composed of screens ('questions'? I forget the exact terminology), each of which can have multiple inputs, each input having a prompt ('Name', 'Your mother or father's name', etc) and multiple validation rules. User input is saved each time the user hits the Submit (or Next, in your example) button. User state is stored from screen to screen and can be rolled backwards but not forward. This is analogous to checking out an older revision in a version control system, with each submitted screen being a revision, but then loosing all revisions since the checkout (rebasing the HEAD I believe it's called in Git). What I expected, and what I think many other people would expect, is that going back and forward among screens does not change the Wizard state but simply changes what portion of the questions and responses the user sees. In this case each screen is a simple, reduced view of the current state, rather than a state in itself. To use an analogy, think of a Wizard instance as an (annoying) adventure game and each screen as a dungeon room. Let's say I fight my way through several rooms full of grues, only to reach a locked door. I'm told that the switch to unlock the door is 2 rooms back. I go back (ie the previous screen method is fired twice) and I throw the switch. Unfortunately, Wizard has also rolled back the dungeon state two revisions and the intermediate room and room with the door now have fearsome grues in them again! (In fact, I think Wizard could be used quite easily for adventure games like that. Cool! I'm reminded of my time making games in HyperCard. =) To give another example, let's say I have a Wizard representing an e- commerce site and have the following screens: shopping cart - name and shipping address - credit card and billing address - confirmation. If I get to the confirmation screen and see that I added 2 Widgets and only want to buy 1, I want to be able to go back to the shopping cart screen to make my change without losing the addresses and payment details I entered in the intermediate screens. Am I describing Wizard correctly, and if so, why did you chose the first method of operation over the second? Can the second mode be added? Not easily. Snapshotting at a point in time and rolling back to that point is easy with immutability. Merging different branches of a given snapshot is non-trivial and is not likely a feature that will make it into Wizard in the near term. Put another way, 3 way merges on text is non-trivial. 3 way merges on non-text is not a solved problem that I know of. Further, once you merge text in Git, you have the compiler test to make sure that code makes sense, but doing logic testing would be difficult during a merge phase. Thanks for all the great work and I'm really looking forward to using Wizard! Peter Robinett -- Lift, the simply functional web frameworkhttp://liftweb.net Beginning Scalahttp://www.apress.com/book/view/1430219890 Follow me:http://twitter.com/dpp Surf the harmonics --~--~-~--~~~---~--~~ 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: Unit testing a RESTful webservice with Lift
We fire up Jetty populate a temp database and then run a batch of tests. Seems to work well for us. Jono 2009/11/10 Alex Black a...@alexblack.ca Can anyone suggest some good examples or strategies to use to test a webservice written with Lift? I've started down the path of firing up Jetty in a unit test, then just hitting it with say a GET and checking the response. Whats a good way of firing up Jetty? It looks like using ServletTester would be the way to go: http://www.christianschenk.org/blog/testing-web-applications-with-jetty/ could that work with Lift? - Alex --~--~-~--~~~---~--~~ 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: Latest API Documentation
Is it practical to build the snapshot documentation or is it being built to often? Jono 2009/11/6 David Pollak feeder.of.the.be...@gmail.com On Wed, Nov 4, 2009 at 10:44 PM, aw anth...@whitford.com wrote: When clicking on the API Documentation link, it links to 1.0 documentation... Is there a link for 1.1-M7 documentation? (I tried going to http://scala-tools.org/scaladocs/liftweb/1.1-M7/ but that didn't work...) Try: http://scala-tools.org/mvnsites/liftweb-1.1-M6/ The M7 docs will be up in 30-60 minutes. -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Surf the harmonics --~--~-~--~~~---~--~~ 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: Two how-to questions
The answer for two is add an email appender to your log4j configuration. Such as :: appender name=email class=org.apache.log4j.net.SMTPAppender param name=BufferSize value=512 / param name=SMTPHost value=127.0.0.1 / param name=From value=myser...@mydomain.com / param name=To value=myem...@mydomain.com / param name=Subject value=OH NOES I HAS ERRAS / layout class=org.apache.log4j.PatternLayout param name=ConversionPattern value=[%d{ISO8601}]%n%n%-5p%n%n%c%n%n%m%n%n / /layout filter class=org.apache.log4j.varia.LevelRangeFilter param name=LevelMin value=ERROR/ param name=LevelMax value=FATAL/ /filter /appender so the appender is used remember to add it : root priority value=INFO/ appender-ref ref=file/ appender-ref ref=email / /root Finding an example for 1. 2009/11/3 Naftoli Gugenheim naftoli...@gmail.com Could someone give me a quick code sample to get me started on each of the following? 1. A task that should run at a fixed time each day 2. (If it's possible.) Errors logged should be emailed. 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: Possible bug in xml to json conversion
Thanks for the update Joni and sorry for not getting back sooner. I'll try the code change you've suggested. Should I open a bug for the final example? Cheers Jono 2009/10/28 Joni Freeman freeman.j...@gmail.com Hi Jonathan, Current toJson conversion does not support this case very well. The transformation rule is such that from each leaf XML element a JSON field is generated. statsfoo/stats - stats:foo And if that leaf element contains attributes we do not convert it automatically to JSON object as you expected. Instead, another field at same level is created: stats count=0foo/stats - stats:foo count:0 In your case the leaf node is empty, therefore you will get a field with null value: stats count=0/stats - stats:null count:0 You can fix this for instance by postprocessing the generated JSON. In this case it is a bit involved and verbose (example below fixes 'stats' element, similar conversion is required for 'messages' element): val json = toJson(xml1) map { case JField(count, JString(count)) = JObject(JField(count, JInt (count.toInt)) :: Nil) // lift to object case JField(stats, _) = JNothing // remove null field case x = x } map { case JField(count, x: JObject) = JField(stats, x) // rename field count to stats case x = x } Note, the conversion rule which you expected is a perfectly valid conversion too. The rationale behind the current rule is that it never makes conversions which changes resulting JSON structure when attributes are missing. It is therefore more predictable. This blog post summarizes some other valid conversion rules http://onwebdevelopment.blogspot.com/2008/05/converting-xml-to-json.html We could add support for other conversion rules if there's a strong pressure to do so. But my current preference is to use a simple rule and then handle corner cases using transformation pipelines (using 'map' function). PS. The very last example you gave contains a bug which I try to nail down today. XML is parsed differently when all elements are in same line. Thanks for good examples! Cheers Joni On 28 loka, 09:24, Jonathan Ferguson j...@spiralarm.com wrote: Depending on the structure of the XML, attributes and child elements are being lost. This can be seen in example 4, where the attribute expiry_date and the child element status have been dropped. It would also appear when XML is being converted to JSON attributes are being flattened to elements. I'm not sure if this is expected or not, this can be seen in examples 1,2 3. The child element status with attribute count is converted to two attributes status with a value of null and count with the correct value. To test I added the following before the closing brace of XmlExamplesTest.scala in lift-json. Is this a bug or my error ? Cheers Jono P.S I've noticed this could be related to the thread Possible lift- json bug in Xml.toJson http://groups.google.com/group/liftweb/browse_thread/thread/47c581d63... /* Test */ import scala.xml.Node def xml2Json(xml:Node):String = { val json = toJson(xml) compact(render(json)) } XML to JSON Example with multiple attributes, multiple nested elements in { xml2Json(xml1) mustEqual expected1 } XML to JSON Example with multiple attributes, multiple nested elements in { xml2Json(xml2) mustEqual expected2 } XML to JSON Example with one attribute, multiple nested elements in { xml2Json(xml3) mustEqual expected3 } XML to JSON Example with one attribute, one nested element in { xml2Json(xml4) mustEqual expected4 } val xml1 = message expiry_date=20091126 text=text word=ant self=mestats count=0/statsmessages href=https:// domain.com/message/ant/messages/message val expected1 = {message:{expiry_date: 20091126,text:text,word:ant,self:me,stats:{count: 0},messages:{href:https://domain.com/message/ant}}}; val actual1 = {message: {expiry_date:20091126,word:ant,text:text,self:me,stats:null,count:0,messages:null,href:https:// domain.com/message/ant}} val xml2 = message expiry_date=20091126 text=text word=ant self=mestats count=0/statsmessages href=https:// domain.com/message/ant/messages/message val expected2 = {message:{expiry_date: 20091126,text:text,word:ant,self:me,stats:{count: 0},messages:{href:https://domain.com/message/ant}}}; val actual2 = {message: {expiry_date:20091126,word:ant,text:text,self:me,stats:null,count:0,messages:null,href:https:// domain.com/message/ant}} val xml3 = message expiry_date=20091126stats count=0/ statsmessages href=https://domain.com/message/ant;/messages/ message val expected3 = {message:{expiry_date:20091126,stats: {count:0},messages:{href:https://domain.com/message/ant}}}; val actual3 = {message: {expiry_date:20091126,stats:null,count:0,messages:null,href:https:// domain.com/message/ant}} val xml4
[Lift] Possible bug in xml to json conversion
Depending on the structure of the XML, attributes and child elements are being lost. This can be seen in example 4, where the attribute expiry_date and the child element status have been dropped. It would also appear when XML is being converted to JSON attributes are being flattened to elements. I'm not sure if this is expected or not, this can be seen in examples 1,2 3. The child element status with attribute count is converted to two attributes status with a value of null and count with the correct value. To test I added the following before the closing brace of XmlExamplesTest.scala in lift-json. Is this a bug or my error ? Cheers Jono P.S I've noticed this could be related to the thread Possible lift- json bug in Xml.toJson http://groups.google.com/group/liftweb/browse_thread/thread/47c581d63ddc04c5/86a11ffcf3040aaa?lnk=gstq=Json+#86a11ffcf3040aaa /* Test */ import scala.xml.Node def xml2Json(xml:Node):String = { val json = toJson(xml) compact(render(json)) } XML to JSON Example with multiple attributes, multiple nested elements in { xml2Json(xml1) mustEqual expected1 } XML to JSON Example with multiple attributes, multiple nested elements in { xml2Json(xml2) mustEqual expected2 } XML to JSON Example with one attribute, multiple nested elements in { xml2Json(xml3) mustEqual expected3 } XML to JSON Example with one attribute, one nested element in { xml2Json(xml4) mustEqual expected4 } val xml1 = message expiry_date=20091126 text=text word=ant self=mestats count=0/statsmessages href=https:// domain.com/message/ant/messages/message val expected1 = {message:{expiry_date: 20091126,text:text,word:ant,self:me,stats:{count: 0},messages:{href:https://domain.com/message/ant}}}; val actual1 = {message: {expiry_date:20091126,word:ant,text:text,self:me,stats:null,count:0,messages:null,href:https:// domain.com/message/ant}} val xml2 = message expiry_date=20091126 text=text word=ant self=mestats count=0/statsmessages href=https:// domain.com/message/ant/messages/message val expected2 = {message:{expiry_date: 20091126,text:text,word:ant,self:me,stats:{count: 0},messages:{href:https://domain.com/message/ant}}}; val actual2 = {message: {expiry_date:20091126,word:ant,text:text,self:me,stats:null,count:0,messages:null,href:https:// domain.com/message/ant}} val xml3 = message expiry_date=20091126stats count=0/ statsmessages href=https://domain.com/message/ant;/messages/ message val expected3 = {message:{expiry_date:20091126,stats: {count:0},messages:{href:https://domain.com/message/ant}}}; val actual3 = {message: {expiry_date:20091126,stats:null,count:0,messages:null,href:https:// domain.com/message/ant}} val xml4 = message expiry_date=20091126stats count=0/ stats/message val expected4 = {message:{expiry_date:20091126,stats: {count:0}}} val actual4 = {message:} --~--~-~--~~~---~--~~ 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: **Breaking Changes** **README** **Important**
You're right, my bad - an old pom was looking at the wrong repo, all happy now. Cheers Jono 2009/10/22 David Pollak feeder.of.the.be...@gmail.com On Wed, Oct 21, 2009 at 10:27 PM, Jonathan Ferguson j...@spiralarm.comwrote: Do we need to update our pom's or should it be code changes only ? You likely only need to make the code change... at least that's been the case for all the projects I've converted. Cheers Jono 2009/10/22 David Pollak feeder.of.the.be...@gmail.com Folks, As the title of this email indicates, there are breaking changes in Lift that just got pushed to master. We've migrated from Scala Actors to Lift Actors and included a series of traits that allow Lift to use its own Actors or Akka Actors (or anything else that implements that interface.) The two big changes that you'll have to work with are: - Box/Full/Empty/Failure was moved from the lift-util/net.liftweb.util package to the lift-common/net.liftweb.common package. The reason for this change is that we're going to make the lift-common package a more generic, non-web related package. It currently contains Box and Actor, but in the future may contain other interfaces that will have concrete implementations outside of Lift. We moved Box there because Box is richer than Scala's Option class and being able to carry Exceptions around in a Box while still being able to map/flatMap/foreach over a Box (these are unavailable for Scala's Either). Some we're going to actively promote using Box as a replacement for Option in all Scala apps. What this means for you is you have to import net.liftweb.common._ in any file that you also import net.liftweb.util.? - Lift no longer support Scala Actors for Comet Actors. The GenericActor API offers pretty much the same client interface to Lift's Actors, so ! and !? work the same way. However, there's no link, self, start or exit methods. Please do an mvn -U clean install on your code and run it against the new code. If you have any Comet-related weirdness, please report it immediately. We're planning M7 in 2 weeks, so we've got lots of time to iron any kinks out of this code. Thanks, David -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Surf the harmonics -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Surf the harmonics --~--~-~--~~~---~--~~ 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 do I pass information between a Comet Actor and a StatefulSnippet ?
2009/10/22 David Pollak feeder.of.the.be...@gmail.com On Wed, Oct 21, 2009 at 8:46 PM, Jonathan Ferguson j...@spiralarm.comwrote: I have a StatefulSnippet that uses a CometActor to keep users informed when performing a lengthy task, much like the example on the demo site ( http://demo.liftweb.net/longtime). The only difference being I pass the CometActor an identifier so it knows which job to inform the user about. When the task is over I need to display a form to the user, which I would assume would be rendered by the snippet. How does the actor tell the snippet the task is complete ? The Actor has to know about the snippet... you could send the Actor a message with a reference to the snippet and then call a method on the snippet when the Actor is done. Does that do it for you? I don't see how I can I do that. Currently the comet actor is setup in a snippet, see below, how do get a reference to the actor to send it a message ? lift:comet type=WatchDog name={id} span id=statustwd:statusWatch dog status/twd:status/span /lift:comet The id being passed via the name parameter is a reference the job to monitor. I mention this only as I'm not sure if it's bad form or not. I assuming it is trivial and I've thought or coded myself into a corner. Thanks in advance. Jono -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Surf the harmonics --~--~-~--~~~---~--~~ 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 do I pass information between a Comet Actor and a StatefulSnippet ?
2009/10/23 David Pollak feeder.of.the.be...@gmail.com On Wed, Oct 21, 2009 at 10:59 PM, Jonathan Ferguson j...@spiralarm.comwrote: 2009/10/22 David Pollak feeder.of.the.be...@gmail.com On Wed, Oct 21, 2009 at 8:46 PM, Jonathan Ferguson j...@spiralarm.comwrote: I have a StatefulSnippet that uses a CometActor to keep users informed when performing a lengthy task, much like the example on the demo site ( http://demo.liftweb.net/longtime). The only difference being I pass the CometActor an identifier so it knows which job to inform the user about. When the task is over I need to display a form to the user, which I would assume would be rendered by the snippet. How does the actor tell the snippet the task is complete ? The Actor has to know about the snippet... you could send the Actor a message with a reference to the snippet and then call a method on the snippet when the Actor is done. Does that do it for you? I don't see how I can I do that. Currently the comet actor is setup in a snippet, see below, how do get a reference to the actor to send it a message ? In the snippet that yields this code: for { session - S.session } session.setupComet(WhatDog, Full(id), HeyDudeIMSoStateful(this)) // send the HeyDudeIMSoStateful message on setup... this can be anything Cool, would the correct place to collect the message be in one of the priority functions ? For instance ? override def lowPriority : PartialFunction[Any, Unit] = { case SnippetMessage(wrappedSnippet) = snippet = wrappedSnippet Thanks for the help. Jono lift:comet type=WatchDog name={id} span id=statustwd:statusWatch dog status/twd:status/span /lift:comet The id being passed via the name parameter is a reference the job to monitor. I mention this only as I'm not sure if it's bad form or not. I assuming it is trivial and I've thought or coded myself into a corner. Thanks in advance. Jono -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Surf the harmonics -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Surf the harmonics --~--~-~--~~~---~--~~ 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: **Breaking Changes** **README** **Important**
If we are using Actors for non Comet based stuff I assume we are free to leave them as is as long as we don't come asking for support ? I am thinking about moving through switching them over, but I'd like to do it at a leisurely pace. Jono 2009/10/23 David Pollak feeder.of.the.be...@gmail.com On Thu, Oct 22, 2009 at 6:03 PM, ssid j.gat...@googlemail.com wrote: Hi all, I'm using XMPP in my little LiftApp and tried to migrate my code to the new Lift Actors. Somehow it seems that net.liftweb.xmpp still uses Scala Actors. Is this intentional or about to change? I was lazy and didn't make that change. I guess I should move the XMPP stuff over. If not is it possible that Scala Actors communicate with Lift Actors? At the moment I don't get my project to compile due to some type mismatch errors but that might also be my lack of understanding of the different Actor implementations. Thanks, ssid On 22 Okt., 05:37, David Pollak feeder.of.the.be...@gmail.com wrote: Folks, As the title of this email indicates, there are breaking changes in Lift that just got pushed to master. We've migrated from Scala Actors to Lift Actors and included a series of traits that allow Lift to use its own Actors or Akka Actors (or anything else that implements that interface.) The two big changes that you'll have to work with are: - Box/Full/Empty/Failure was moved from the lift-util/net.liftweb.util package to the lift-common/net.liftweb.common package. The reason for this change is that we're going to make the lift-common package a more generic, non-web related package. It currently contains Box and Actor, but in the future may contain other interfaces that will have concrete implementations outside of Lift. We moved Box there because Box is richer than Scala's Option class and being able to carry Exceptions around in a Box while still being able to map/flatMap/foreach over a Box (these are unavailable for Scala's Either). Some we're going to actively promote using Box as a replacement for Option in all Scala apps. What this means for you is you have to import net.liftweb.common._ in any file that you also import net.liftweb.util.? - Lift no longer support Scala Actors for Comet Actors. The GenericActor API offers pretty much the same client interface to Lift's Actors, so ! and !? work the same way. However, there's no link, self, start or exit methods. Please do an mvn -U clean install on your code and run it against the new code. If you have any Comet-related weirdness, please report it immediately. We're planning M7 in 2 weeks, so we've got lots of time to iron any kinks out of this code. Thanks, David -- Lift, the simply functional web frameworkhttp://liftweb.net Beginning Scalahttp://www.apress.com/book/view/1430219890 Follow me:http://twitter.com/dpp Surf the harmonics -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Surf the harmonics --~--~-~--~~~---~--~~ 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 do I pass information between a Comet Actor and a StatefulSnippet ?
I have a StatefulSnippet that uses a CometActor to keep users informed when performing a lengthy task, much like the example on the demo site ( http://demo.liftweb.net/longtime). The only difference being I pass the CometActor an identifier so it knows which job to inform the user about. When the task is over I need to display a form to the user, which I would assume would be rendered by the snippet. How does the actor tell the snippet the task is complete ? I assuming it is trivial and I've thought or coded myself into a corner. Thanks in advance. Jono --~--~-~--~~~---~--~~ 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: **Breaking Changes** **README** **Important**
Do we need to update our pom's or should it be code changes only ? Cheers Jono 2009/10/22 David Pollak feeder.of.the.be...@gmail.com Folks, As the title of this email indicates, there are breaking changes in Lift that just got pushed to master. We've migrated from Scala Actors to Lift Actors and included a series of traits that allow Lift to use its own Actors or Akka Actors (or anything else that implements that interface.) The two big changes that you'll have to work with are: - Box/Full/Empty/Failure was moved from the lift-util/net.liftweb.util package to the lift-common/net.liftweb.common package. The reason for this change is that we're going to make the lift-common package a more generic, non-web related package. It currently contains Box and Actor, but in the future may contain other interfaces that will have concrete implementations outside of Lift. We moved Box there because Box is richer than Scala's Option class and being able to carry Exceptions around in a Box while still being able to map/flatMap/foreach over a Box (these are unavailable for Scala's Either). Some we're going to actively promote using Box as a replacement for Option in all Scala apps. What this means for you is you have to import net.liftweb.common._ in any file that you also import net.liftweb.util.? - Lift no longer support Scala Actors for Comet Actors. The GenericActor API offers pretty much the same client interface to Lift's Actors, so ! and !? work the same way. However, there's no link, self, start or exit methods. Please do an mvn -U clean install on your code and run it against the new code. If you have any Comet-related weirdness, please report it immediately. We're planning M7 in 2 weeks, so we've got lots of time to iron any kinks out of this code. Thanks, David -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Surf the harmonics --~--~-~--~~~---~--~~ 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: What is going to be in Lift 1.1
Being able to unit test record/mapper classes and the code that depends on them would be wonderful. Cheers Jono 2009/10/15 David Pollak feeder.of.the.be...@gmail.com On Wed, Oct 14, 2009 at 4:51 PM, Timothy Perrett timo...@getintheloop.euwrote: Agreed on all fronts. Points 1 - 4 are pretty key for me and the projects that run on lift at work. So, the million dollar question: ETA's of this stuff? Scala 2.8.2 (based on our previous conversation about not using 2.8.0) is still some time off right? Scala 2.8 is crystalizing. I'm expecting a release this year. I'm also more confident that EPFL will have a solid 2.8 rather than a 2.8 quickly followed by a 2.8.1. Cheers, Tim On 14 Oct 2009, at 22:27, David Pollak wrote: Folks, I'd like to get everyone's input on what Lift 1.1 will contain. Here's my list: - Wizard working to the same quality that SiteMap works - Record become the primary persistence vehicle in Lift - Lift runs on Scala 2.8 - Full support for Oracle and MS SQL Server - Integrate lift-json into Lift's JavaScript libraries - OAuth server support - Improved REST support Please let me know what your list looks like. Once we get to consensus, I'll post tickets for each of the items. Thanks, David -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Surf the harmonics -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Surf the harmonics --~--~-~--~~~---~--~~ 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] Transactions with Mappers
Is it possible, can someone point me to an example. Cheers Jono --~--~-~--~~~---~--~~ 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] Do 1.1 milestones get announced on the mailing list ?
I was wondering how often they are released? I noticed Milestone 3 is out and was thinking of switching to that rather than the snapshots as if I build without -o using snapshots I seem to download the dependencies about 6 times per module, which is a little annoying. Cheers Jono --~--~-~--~~~---~--~~ 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: Error attempting to persist Mapper
Okay, I've raised as an issue on github - http://github.com/dpp/liftweb/issues/#issue/30 Thanks Jono On Jun 27, 2:29 am, Timothy Perrett timo...@getintheloop.eu wrote: Ah sorry I didn't realize. mapper is not really my area so I cant say what's causing that. Please raise an issue on github as we'll need to look into this properly. Thanks, Tim On Jun 26, 4:59 pm, Naftoli Gugenhem naftoli...@gmail.com wrote: I think he said that code is in MetaMapper --~--~-~--~~~---~--~~ 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] Error attempting to persist Mapper
Hi all, I'm attempting to persist a Mapper used to join two tables. java.lang.NullPointerException: Trying to open an empty Box at net.liftweb.util.EmptyBox.open_$bang(Box.scala:370) at net.liftweb.util.EmptyBox.open_$bang(Box.scala:366) at net.liftweb.mapper.MetaMapper$$anonfun$12.apply(MetaMapper.scala: 583) at net.liftweb.mapper.MetaMapper$$anonfun$12.apply(MetaMapper.scala: 578) at net.liftweb.mapper.DB$.use(DB.scala:305) at net.liftweb.mapper.MetaMapper$class.save(MetaMapper.scala:577) The empty box is in the update statement, which confuses me as I should be performing an insert.( from MetaMapper ) val ret: Boolean = DB.prepareStatement(UPDATE +dbTableName+ SET +whatToSet(toSave)+ WHERE +indexMap.open_! + = ?, conn) I am assuming it is something to do with my understand of how to use a non-keyed Mapper. The exception is thrown when save is called in the join function. class AB extends Mapper[AB] { def getSingleton = AB object A extends MappedLongForeignKey(this, A) { override def dbColumnName = a_Bs_id } object B extends MappedLongForeignKey(this, B) { override def dbColumnName = B_id } object index extends MappedInt(this) { override def dbColumnName = Bs_idx } } object AB extends AB with MetaMapper[AB] { override def dbTableName = A_B def join (a : A, b : B):Boolean = { val list = AB.findAll(By(AB.a,a)) val i = list.isEmpty match { case true = 0 case false = list.size } this.create.A(a).B(b).index(i).save } } Any pointers would be appreciated, I can't change the data structure as the table is used by other applications. Jono --~--~-~--~~~---~--~~ 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] Is It possible to define a model without a primary key ?
I need a mapper that doesn't require a primary key to get a legacy db model onto lift. I can't change the table as it will break existing code. Cheers Jono --~--~-~--~~~---~--~~ 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 do I set the property 'mode' ?
Is it part of the maven build or can I set it per environment ? This is so I can use the correct log file at run time, see http://scala-tools.org/scaladocs/liftweb/1.0/net/liftweb/util/LogBoot$object.html Cheers Jono --~--~-~--~~~---~--~~ 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 do I set the property 'mode' ?
Thanks very much ! Jono On May 22, 2:38 pm, David Pollak feeder.of.the.be...@gmail.com wrote: You set it on the command line: export MAVEN_OPTS=-Drun.mode=production mvn jetty:run Thanks, David On Thu, May 21, 2009 at 9:35 PM, Jonathan Ferguson j...@spiralarm.comwrote: Is it part of the maven build or can I set it per environment ? This is so I can use the correct log file at run time, see http://scala-tools.org/scaladocs/liftweb/1.0/net/liftweb/util/LogBoot... Cheers Jono -- 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] How does one share application logic across multiple lift applications
We want to encapsulate our application logic as an external dependencies ( library ) , so it can be used by multiple lift applications. The sticking point is how one achieves this when the library needs to perform data access and persistence. The library could use structured types, to decouple itself from the Mapper classes, but this seems like an ugly hack, the structured types would need to provide access to all the Mappers fields, persistence and search operations. Next, we could use JPA, which would remove the mapper dependency from the application logic, but then we lose the ease of use of the Mappers and some of point of using Lift. Is there a way to use lift mappers in the external dependency ? What, if any are the best practices for building an API for multiple lift applications to consume ? Am I thinking about this wrong and should we be approaching it differently ? Thank you Jono --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---