[Lift] Re: How to configure two database connection in Lift?

2009-12-06 Thread Neil.Lv
In the Boot.scala ### class Boot { def boot { if (!DB.jndiJdbcConnAvailable_?) DB.defineConnectionManager(DefaultConnectionIdentifier, DBVendor) ... } } object WahDB extends ConnectionIdentifier { def jndiName = one } object WahereDB extends ConnectionIdentifier { def

[Lift] Re: How to configure two database connection in Lift?

2009-12-06 Thread Neil.Lv
Here is the db url, db.url1=jdbc:mysql://localhost:3306/blog1 db.url2=jdbc:mysql://localhost:3306/blog2 Cheers, Neil On Dec 6, 4:00 pm, Neil.Lv anim...@gmail.com wrote: In the Boot.scala ### class Boot {   def boot {     if (!DB.jndiJdbcConnAvailable_?)      

Re: [Lift] re: what changes would need to be made so LIFT can work with HTML5

2009-12-06 Thread James Black
Thank you for your response. I am new to LIFT, and I think the version of LIFT I am using, 1.0, is too old for this to work properly, as I get an error about the fact that java.lang.String is found and util.Box is required. I tried to get my app to work with LIFT 1.1 but I had problems with

[Lift] Managing templates with associated snippets?

2009-12-06 Thread Liam Clarke
Hi all, I'm quite new to Lift, just working my way through a basic web-app using the book, and my background is Django for fun, and Wicket at work, so I'm probably writing code that resembles both of those, but isn't necessarily ideal for Lift. I was just wondering about how experienced Lift

[Lift] Re: How to configure two database connection in Lift?

2009-12-06 Thread Neil.Lv
If i remove the DB.defineConnectionManager (DefaultConnectionIdentifier, DBVendor) This error message occurs. ### java.lang.NullPointerException: Looking for Connection Identifier ConnectionIden tifier(lift) but failed to find either a JNDI data source with the name lift or a lift

[Lift] Re: How to configure two database connection in Lift?

2009-12-06 Thread Neil.Lv
I don't understand the jndiName whether the jndiName is whatever string that i can specify ? ### object OneDB extends ConnectionIdentifier { def jndiName = one } ### Cheers, Neil On Dec 6, 7:54 pm, Tim Nelson tnell...@gmail.com wrote: Hi, This line configures the database connections:

Re: [Lift] Re: How to configure two database connection in Lift?

2009-12-06 Thread Tim Nelson
I think there might be a problem with the way you are specifying which db to use in your mapper classes. Here's the relevant text from the The Lift Book: dbSelect... is used to find an instance by primary key, and takes a partial function (typically a match clause) to determine which connection

Re: [Lift] re: what changes would need to be made so LIFT can work with HTML5

2009-12-06 Thread Timothy Perrett
1.0 - 1.1 is a breaking change. We just decided to renmae 1.1 to 2.0 because of all the breaking changes and subsequent work needed to migrate between versions. Please see the breaking changes notifications posted at the top of this group - they will help you migrate. Cheers, Tim Sent

[Lift] Re: How to configure two database connection in Lift?

2009-12-06 Thread Neil.Lv
Yeah, i don't want to use sharding, i just want select some information from another databases, ### object Blog extends Blog with LongKeyedMetaMapper[Blog ] { ... override def dbDefaultConnectionIdentifier = OneDB ... } ### It doesn't work, maybe the code that i write is wrong ?

[Lift] Re: Newbie question: class not foudn

2009-12-06 Thread itsjar
Thanks for the advice Alex. I am pleases to see how many helpful people there are in this group. -- 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

[Lift] Re: Sharing data between snippet functions during a single HTTP request

2009-12-06 Thread Alex Black
We made this change for Lift 1.1.  So, if you're using 1.1, the same instance of a snippet should be used for a given HTTP request. Hi David, I've just switch from Lift 1.0 to Lift 1.1-M6, do you think this change is in M6? It doesn't seem to be... I have many calls to my snippet for a

[Lift] Re: How can one bind value-less attributes?

