wm | 1 Nov 2010 04:06
Picon

[Lift] AJAX cache problem in IE?

I found some of Lift ajax calls working under FF/Chrome/Opera, doesn't
work under IE.

I searched a little bit, and found this is similar to my problem:

http://viralpatel.net/blogs/2008/12/ajax-cache-problem-in-ie.html

the suggested fix is add a random number to the URL, e.g.:

url = req  + "&random=" + Math.random();

But the code is generated by lift:

<a
onclick="liftAjax.lift_ajaxHandler(&quot;F1277579073123BPD=true&quot;,
null, null, null)" href="javascript://" id="refresh">refresh</a>

from:

a(() => {JsRaw(...)}, Text("refresh"), "id"->"refresh")

I wonder how can I insert such random number into the url?

Thanks.

--

-- 
You received this message because you are subscribed to the Google Groups "Lift" group.
To post to this group, send email to liftweb@...
To unsubscribe from this group, send email to liftweb+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
(Continue reading)

Wade Arnold | 1 Nov 2010 04:31
Gravatar

[Lift] OAuth Server Documentation?

I was wondering if anyone had written any documentation on using the
OAuth Server implementation committed in 2.0 http://reviewboard.liftweb.net/r/172/

I would like to take our REST api that is based off the Exploring lift
chapter 15 book and add an OAuth server before the api.

If documentation outside of the source code does not exist and anyone
is using OAuth server in production and would like to write up a best
practices for the community, add it to the website or book and would
like an external financial motivator please email me. I understand
everyone is busy. If not I guess I know what I am doing this week.

Wade

p.s. Thanks Harry H for sharing the code back to the community!

--

-- 
You received this message because you are subscribed to the Google Groups "Lift" group.
To post to this group, send email to liftweb@...
To unsubscribe from this group, send email to liftweb+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.

Bikash Patra | 1 Nov 2010 07:38
Picon

[Lift] Multiple Document Update ( MongoDB)

MongoMeta update method updates only the first occurrence of a document.


Is there any way to update all the documents that match a specific criteria ?

Suppose I have 3 documents 

MyColl extends MongoRecord[MyColl] with MongoId[MyColl] {
object name extends StringField(this,200)
}
{name: abc}
{name: def}
{name: abc}

def update() = {
col = MyColl.createRecord
col.name("xyz")
MyColl.update(("name","abc"),col)
}


Updates only the first record, .. How to update all the occurrences

Pls help.


--
You received this message because you are subscribed to the Google Groups "Lift" group.
To post to this group, send email to liftweb-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to liftweb+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
Martin | 1 Nov 2010 09:09
Picon

[Lift] Re: Lifty screencast done

Thank you for a great screencast!

On Oct 31, 7:48 pm, mroessler <michael.roess...@...> wrote:
> Richard, Thanks for doing this! Makes it easy to make and understand a
> first-time installation.
>
> On Oct 29, 4:40 am, Richard Dallaway <dalla...@...> wrote:
>
>
>
>
>
>
>
> > I hope it's not too misleading....
>
> >http://www.youtube.com/watch?v=kbwDibZmiRg
>
> > Richard

--

-- 
You received this message because you are subscribed to the Google Groups "Lift" group.
To post to this group, send email to liftweb@...
To unsubscribe from this group, send email to liftweb+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.

Heiko Seeberger | 1 Nov 2010 09:57
Gravatar

Re: [Lift] ***BREAKING CHANGE*** Logging updates and change for config coming up

That sounds fantastic!


Heiko

On 29 October 2010 19:56, Indrajit Raychaudhuri <indrajitr-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
Folks,

The upcoming milestone will have some changes in the logging
framework. This is likely to affect existing codes (most certainly if
they are using Log4J).

The key points:

- We have migrated to the new SLF4J 1.6 series (1.6.1 to be precise)

- SLF4J 1.6 and above does not have mandatory requirement for a
 logging backend pre-configured. If it doesn't find one, it just
 shows a warning and defaults to a NOP logger implementation (as
 against failing to boot up as it used to be earlier).

- We have taken the opportunity to remove hard dependency on Log4J and
 treat all SLF4J bindings as equals. This simplifies logging
 configuration in different environment and additionally helps in
 better integration with other logging addons.

- This means an application intending to use binding other than Log4J
 doesn't have to go through the complication of excluding Log4J and
 including a different binding in the build configuration. Just
 including the preferred binding would suffice.

- This also means that applications using Log4J have to explicitly
 configure the SLF4J binding (which wasn't necessary earlier because
 of hard dependency on Log4J inside Lift). This is a BREAKING CHANGE
 for existing applications. See config snippet below.

- If you intend to use logback-classic, you need to add:
 <dependency>
   <groupId>ch.qos.logback</groupId>
   <artifactId>logback-classic</artifactId>
   <version>0.9.26</version>
 </dependency>

- If you intend to use Log4J, you need to add:
   <dependency>
     <groupId>log4j</groupId>
     <artifactId>log4j</artifactId>
     <version>1.2.16</version>
   </dependency>
   <dependency>
     <groupId>org.slf4j</groupId>
     <artifactId>slf4j-log4j12</artifactId>
     <version>1.6.1</version>
   </dependency>

- The archetype templates have been updated accordingly. So new
 projects would automatically get the revised configuration. The
 default for new projects is logback-classic. However, if you wish to
 use Log4J instead you can either:
 - modify the build config appropriately (remove logback-classic
   dependency and add log4j dependency)
 - use the CLI param logBackend during archetype:generate like so:
   mvn archetype:generate -DlogBackend=log4j ... ...


- Indrajit

--
You received this message because you are subscribed to the Google Groups "Lift" group.
To post to this group, send email to liftweb-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To unsubscribe from this group, send email to liftweb+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.




--
Heiko Seeberger

Company: weiglewilczek.com
Blog: heikoseeberger.name
Follow me: twitter.com/hseeberger
OSGi on Scala: scalamodules.org
Lift, the simply functional web framework: liftweb.net
Akka - Simpler Scalability, Fault-Tolerance, Concurrency & Remoting through Actors: akkasource.org

--
You received this message because you are subscribed to the Google Groups "Lift" group.
To post to this group, send email to liftweb-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to liftweb+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
Stefan Scott Alexander | 1 Nov 2010 06:18
Picon

[Lift] Re: Guidance on using ExtJS with Lift for CRUD?

Hi -

Sorry for these newbie questions - I'm still getting started with web
apps and Lift.

The questions below could probably be answered all at once if somebody
could post a prototype Lift project which uses an ACID relational
database (eg, Postgresql) and an ExtJS GridPanel.

Say I have the following:
- sbt installed
- a prototype Lift 2.1 project 'proj001' in c:\www\lift\proj001,
- a Postgresql server running on port 5432,
- ExtJS in directory c:\www\extjs-3.3.0

If I cd to c:\www\lift\proj001 and do:

sbt update ~jetty-run

then pointing the browser to http://localhost:8080 shows the prototype
Lift 2.1 app.

Now I would like to modify this prototype Lift app in order to use an
ExtJS GridPanel and Postgresql (to display, say, the User table) -
similar to the example here:

http://dev.sencha.com/deploy/dev/examples/restful/restful.html

I'm guessing that it would be sufficient to:

- modify the following two *.html files:

(1) C:\www\lift\proj001\src\main\webapp\templates-hidden\default.html
(2) C:\www\lift\proj001\src\main\webapp\index.html

- modify the following two *.scala files:

(3) C:\www\lift\proj001\src\main\scala\code\model\User.scala
(4) C:\www\lift\proj001\src\main\scala\bootstrap\liftweb\Boot.scala

- and add a *.js file:

(5) C:\www\lift\proj001\src\main\webapp\restful.js
(based on http://dev.sencha.com/deploy/dev/examples/restful/restful.js)

In more detail...

(1) Looking at the source of:

http://dev.sencha.com/deploy/dev/examples/restful/restful.html

I assume I should add the following lines (adjusting the directory
paths as appropriate to link to the ExtJS libraries):

    <script type="text/javascript" src="../../ext-all.js"></script>
    <script type="text/javascript" src="../shared/extjs/App.js"></
script>
    <script type="text/javascript" src="restful.js"></script>
    <script type="text/javascript" src="../ux/RowEditor.js"></script>

    <link rel="stylesheet" type="text/css" href="restful.css" />
    <link rel="stylesheet" href="../ux/css/RowEditor.css" />

to file:

C:\www\lift\proj001\src\main\webapp\templates-hidden\default.html

(2) Again looking at the source of:

http://dev.sencha.com/deploy/dev/examples/restful/restful.html

I assume I should add lines:

<div class="container" style="width:500px">
    <div id="user-grid"></div>
</div>

to file:

C:\www\lift\proj001\src\main\webapp\index.html

in order to display an ExtJS GridPanel on the page.

(3), (4) I also would like to know how to modify the following *.scala
files:

C:\www\lift\proj001\src\main\scala\code\model\User.scala
C:\www\lift\proj001\src\main\scala\bootstrap\liftweb\Boot.scala

in order to persist the data in a Postgresql database (rather than in
H2 - which I believe lacks the "D" in ACID).

I have more background in database programming than in object-oriented
programming, so I tend to think in terms of first defining tables (in
SQL), and then defining classes. Web app frameworks (eg, Lift, Rails)
tend to go in the opposite direction: defining classes first, and
generating SQL table definitions from the class definitions.

I've followed the Lift examples where the programmer defines scala
classes for data and lets the framework generate the table definitions
- using the Mapper or Record libraries. I believe this generates table
definitions for the H2 dialect of SQL. Is there a similar approach
using Mapper or Record which generates table definitions for other SQL
dialects such as Postgresql?

(5) I assume that much of this example *.js file from Sencha:

http://dev.sencha.com/deploy/dev/examples/restful/restful.js

should be copied to a new *.js file on my machine:

C:\www\lift\proj001\src\main\webapp\restful.js

In the original file 'restful.js', the following lines:

// Create a standard HttpProxy instance.
var proxy = new Ext.data.HttpProxy({
    url: 'app.php/users'
});

use PHP to simulate connecting to a database stored in the session.

So these lines would need to be modified in order to use Scala/Lift
and use a connection to the Postgresql server on port 5432. This seems
like a major modification and I have no idea how to do this.

Thanks for any help.

- Stefan

PS - Do any other files need to be added to some local repositories?
Several months ago I played with Lift using Maven, and I noticed it
put a bunch of jar files into C:\Documents and Settings\abc\.m2. Now
using sbt I notice it put fewer jar files into C:\Documents and
Settings\abc\.ivy2. (This assumes that I'm user 'abc' in WinXP.)

Are all files which are needed to get started using ExtJS are included
in the sbt (.ivy2) repository? For example, do the Lift 2.1 jars
downloaded by sbt include the following implementation of interface
JSArtifacts:

http://github.com/dpp/liftweb/blob/117aada2f31e3eb2101781a5c648327568dda1e3/framework/lift-base/lift-webkit/src/main/scala/net/liftweb/http/js/extcore/ExtCoreArtifacts.scala

?

On Oct 29, 9:36 am, TylerWeir <tyler.w...@...> wrote:
> Stefan,
>
> I have an app that is fronted by ExtJs.
>
> The easiest way is to use their Restful Datastore.
>
> An example is here:http://dev.sencha.com/deploy/dev/examples/restful/restful.html
>
> Let me know if that gets you what you need.
>
> On Oct 28, 9:30 pm, Stefan Scott Alexander
>
>
>
>
>
>
>
> <stefanscottal...@...> wrote:
> > Hi -
>
> > As I continue to evaluate web application and Ajax frameworks, I keep
> > coming back to Lift and ExtJS as the best. So I want to get up to
> > speed using Lift and ExtJS for database / CRUD web apps.
>
> > The following links seem relevant:
>
> >http://github.com/dpp/liftweb/blob/117aada2f31e3eb2101781a5c648327568...
>
> >http://groups.google.com/group/liftweb/browse_thread/thread/b16c9fecd...
>
> >http://groups.google.com/group/liftweb/browse_thread/thread/7cffe4d90...
>
> > However, I'm not sure what the overall approach might involve.
>
> > Does anyone have any guidance on how to use ExtJS with Lift for CRUD /
> > database web apps?
>
> > Thanks.

--

-- 
You received this message because you are subscribed to the Google Groups "Lift" group.
To post to this group, send email to liftweb@...
To unsubscribe from this group, send email to liftweb+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.

Graham Tackley | 1 Nov 2010 11:17
Picon
Picon
Favicon

Re: [Lift] Re: XmlResponse Caching Policy

What's the full set of response headers that Lift ends up returning for that resource?  Either firebug or "wget -S" will tell you.


I'm not 100% on browser caching, but certainly squid will only obey a Cache-Control max-age header if you also specify a Date header. Also Mark Nottingham's REDbot (http://redbot.org) is very good at giving advice on whether you're setting cache headers correctly.

Though just compared your example with what I set, I always do "Cache-Control: max-age=300" whereas you've used a colon after max-age.  Try using an = instead.

g

On 31 October 2010 07:17, Dadim <stefandirnstorfer <at> gmail.com> wrote:
Just to keep this for later reference. The code that compiles looks
like this:

new XmlResponse(node, 200, "image/svg+xml", Nil) {
     override def headers =
       TheStrBindParam("Cache-Control",
                        "max-age: %d, public".format(60 * 60 * 24 * 7)) :: super.headers
   }

However, Firefox still does multiple requests, even if the same image
is requested multiple times within one page. I will do more tests on
how different proxies react to this header.

Thanks a lot.
Stefan

--
You received this message because you are subscribed to the Google Groups "Lift" group.
To post to this group, send email to liftweb-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To unsubscribe from this group, send email to liftweb+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.


Please consider the environment before printing this email. ------------------------------------------------------------------ Visit guardian.co.uk - newspaper website of the year www.guardian.co.uk www.observer.co.uk To save up to 33% when you subscribe to the Guardian and the Observer visit http://www.guardian.co.uk/subscriber --------------------------------------------------------------------- This e-mail and all attachments are confidential and may also be privileged. If you are not the named recipient, please notify the sender and delete the e-mail and all attachments immediately. Do not disclose the contents to another person. You may not use the information for any purpose, or store, or copy, it in any way. Guardian News & Media Limited is not liable for any computer viruses or other material transmitted with or as part of this e-mail. You should employ virus checking software. Guardian News & Media Limited A member of Guardian Media Group plc Registered Office PO Box 68164 Kings Place 90 York Way London N1P 2AP Registered in England Number 908396

--
You received this message because you are subscribed to the Google Groups "Lift" group.
To post to this group, send email to liftweb-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to liftweb+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
Jens Alsted | 1 Nov 2010 13:16
Picon

Re: [Lift] H2 database problems when following wiki instructions

Hi Naftoli

Before I start jetty, there are no running java processes, lsof gives me no open files.

Cheers
Jens

 


On Mon, Nov 1, 2010 at 12:25 AM, Naftoli Gugenheim <naftoligug-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:


On Sun, Oct 31, 2010 at 6:38 PM, Jens Alsted <jens.alsted-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
Hi

You are absolutely right, Boot.scala states that automatic mixed mode used via the postfix notation mentioned in the documentation that you link to.

My ubuntu setup is bog standard and thus i guess that something is wrong either with my scala  or my lift installation.

org.h2.jdbc.JdbcSQLException: Exception opening port "H2 TCP Server (tcp://192.168.1.105:33463)" (port may be in use), cause: "timeout" [90061-138]
(full stack trace is pasted last in the mail)

Netstat shows:

~/lifttest/maven/todo$ sudo netstat -anp | grep 33463
tcp6       0      0 :::33463                :::*                    LISTEN      1423/java 

and ps shows that:

~/lifttest/maven/todo$sudo ps aux | grep java
alsted    1423  0.2  9.3 675320 95944 pts/0    Sl+  22:46   0:04 /usr/lib/jvm/java-6-openjdk/bin/java -classpath /usr/share/maven2/boot/classworlds.jar -Dclassworlds.conf=/usr/share/maven2/bin/m2.conf -Dmaven.home=/usr/share/maven2 org.codehaus.classworlds.Launcher "jetty:run"
alsted    1675  0.0  0.0   3320   784 pts/1    S+   23:12   0:00 grep java

and

~/lifttest/maven/todo$ lsof -ni
COMMAND  PID   USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
java    1423 alsted   72u  IPv6   5774      0t0  TCP *:33463 (LISTEN)
java    1423 alsted   77u  IPv6   6180      0t0  TCP *:http-alt (LISTEN)


I know of no better way to see if the port is in use, so to the best of my knowledge is it java process that I have just started that uses the port that H2 generates an exception on.

Well, before you start the app do you see anything?

 
  This is properly a OS issue in the the end, but is there any known issues between lift, h2 and tcp6?

Cheers
Jens

Stacktrace:
org.h2.jdbc.JdbcSQLException: Exception opening port "H2 TCP Server (tcp://78.47.127.212:33463)" (port may be in use), cause: "timeout" [90061-138]
    at org.h2.message.DbException.getJdbcSQLException(DbException.java:327)
    at org.h2.message.DbException.get(DbException.java:167)
    at org.h2.tools.Server.start(Server.java:358)
    at org.h2.engine.Database.startServer(Database.java:613)
    at org.h2.engine.Database.open(Database.java:525)
    at org.h2.engine.Database.openDatabase(Database.java:207)
    at org.h2.engine.Database.<init>(Database.java:202)
    at org.h2.engine.Engine.openSession(Engine.java:56)
    at org.h2.engine.Engine.openSession(Engine.java:146)
    at org.h2.engine.Engine.getSession(Engine.java:125)
    at org.h2.engine.Session.createSession(Session.java:119)
    at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:241)
    at org.h2.engine.SessionRemote.createSession(SessionRemote.java:219)
    at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:111)
    at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:95)
    at org.h2.Driver.connect(Driver.java:58)
    at java.sql.DriverManager.getConnection(DriverManager.java:620)
    at java.sql.DriverManager.getConnection(DriverManager.java:222)
    at net.liftweb.mapper.StandardDBVendor.createOne(DB.scala:1022)
    at net.liftweb.mapper.ProtoDBVendor$class.newConnection(DB.scala:1077)
    at net.liftweb.mapper.StandardDBVendor.newConnection(DB.scala:1011)
    at net.liftweb.mapper.DB$$anonfun$6$$anonfun$apply$3.apply(DB.scala:134)
    at net.liftweb.mapper.DB$$anonfun$6$$anonfun$apply$3.apply(DB.scala:134)
    at net.liftweb.common.EmptyBox.or(Box.scala:467)
    at net.liftweb.mapper.DB$$anonfun$6.apply(DB.scala:134)
    at net.liftweb.mapper.DB$$anonfun$6.apply(DB.scala:134)
    at net.liftweb.common.Full.flatMap(Box.scala:400)
    at net.liftweb.mapper.DB$.newConnection(DB.scala:134)
    at net.liftweb.mapper.DB$.getConnection(DB.scala:230)
    at net.liftweb.mapper.DB$.use(DB.scala:581)
    at net.liftweb.mapper.Schemifier$.schemify(Schemifier.scala:68)
    at net.liftweb.mapper.Schemifier$.schemify(Schemifier.scala:51)
    at bootstrap.liftweb.Boot.boot(Boot.scala:35)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    at net.liftweb.util.ClassHelpers$$anonfun$createInvoker$1.apply(ClassHelpers.scala:361)
    at net.liftweb.util.ClassHelpers$$anonfun$createInvoker$1.apply(ClassHelpers.scala:359)
    at net.liftweb.http.DefaultBootstrap$$anonfun$boot$1.apply(LiftRules.scala:1496)
    at net.liftweb.http.DefaultBootstrap$$anonfun$boot$1.apply(LiftRules.scala:1496)
    at net.liftweb.common.Full.map(Box.scala:398)
    at net.liftweb.http.DefaultBootstrap$.boot(LiftRules.scala:1496)
    at net.liftweb.http.provider.HTTPProvider$class.bootLift(HTTPProvider.scala:75)
    at net.liftweb.http.LiftFilter.bootLift(LiftServlet.scala:586)
    at net.liftweb.http.provider.servlet.ServletFilterProvider$class.init(ServletFilterProvider.scala:40)
    at net.liftweb.http.LiftFilter.init(LiftServlet.scala:586)
    at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97)
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
    at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:662)
    at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
    at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
    at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
    at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)
    at org.mortbay.jetty.plugin.Jetty6PluginWebAppContext.doStart(Jetty6PluginWebAppContext.java:115)
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
    at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
    at org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:156)
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
    at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
    at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
    at org.mortbay.jetty.Server.doStart(Server.java:224)
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
    at org.mortbay.jetty.plugin.Jetty6PluginServer.start(Jetty6PluginServer.java:132)
    at org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty(AbstractJettyMojo.java:441)
    at org.mortbay.jetty.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.java:383)
    at org.mortbay.jetty.plugin.AbstractJettyRunMojo.execute(AbstractJettyRunMojo.java:210)
    at org.mortbay.jetty.plugin.Jetty6RunMojo.execute(Jetty6RunMojo.java:184)
    at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
    at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
    at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
    at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
    at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