2009-12-06 Thread Alex Black
If you output null for theattributevalue, theattributeis not rendered: I've just upgraded from 1.0 to 1.1-M6, and this doesn't seem to work any more - could this be a bug in M6? Message: scala.MatchError: null scala.runtime.ScalaRunTime$.boxArray(ScalaRunTime.scala:136)

Re: [Lift] Re: How to configure two database connection in Lift?

2009-12-06 Thread Tim Nelson
I did some more digging and got a sample app to work. You can see the code here: http://github.com/eltimn/lift_1_1_sample There are 2 things I had to do. The first is to pass in the DbId when calling Schemifier; Schemifier.schemify(true, Log.infoF _, OneDB, User) Schemifier.schemify(true,

[Lift] Re: How to configure two database connection in Lift?

2009-12-06 Thread Neil.Lv
Thanks Tim, I have tried it in my code but it doesn't work yet! The lift version is: 1.1-M7 Scala Version is: 2.7.7 Cheers, Neil On Dec 6, 10:52 pm, Tim Nelson tnell...@gmail.com wrote: I did some more digging and got a sample app to work. You can see the code

[Lift] Re: How to configure two database connection in Lift?

2009-12-06 Thread Neil.Lv
It works now, I missing the dbDefaultConnectionIdentifier definition in the others models. Thank you very much! :) Cheers, Neil On Dec 7, 12:06 am, Neil.Lv anim...@gmail.com wrote:   Thanks Tim,   I have tried it in my code but it doesn't work yet!   The lift version is:  1.1-M7

[Lift] Re: Newbie question: class not foudn

2009-12-06 Thread itsjar
I think the problem might be locates in the pom.xml I recreated the problem and don't have any problems now. On Dec 6, 2:21 pm, itsjar its...@gmail.com wrote: Thanks for the advice Alex. I am pleases to see how many helpful people there are in this group. -- You received this message

[Lift] Re: Unexpected type on a custom trait

2009-12-06 Thread Franz Bettag
Aaah! Thank you very much! That fixed it! On 6 Dez., 07:42, Alex Boisvert alex.boisv...@gmail.com wrote: Your issue is that u.customer returns a MappedLongForeignKey instance, not a Customer. You probably want to use u.customer.get or u.customer.can or something like that. alex On Sat,

[Lift] Re: what changes would need to be made so LIFT can work with HTML5

2009-12-06 Thread Randinn
Here are a couple of places to look: http://wiki.github.com/dpp/liftweb/10-11-possible-code-changes http://groups.google.com/group/liftweb/browse_thread/thread/824f14038bedf425# On Dec 6, 6:54 pm, James Black planiturth...@gmail.com wrote: Thank you for your response. I am new to LIFT, and I

Re: [Lift] Re: How can one bind value-less attributes?

2009-12-06 Thread Jeppe Nejsum Madsen
Alex Black a...@alexblack.ca writes: If you output null for theattributevalue, theattributeis not rendered: I've just upgraded from 1.0 to 1.1-M6, and this doesn't seem to work any more - could this be a bug in M6? Maybe. The code I wrote worked in 1.1-SNAPSHOT at the time.you could try

[Lift] Newbie on Lift Scala: Build in class source code?

2009-12-06 Thread itsjar
Hi, I'm considering building a web application with my software engineering group in Lift. However when I started with lift I was surprised that I received a whole log in / sign up website by just using the MegaProtoUser. This was at first sight fun, but I started wondering (and I'm pretty sure

Re: [Lift] Foreign Key constraints are not created by schemify

2009-12-06 Thread Derek Chen-Becker
Absolutely. I have a PG 8.0, 8.1 and 8.3 instance set up for testing on my home box because of the last time I made a PG-related change. Derek On Thu, Dec 3, 2009 at 2:48 PM, David Pollak feeder.of.the.be...@gmail.comwrote: On Thu, Dec 3, 2009 at 1:47 PM, Derek Chen-Becker

[Lift] Race conditions / database transaction isolation levels

2009-12-06 Thread cody koeninger
Do mapper or record provide any assistance for avoiding race conditions caused by the database transaction isolation level? I didn't notice anything in my initial skim of the lift book, and grepping the code for obvious suspects like for update didn't return anything. If not, what are people

Re: [Lift] Newbie on Lift Scala: Build in class source code?