ERROR - Failed to Boot! Your application may not run properly
java.lang.NullPointerException: Looking for Connection Identifier ConnectionIdentifier(lift) but failed to find either a JNDI data source with the name lift or a lift connection manager with the correct name
    at net.liftweb.mapper.DB$$anonfun$7$$anonfun$apply$10.apply(DB.scala:141)
    at net.liftweb.mapper.DB$$anonfun$7$$anonfun$apply$10.apply(DB.scala:141)
    at net.liftweb.common.EmptyBox.openOr(Box.scala:465)
    at net.liftweb.mapper.DB$$anonfun$7.apply(DB.scala:140)
    at net.liftweb.mapper.DB$$anonfun$7.apply(DB.scala:140)
    at net.liftweb.common.EmptyBox.openOr(Box.scala:465)
    at net.liftweb.mapper.DB$.newConnection(DB.scala:134)
    at net.liftweb.mapper.DB$.getConnection(DB.scala:230)
    at net.liftweb.mapper.DB$.use(DB.scala:581)
    at net.liftweb.mapper.Schemifier$.schemify(Schemifier.scala:68)
    at net.liftweb.mapper.Schemifier$.schemify(Schemifier.scala:51)
    at bootstrap.liftweb.Boot.boot(Boot.scala:35)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    at net.liftweb.util.ClassHelpers$$anonfun$createInvoker$1.apply(ClassHelpers.scala:361)
    at net.liftweb.util.ClassHelpers$$anonfun$createInvoker$1.apply(ClassHelpers.scala:359)
    at net.liftweb.http.DefaultBootstrap$$anonfun$boot$1.apply(LiftRules.scala:1496)
    at net.liftweb.http.DefaultBootstrap$$anonfun$boot$1.apply(LiftRules.scala:1496)
    at net.liftweb.common.Full.map(Box.scala:398)
    at net.liftweb.http.DefaultBootstrap$.boot(LiftRules.scala:1496)
    at net.liftweb.http.provider.HTTPProvider$class.bootLift(HTTPProvider.scala:75)
    at net.liftweb.http.LiftFilter.bootLift(LiftServlet.scala:586)
    at net.liftweb.http.provider.servlet.ServletFilterProvider$class.init(ServletFilterProvider.scala:40)
    at net.liftweb.http.LiftFilter.init(LiftServlet.scala:586)
    at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97)
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
    at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:662)
    at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
    at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
    at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
    at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)
    at org.mortbay.jetty.plugin.Jetty6PluginWebAppContext.doStart(Jetty6PluginWebAppContext.java:115)
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
    at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
    at org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:156)
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
    at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
    at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
    at org.mortbay.jetty.Server.doStart(Server.java:224)
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
    at org.mortbay.jetty.plugin.Jetty6PluginServer.start(Jetty6PluginServer.java:132)
    at org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty(AbstractJettyMojo.java:441)
    at org.mortbay.jetty.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.java:383)
    at org.mortbay.jetty.plugin.AbstractJettyRunMojo.execute(AbstractJettyRunMojo.java:210)
    at org.mortbay.jetty.plugin.Jetty6RunMojo.execute(Jetty6RunMojo.java:184)
    at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
    at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
    at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
    at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
    at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