2009-12-06 Thread Alex Boisvert
Part of the source for these objects is automatically created when you generate your lift app using the Maven archetype. For example, you'll find the source to the User class unde src/main/scala/com/liftworkshop/model/User.scala. For classes that are part of the framework, such as MegaProtoUser

Re: [Lift] Re: How can one bind value-less attributes?

2009-12-06 Thread Alex Boisvert
Using the latest and greatest (master branch), I can't reproduce the MatchError but I can reproduce the issue with the attribute being generated if the value is null. I'll fix it tomorrow morning. alex On Sun, Dec 6, 2009 at 5:59 AM, Alex Black a...@alexblack.ca wrote: If you output null

Re: [Lift] re: what changes would need to be made so LIFT can work with HTML5

2009-12-06 Thread James Black
I tried S.setDocType and got this error, using LIFT 1.0.1, with this bit of code in Boot.scala: class Boot { def boot { if (!DB.jndiJdbcConnAvailable_?) DB.defineConnectionManager(DefaultConnectionIdentifier, DBVendor) S.setDocType(Box(List(!DOCTYPE html))) ... 2009-12-06

Re: [Lift] re: what changes would need to be made so LIFT can work with HTML5

2009-12-06 Thread James Black
I forgot, this is in my default.html: html xmlns:lift=http://liftweb.net/; head On Sun, Dec 6, 2009 at 10:43 PM, James Black planiturth...@gmail.comwrote: I tried S.setDocType and got this error, using LIFT 1.0.1, with this bit of code in Boot.scala: class Boot { def boot { if

Re: [Lift] re: what changes would need to be made so LIFT can work with HTML5

2009-12-06 Thread David Pollak
Please do not use Lift 1.0.1. It was a broken release. If you are using Lift 1.0.2, please make sure that all of your Lift references (in your pom.xml file) are set to 1.0.2 and that the Scala version is set to 2.7.5. Then do a mvn -U clean jetty:run I cannot advise against using Lift 1.0.x

Re: [Lift] Re: How can one bind value-less attributes?

2009-12-06 Thread David Pollak
On Sun, Dec 6, 2009 at 7:25 PM, Alex Boisvert alex.boisv...@gmail.comwrote: Using the latest and greatest (master branch), I can't reproduce the MatchError but I can reproduce the issue with the attribute being generated if the value is null. How about adding a Box alternative rather than

[Lift] seeing JVM BUG(s) - cancelling interestOps==0

2009-12-06 Thread Xuefeng Wu
Hi, I always find the information from console: seeing JVM BUG(s) - cancelling interestOps==0 What's the reason? I use jetty 6.1.21, and I'm afraid it will cause serious error if I deploy the liftweb app in IBM WAS(WebSphere App Server) -- Scala中文社区: http://groups.google.com/group/scalacn

Re: [Lift] seeing JVM BUG(s) - cancelling interestOps==0

2009-12-06 Thread David Pollak
On Sun, Dec 6, 2009 at 10:21 PM, Xuefeng Wu ben...@gmail.com wrote: Hi, I always find the information from console: seeing JVM BUG(s) - cancelling interestOps==0 What's the reason? I use jetty 6.1.21, and I'm afraid it will cause serious error if I deploy the liftweb app in IBM

[Lift] Error when uploading large files

2009-12-06 Thread DMB
I'm getting this one in M7 when trying to upload a 8MB image file. Smaller files work just fine. It would empirically seem that I'm running against some kind of limit somewhere. If that's the case, is there a way to raise the limit? Message: org.apache.commons.fileupload.FileUploadBase

[Lift] Re: Error when uploading large files

2009-12-06 Thread DMB
Never mind, found the setting: LiftRules.maxMimeSize = 25 * 1024 * 1024 LiftRules.maxMimeFileSize = 25 * 1024 * 1024 On Dec 6, 10:48 pm, DMB combust...@gmail.com wrote: I'm getting this one in M7 when trying to upload a 8MB image file. Smaller files work just fine. It would

[Lift] I was giving a short interview for JavaBooks.org about Lift Scala

2009-12-06 Thread Marius
Hi, After a long day I ended up giving this interview. http://vimeo.com/7986506 Br's, Marius P.S. Please forgive my crappy English. -- 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