2010-10-31 22:50:14.203:INFO::Started SelectChannelConnector <at> 0.0.0.0:8080
[INFO] Started Jetty Server



On Sun, Oct 31, 2010 at 1:10 PM, Indrajit Raychaudhuri <indrajitr-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
Hi Jens,

You should not have to do anything else besides what you already did.

Assuming you didn't make any modification in Boot.scala (and haven't provided 'db.url' explicitly) H2 starts in 'automatic mixed mode'[1].

In your case, looks like the same DB is used by some other app as well (as the application attempts server mode instead of usual embedded mode).

- Indrajit

[1] http://www.h2database.com/html/features.html#auto_mixed_mode



Jens Alsted wrote:
Hi

In have been following the todo example on assembla and have run into
a small problem. I run maven with:

mvn archetype:generate \
  -DarchetypeGroupId=net.liftweb \
  -DarchetypeArtifactId=lift-archetype-basic_2.7.7 \
  -DarchetypeVersion=2.1-SNAPSHOT \
  -DarchetypeRepository=http://scala-tools.org/repo-snapshots \
  -DremoteRepositories=http://scala-tools.org/repo-snapshots \
  -DgroupId=com.liftworkshop \
  -DartifactId=todo

When starting jetty I get the following message:

2010-10-31 09:52:29.317:INFO::No Transaction manager found - if your
webapp requires one, please configure one.
org.h2.jdbc.JdbcSQLException: Exception opening port "H2 TCP Server
(tcp://192.168.1.12:56771)" (port may be in use), cause:
"timeout" [90061-138]
... long stack trace left out ...


It is quite clear that I'm not running H2 as a service on my box as i
have not installed it or started it. I am under the impression that H2
is bundled with all the other scala/java stuff maven i run and started
as a in memory database.

Am i under the wrong impression regarding H2 and thus I need to
install H2? Or  have I made some other mistake not covered in what I
have described here?

Can any one clarify this question for me?

Cheers
Jens


--
You received this message because you are subscribed to the Google Groups "Lift" group.
To post to this group, send email to liftweb-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To unsubscribe from this group, send email to liftweb+unsubscribe <at> 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 liftweb-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To unsubscribe from this group, send email to liftweb+unsubscribe <at> 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 liftweb-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To unsubscribe from this group, send email to liftweb+unsubscribe <at> 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 liftweb-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to liftweb+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
Tim Nelson | 1 Nov 2010 13:24
Picon
Gravatar

Re: [Lift] Multiple Document Update ( MongoDB)

Hi,

By default MongoDB only updates one row. See their Updating [1] page
on the wiki.

If you want to update multiple rows, you need to tell it to, by
passing in the Multi UpdateOption.

For your example, that would look like:

MyColl.update(("name","abc"),col, Multi)

Tim

1 - http://www.mongodb.org/display/DOCS/Updating

On Mon, Nov 1, 2010 at 1:38 AM, Bikash Patra <bikashjpatra@...> wrote:
> MongoMeta update method updates only the first occurrence of a document.
> Is there any way to update all the documents that match a specific criteria
> ?
> Suppose I have 3 documents
> MyColl extends MongoRecord[MyColl] with MongoId[MyColl] {
> object name extends StringField(this,200)
> }
> {name: abc}
> {name: def}
> {name: abc}
> def update() = {
> col = MyColl.createRecord
> col.name("xyz")
> MyColl.update(("name","abc"),col)
> }
>
> Updates only the first record, .. How to update all the occurrences
> Pls help.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Lift" group.
> To post to this group, send email to liftweb@...
> To unsubscribe from this group, send email to
> liftweb+unsubscribe@...
> 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 liftweb@...
To unsubscribe from this group, send email to liftweb+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.

GA | 1 Nov 2010 14:39

[Lift] JNDI error after upgrade to Postgresql 9 - only with Lift

Hello guys,

we upgraded our development servers to postgresql 9 and our Lift installations are now broken.

Lift started giving this error "JNDI data source with the name lift or a lift connection manager with the
correct name".

The database server is up and running and accepting TCP connections. We have build small stand alone
classes to test the JDBC and the servers and they are all ok. Only Lift is having this problem.

We are using the last JDBC Driver 4 and the props file is the same that was working with Postgresql 8.4. We have
Mac OS X machines and we have installed the JDBC driver in the java/extensions directory.

How can I debug it? I guess it is some issue with the environment, but I cannot get passed this error message.
Is it not connecting? Is it not finding the JDBC driver?

Thanks in advance,

GA

--

-- 
You received this message because you are subscribed to the Google Groups "Lift" group.
To post to this group, send email to liftweb@...
To unsubscribe from this group, send email to liftweb+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.


Gmane