Re: [Lift] Re: QueryParams and joins

2010-01-06 Thread Timothy Perrett
Remove the lift-core dependency and separately specify lift-webkit, lift-common 
and lift-util. That should resolve your issue... its probally a problem with 
the transitive dependencies in maven. 

Cheers, Tim

On 5 Jan 2010, at 22:17, Ross Mellgren wrote:

 It looks like you probably have some other dependencies somewhere or old jars 
 pointing to the old lift version.
 
 Please first try mvn clean jetty:run, and if that doesn't work, run mvn 
 dependency:tree to try and find where the other version of lift-webkit is 
 coming from. If you're still stuck, paste the output of dependency:tree 
 please!
 
 -Ross
 
 On Jan 5, 2010, at 4:06 PM, Mads Hartmann wrote:
 
 I really appreciate you taking the time to help me out.
 
 depedency now is:
   dependency
 groupIdnet.liftweb/groupId
 artifactIdlift-core/artifactId
 version1.1-M8/version
   /dependency
 
 It compiles just fine, but when i try to start the server i get the
 following error:
 
 ERROR - Failed to Boot
 java.lang.NoClassDefFoundError: net/liftweb/util/Box
  at java.lang.Class.forName0(Native Method)
  at java.lang.Class.forName(Class.java:169)
  at net.liftweb.http.DefaultBootstrap$.boot(LiftRules.scala:1260)
  at net.liftweb.http.provider.HTTPProvider$class.bootLift
 (HTTPProvider.scala:70)
  at net.liftweb.http.LiftFilter.bootLift(LiftServlet.scala:523)
  at net.liftweb.http.provider.servlet.ServletFilterProvider$class.init
 (ServletFilterProvider.scala:20)
  at net.liftweb.http.LiftFilter.init(LiftServlet.scala:523)
  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:39)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke
 (DelegatingMethodAccessorImpl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:597)
  at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:
 315)
  at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
  

[Lift] Re: QueryParams and joins

2010-01-06 Thread Mads Hartmann
How would that dependency tag look? Right now it looks like this:

dependency
  groupIdnet.liftweb/groupId
  artifactIdlift-core/artifactId
  version1.1-M8/version
/dependency

On Jan 6, 10:06 am, Timothy Perrett timo...@getintheloop.eu wrote:
 Remove the lift-core dependency and separately specify lift-webkit, 
 lift-common and lift-util. That should resolve your issue... its probally a 
 problem with the transitive dependencies in maven.

 Cheers, Tim

 On 5 Jan 2010, at 22:17, Ross Mellgren wrote:



  It looks like you probably have some other dependencies somewhere or old 
  jars pointing to the old lift version.

  Please first try mvn clean jetty:run, and if that doesn't work, run mvn 
  dependency:tree to try and find where the other version of lift-webkit is 
  coming from. If you're still stuck, paste the output of dependency:tree 
  please!

  -Ross

  On Jan 5, 2010, at 4:06 PM, Mads Hartmann wrote:

  I really appreciate you taking the time to help me out.

  depedency now is:
    dependency
      groupIdnet.liftweb/groupId
      artifactIdlift-core/artifactId
      version1.1-M8/version
    /dependency

  It compiles just fine, but when i try to start the server i get the
  following error:

  ERROR - Failed to Boot
  java.lang.NoClassDefFoundError: net/liftweb/util/Box
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:169)
         at net.liftweb.http.DefaultBootstrap$.boot(LiftRules.scala:1260)
         at net.liftweb.http.provider.HTTPProvider$class.bootLift
  (HTTPProvider.scala:70)
         at net.liftweb.http.LiftFilter.bootLift(LiftServlet.scala:523)
         at 
  net.liftweb.http.provider.servlet.ServletFilterProvider$class.init
  (ServletFilterProvider.scala:20)
         at net.liftweb.http.LiftFilter.init(LiftServlet.scala:523)
         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.executeGoalAndHandleFai
   lures
  (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 

Re: [Lift] Re: QueryParams and joins

2010-01-06 Thread Indrajit Raychaudhuri

Mads,

Since you are using mapper, having dependency on lift-mapper should 
suffice. Other dependencies would be pulled in transitively.


So having this dependency tag should do.

dependency
  groupIdnet.liftweb/groupId
  artifactIdlift-mapper/artifactId
  version1.1-M8/version
/dependency

Cheers, Indrajit

On 06/01/10 2:39 PM, Mads Hartmann wrote:

How would that dependency tag look? Right now it looks like this:

dependency
   groupIdnet.liftweb/groupId
   artifactIdlift-core/artifactId
   version1.1-M8/version
 /dependency

On Jan 6, 10:06 am, Timothy Perretttimo...@getintheloop.eu  wrote:

Remove the lift-core dependency and separately specify lift-webkit, lift-common 
and lift-util. That should resolve your issue... its probally a problem with 
the transitive dependencies in maven.

Cheers, Tim

On 5 Jan 2010, at 22:17, Ross Mellgren wrote:




It looks like you probably have some other dependencies somewhere or old jars 
pointing to the old lift version.



Please first try mvn clean jetty:run, and if that doesn't work, run mvn 
dependency:tree to try and find where the other version of lift-webkit is 
coming from. If you're still stuck, paste the output of dependency:tree please!



-Ross



On Jan 5, 2010, at 4:06 PM, Mads Hartmann wrote:



I really appreciate you taking the time to help me out.



depedency now is:
   dependency
 groupIdnet.liftweb/groupId
 artifactIdlift-core/artifactId
 version1.1-M8/version
   /dependency



It compiles just fine, but when i try to start the server i get the
following error:



ERROR - Failed to Boot
java.lang.NoClassDefFoundError: net/liftweb/util/Box
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at net.liftweb.http.DefaultBootstrap$.boot(LiftRules.scala:1260)
at net.liftweb.http.provider.HTTPProvider$class.bootLift
(HTTPProvider.scala:70)
at net.liftweb.http.LiftFilter.bootLift(LiftServlet.scala:523)
at net.liftweb.http.provider.servlet.ServletFilterProvider$class.init
(ServletFilterProvider.scala:20)
at net.liftweb.http.LiftFilter.init(LiftServlet.scala:523)
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.executeGoalAndHandleFai 
lures
(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 

[Lift] Re: QueryParams and joins

2010-01-06 Thread Mads Hartmann
Again, I really appreciate you guys helping me out :)

@Indrajit I just tried with the dependency you declared as the only
lift related dependency. I get the following error.

dependency
  groupIdnet.liftweb/groupId
  artifactIdlift-mapper/artifactId
  version1.1-M8/version
/dependency

[INFO] Nothing to compile - all classes are up to date
[INFO] [scala:compile {execution: default}]
[INFO] Checking for multiple versions of scala
[WARNING] Multiple versions of scala libraries detected!
[INFO] includes = [**/*.scala,**/*.java,]
[INFO] excludes = []
[INFO] /Users/Mads/Projects/scalableKvidr2/src/main/scala:-1: info:
compiling

[INFO] Compiling 8 source files to /Users/Mads/Projects/scalableKvidr2/
target/classes at 1262776620713
[ERROR] /Users/Mads/Projects/scalableKvidr2/src/main/scala/bootstrap/
liftweb/Boot.scala:52: error: not found: value Full
[INFO]   Full(() = LiftRules.jsArtifacts.show(ajax-loader).cmd)
[INFO]   ^
[ERROR] /Users/Mads/Projects/scalableKvidr2/src/main/scala/bootstrap/
liftweb/Boot.scala:58: error: not found: value Full
[INFO]   Full(() = LiftRules.jsArtifacts.hide(ajax-loader).cmd)
[INFO]   ^
[ERROR] /Users/Mads/Projects/scalableKvidr2/src/main/scala/bootstrap/
liftweb/Boot.scala:60: error: type mismatch;
[INFO]  found   : (javax.servlet.http.HttpServletRequest) = Unit
[INFO]  required: (net.liftweb.http.provider.HTTPRequest) = Any
[INFO] LiftRules.early.append(makeUtf8)
[INFO]^
[ERROR] /Users/Mads/Projects/scalableKvidr2/src/main/scala/bootstrap/
liftweb/Boot.scala:79: error: not found: value Full
[INFO]  Full(dm)
[INFO]  ^
[ERROR] /Users/Mads/Projects/scalableKvidr2/src/main/scala/bootstrap/
liftweb/Boot.scala:81: error: not found: value Empty
[INFO]  case e : Exception = e.printStackTrace; Empty
[INFO]   ^
[ERROR] /Users/Mads/Projects/scalableKvidr2/src/main/scala/
scalableKvidr/snippet/TagsSnippets.scala:28: error: not found: value
Full
[INFO]   case Full(param) = param
[INFO]^
[ERROR] /Users/Mads/Projects/scalableKvidr2/src/main/scala/
scalableKvidr/snippet/TagsSnippets.scala:28: error: missing arguments
for method param in object S;
[INFO] follow this method with `_' if you want to treat it as a
partially applied function
[INFO]   case Full(param) = param
[INFO]   ^
[ERROR] /Users/Mads/Projects/scalableKvidr2/src/main/scala/
scalableKvidr/snippet/TagsSnippets.scala:29: error: not found: value
Empty
[ERROR]   case Empty = error
[INFO]^
[ERROR] /Users/Mads/Projects/scalableKvidr2/src/main/scala/
scalableKvidr/snippet/TagsSnippets.scala:30: error: not found: value
Failure
[ERROR]   case Failure(msg, _, _) = error
[INFO]^
[ERROR] /Users/Mads/Projects/scalableKvidr2/src/main/scala/
scalableKvidr/snippet/TagsSnippets.scala:41: error: not found: value
Full
[INFO]   case Full(xhtml) = xhtml
[INFO]^
[ERROR] /Users/Mads/Projects/scalableKvidr2/src/main/scala/
scalableKvidr/snippet/TagsSnippets.scala:41: error: not found: value
xhtml
[INFO]   case Full(xhtml) = xhtml
[INFO]   ^
[ERROR] /Users/Mads/Projects/scalableKvidr2/src/main/scala/
scalableKvidr/snippet/TagsSnippets.scala:42: error: not found: value
Empty
[ERROR]   case Empty = strongError/strong
[INFO]^
[ERROR] /Users/Mads/Projects/scalableKvidr2/src/main/scala/
scalableKvidr/snippet/TagsSnippets.scala:43: error: not found: value
Failure
[ERROR]   case Failure(msg, _, _) = strongError/strong
[INFO]^
[ERROR] 13 errors found
[INFO]

[ERROR] BUILD ERROR
[INFO]

[INFO] wrap: org.apache.commons.exec.ExecuteException: Process exited
with an error: 1(Exit value: 1)

On Jan 6, 10:15 am, Indrajit Raychaudhuri indraj...@gmail.com wrote:
 Mads,

 Since you are using mapper, having dependency on lift-mapper should
 suffice. Other dependencies would be pulled in transitively.

 So having this dependency tag should do.

 dependency
    groupIdnet.liftweb/groupId
    artifactIdlift-mapper/artifactId
    version1.1-M8/version
 /dependency

 Cheers, Indrajit

 On 06/01/10 2:39 PM, Mads Hartmann wrote:



  How would that dependency tag look? Right now it looks like this:

  dependency
         groupIdnet.liftweb/groupId
         artifactIdlift-core/artifactId
         version1.1-M8/version
       /dependency

  On Jan 6, 10:06 am, Timothy Perretttimo...@getintheloop.eu  wrote:
  Remove the lift-core dependency and separately specify lift-webkit, 
  lift-common and lift-util. That should resolve your issue... its probally 
  a problem with the transitive dependencies in maven.

  Cheers, Tim

  On 5 Jan 2010, at 22:17, Ross Mellgren wrote:

  It looks like you probably have some other dependencies somewhere or old 
  jars pointing to the old lift version.

  

Re: [Lift] Re: QueryParams and joins

2010-01-06 Thread Indrajit Raychaudhuri

Mads,
Can you please send me the pom.xml?

Cheers, Indrajit

On 06/01/10 4:50 PM, Mads Hartmann wrote:

Again, I really appreciate you guys helping me out :)

@Indrajit I just tried with the dependency you declared as the only
lift related dependency. I get the following error.

dependency
   groupIdnet.liftweb/groupId
   artifactIdlift-mapper/artifactId
   version1.1-M8/version
/dependency

[INFO] Nothing to compile - all classes are up to date
[INFO] [scala:compile {execution: default}]
[INFO] Checking for multiple versions of scala
[WARNING] Multiple versions of scala libraries detected!
[INFO] includes = [**/*.scala,**/*.java,]
[INFO] excludes = []
[INFO] /Users/Mads/Projects/scalableKvidr2/src/main/scala:-1: info:
compiling

[INFO] Compiling 8 source files to /Users/Mads/Projects/scalableKvidr2/
target/classes at 1262776620713
[ERROR] /Users/Mads/Projects/scalableKvidr2/src/main/scala/bootstrap/
liftweb/Boot.scala:52: error: not found: value Full
[INFO]   Full(() =  LiftRules.jsArtifacts.show(ajax-loader).cmd)
[INFO]   ^
[ERROR] /Users/Mads/Projects/scalableKvidr2/src/main/scala/bootstrap/
liftweb/Boot.scala:58: error: not found: value Full
[INFO]   Full(() =  LiftRules.jsArtifacts.hide(ajax-loader).cmd)
[INFO]   ^
[ERROR] /Users/Mads/Projects/scalableKvidr2/src/main/scala/bootstrap/
liftweb/Boot.scala:60: error: type mismatch;
[INFO]  found   : (javax.servlet.http.HttpServletRequest) =  Unit
[INFO]  required: (net.liftweb.http.provider.HTTPRequest) =  Any
[INFO] LiftRules.early.append(makeUtf8)
[INFO]^
[ERROR] /Users/Mads/Projects/scalableKvidr2/src/main/scala/bootstrap/
liftweb/Boot.scala:79: error: not found: value Full
[INFO]  Full(dm)
[INFO]  ^
[ERROR] /Users/Mads/Projects/scalableKvidr2/src/main/scala/bootstrap/
liftweb/Boot.scala:81: error: not found: value Empty
[INFO]  case e : Exception =  e.printStackTrace; Empty
[INFO]   ^
[ERROR] /Users/Mads/Projects/scalableKvidr2/src/main/scala/
scalableKvidr/snippet/TagsSnippets.scala:28: error: not found: value
Full
[INFO]   case Full(param) =  param
[INFO]^
[ERROR] /Users/Mads/Projects/scalableKvidr2/src/main/scala/
scalableKvidr/snippet/TagsSnippets.scala:28: error: missing arguments
for method param in object S;
[INFO] follow this method with `_' if you want to treat it as a
partially applied function
[INFO]   case Full(param) =  param
[INFO]   ^
[ERROR] /Users/Mads/Projects/scalableKvidr2/src/main/scala/
scalableKvidr/snippet/TagsSnippets.scala:29: error: not found: value
Empty
[ERROR]   case Empty =  error
[INFO]^
[ERROR] /Users/Mads/Projects/scalableKvidr2/src/main/scala/
scalableKvidr/snippet/TagsSnippets.scala:30: error: not found: value
Failure
[ERROR]   case Failure(msg, _, _) =  error
[INFO]^
[ERROR] /Users/Mads/Projects/scalableKvidr2/src/main/scala/
scalableKvidr/snippet/TagsSnippets.scala:41: error: not found: value
Full
[INFO]   case Full(xhtml) =  xhtml
[INFO]^
[ERROR] /Users/Mads/Projects/scalableKvidr2/src/main/scala/
scalableKvidr/snippet/TagsSnippets.scala:41: error: not found: value
xhtml
[INFO]   case Full(xhtml) =  xhtml
[INFO]   ^
[ERROR] /Users/Mads/Projects/scalableKvidr2/src/main/scala/
scalableKvidr/snippet/TagsSnippets.scala:42: error: not found: value
Empty
[ERROR]   case Empty =  strongError/strong
[INFO]^
[ERROR] /Users/Mads/Projects/scalableKvidr2/src/main/scala/
scalableKvidr/snippet/TagsSnippets.scala:43: error: not found: value
Failure
[ERROR]   case Failure(msg, _, _) =  strongError/strong
[INFO]^
[ERROR] 13 errors found
[INFO]

[ERROR] BUILD ERROR
[INFO]

[INFO] wrap: org.apache.commons.exec.ExecuteException: Process exited
with an error: 1(Exit value: 1)

On Jan 6, 10:15 am, Indrajit Raychaudhuriindraj...@gmail.com  wrote:

Mads,

Since you are using mapper, having dependency on lift-mapper should
suffice. Other dependencies would be pulled in transitively.

So having this dependency tag should do.

dependency
groupIdnet.liftweb/groupId
artifactIdlift-mapper/artifactId
version1.1-M8/version
/dependency

Cheers, Indrajit

On 06/01/10 2:39 PM, Mads Hartmann wrote:




How would that dependency tag look? Right now it looks like this:



dependency
groupIdnet.liftweb/groupId
artifactIdlift-core/artifactId
version1.1-M8/version
  /dependency



On Jan 6, 10:06 am, Timothy Perretttimo...@getintheloop.euwrote:

Remove the lift-core dependency and separately specify lift-webkit, lift-common 
and lift-util. That should resolve your issue... its probally a problem with 
the transitive dependencies in maven.



Cheers, Tim



On 5 Jan 2010, at 22:17, Ross Mellgren wrote:



It looks 

[Lift] Re: QueryParams and joins

2010-01-06 Thread Mads Hartmann
Sure thing, here it is:

project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://
www.w3.org/2001/XMLSchema-instance xsi:schemaLocation=http://
maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd;
  modelVersion4.0.0/modelVersion
  groupIdscalableKvidr/groupId
  artifactIdscalableKvidr/artifactId
  version1.0-SNAPSHOT/version
  packagingwar/packaging
  namescalableKvidr/name
  inceptionYear2007/inceptionYear
  properties
scala.version2.7.3/scala.version
  /properties

  repositories
repository
  idscala-tools.org/id
  nameScala-Tools Maven2 Repository/name
  urlhttp://scala-tools.org/repo-releases/url
/repository
  /repositories

  pluginRepositories
pluginRepository
  idscala-tools.org/id
  nameScala-Tools Maven2 Repository/name
  urlhttp://scala-tools.org/repo-releases/url
/pluginRepository
  /pluginRepositories

  dependencies
dependency
  groupIdorg.scala-lang/groupId
  artifactIdscala-library/artifactId
  version${scala.version}/version
/dependency
dependency
   groupIdnet.liftweb/groupId
   artifactIdlift-mapper/artifactId
   version1.1-M8/version
/dependency
!--
dependency
  groupIdnet.liftweb/groupId
  artifactIdlift-core/artifactId
  version1.1-M8/version
/dependency--
dependency
  groupIdorg.apache.derby/groupId
  artifactIdderby/artifactId
  version10.4.2.0/version
/dependency
dependency
  groupIdmysql/groupId
  artifactIdmysql-connector-java/artifactId
  version5.0.8/version
/dependency
dependency
  groupIdjavax.servlet/groupId
  artifactIdservlet-api/artifactId
  version2.5/version
  scopeprovided/scope
/dependency
dependency
  groupIdjunit/groupId
  artifactIdjunit/artifactId
  version4.5/version
  scopetest/scope
/dependency
dependency
  groupIdorg.mortbay.jetty/groupId
  artifactIdjetty/artifactId
  version[6.1.6,)/version
  scopetest/scope
/dependency
!-- for LiftConsole --
dependency
  groupIdorg.scala-lang/groupId
  artifactIdscala-compiler/artifactId
  version${scala.version}/version
  scopetest/scope
/dependency
  /dependencies

  build
sourceDirectorysrc/main/scala/sourceDirectory
testSourceDirectorysrc/test/scala/testSourceDirectory
plugins
  plugin
groupIdorg.scala-tools/groupId
artifactIdmaven-scala-plugin/artifactId
executions
  execution
goals
  goalcompile/goal
  goaltestCompile/goal
/goals
  /execution
/executions
configuration
  scalaVersion${scala.version}/scalaVersion
/configuration
  /plugin
  plugin
groupIdorg.mortbay.jetty/groupId
artifactIdmaven-jetty-plugin/artifactId
configuration
  contextPath//contextPath
  scanIntervalSeconds5/scanIntervalSeconds
  stopPort8080/stopPort
  stopKey8080/stopKey
/configuration
  /plugin
  plugin
groupIdnet.sf.alchim/groupId
artifactIdyuicompressor-maven-plugin/artifactId
executions
  execution
goals
  goalcompress/goal
/goals
  /execution
/executions
configuration
  nosuffixtrue/nosuffix
/configuration
  /plugin
  plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-eclipse-plugin/artifactId
configuration
  downloadSourcestrue/downloadSources
  excludes
excludeorg.scala-lang:scala-library/exclude
  /excludes
  classpathContainers
 
classpathContainerch.epfl.lamp.sdt.launching.SCALA_CONTAINER/
classpathContainer
  /classpathContainers
  projectnatures
java.lang.Stringch.epfl.lamp.sdt.core.scalanature/
java.lang.String
java.lang.Stringorg.eclipse.jdt.core.javanature/
java.lang.String
  /projectnatures
  buildcommands
java.lang.Stringch.epfl.lamp.sdt.core.scalabuilder/
java.lang.String
  /buildcommands
/configuration
  /plugin
/plugins
  /build
  reporting
plugins
  plugin
groupIdorg.scala-tools/groupId
artifactIdmaven-scala-plugin/artifactId
configuration
  scalaVersion${scala.version}/scalaVersion
/configuration
  /plugin
/plugins
  /reporting
/project


On Jan 6, 12:31 pm, Indrajit Raychaudhuri indraj...@gmail.com wrote:
 Mads,
 Can you please send me the pom.xml?

 Cheers, Indrajit

 On 06/01/10 4:50 PM, Mads Hartmann wrote:



  Again, I really appreciate you guys helping me out :)

  @Indrajit I just tried with the dependency you declared as the only
  lift related dependency. I get the following error.

  dependency
     groupIdnet.liftweb/groupId
     artifactIdlift-mapper/artifactId
     

Re: [Lift] Re: QueryParams and joins

2010-01-06 Thread Jeppe Nejsum Madsen
Mads Hartmann mads...@gmail.com writes:

 Again, I really appreciate you guys helping me out :)

 @Indrajit I just tried with the dependency you declared as the only
 lift related dependency. I get the following error.

 dependency
   groupIdnet.liftweb/groupId
   artifactIdlift-mapper/artifactId
   version1.1-M8/version
 /dependency

Note, Lift 1.1 is not source compatible with 1.0. You need to change
your code (in a few places) Specifically, it seems you need to add

import net.liftweb.common._

to Boot.scala

/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.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.




[Lift] Re: QueryParams and joins

2010-01-06 Thread Mads Hartmann
Aha! It almost compiles now. There's just one last error:

[INFO] Compiling 8 source files to /Users/Mads/Projects/scalableKvidr2/
target/classes at 1262780161026
[ERROR] /Users/Mads/Projects/scalableKvidr2/src/main/scala/bootstrap/
liftweb/Boot.scala:61: error: type mismatch;
[INFO]  found   : (javax.servlet.http.HttpServletRequest) = Unit
[INFO]  required: (net.liftweb.http.provider.HTTPRequest) = Any
[INFO] LiftRules.early.append(makeUtf8)
[INFO]^
[ERROR] one error found

On Jan 6, 12:59 pm, Jeppe Nejsum Madsen je...@ingolfs.dk wrote:
 Mads Hartmann mads...@gmail.com writes:
  Again, I really appreciate you guys helping me out :)

  @Indrajit I just tried with the dependency you declared as the only
  lift related dependency. I get the following error.

  dependency
    groupIdnet.liftweb/groupId
    artifactIdlift-mapper/artifactId
    version1.1-M8/version
  /dependency

 Note, Lift 1.1 is not source compatible with 1.0. You need to change
 your code (in a few places) Specifically, it seems you need to add

 import net.liftweb.common._

 to Boot.scala

 /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.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.




Re: [Lift] Re: QueryParams and joins

2010-01-06 Thread Indrajit Raychaudhuri

Ok, few points:

1. Full, Box etc. have a different package location now. Ensure import 
net.liftweb.common._ wherever you have Full, Box etc.


2. scala.version should be 2.7.7
scala.version2.7.7/scala.version

3. scala-library dependency is redundant. You can remove that.

4. This shouldn't affect your compilation either. jetty version range 
should be [6.1.6,7.0)

version[6.1.6,7.0)/version

Cheers, Indrajit

On 06/01/10 5:20 PM, Mads Hartmann wrote:

Sure thing, here it is:

project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://
www.w3.org/2001/XMLSchema-instance xsi:schemaLocation=http://
maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd;
   modelVersion4.0.0/modelVersion
   groupIdscalableKvidr/groupId
   artifactIdscalableKvidr/artifactId
   version1.0-SNAPSHOT/version
   packagingwar/packaging
   namescalableKvidr/name
   inceptionYear2007/inceptionYear
   properties
 scala.version2.7.3/scala.version
   /properties

   repositories
 repository
   idscala-tools.org/id
   nameScala-Tools Maven2 Repository/name
   urlhttp://scala-tools.org/repo-releases/url
 /repository
   /repositories

   pluginRepositories
 pluginRepository
   idscala-tools.org/id
   nameScala-Tools Maven2 Repository/name
   urlhttp://scala-tools.org/repo-releases/url
 /pluginRepository
   /pluginRepositories

   dependencies
 dependency
   groupIdorg.scala-lang/groupId
   artifactIdscala-library/artifactId
   version${scala.version}/version
 /dependency
 dependency
groupIdnet.liftweb/groupId
artifactIdlift-mapper/artifactId
version1.1-M8/version
 /dependency
 !--
 dependency
   groupIdnet.liftweb/groupId
   artifactIdlift-core/artifactId
   version1.1-M8/version
 /dependency--
 dependency
   groupIdorg.apache.derby/groupId
   artifactIdderby/artifactId
   version10.4.2.0/version
 /dependency
 dependency
groupIdmysql/groupId
artifactIdmysql-connector-java/artifactId
version5.0.8/version
/dependency
 dependency
   groupIdjavax.servlet/groupId
   artifactIdservlet-api/artifactId
   version2.5/version
   scopeprovided/scope
 /dependency
 dependency
   groupIdjunit/groupId
   artifactIdjunit/artifactId
   version4.5/version
   scopetest/scope
 /dependency
 dependency
   groupIdorg.mortbay.jetty/groupId
   artifactIdjetty/artifactId
   version[6.1.6,)/version
   scopetest/scope
 /dependency
 !-- for LiftConsole --
 dependency
   groupIdorg.scala-lang/groupId
   artifactIdscala-compiler/artifactId
   version${scala.version}/version
   scopetest/scope
 /dependency
   /dependencies

   build
 sourceDirectorysrc/main/scala/sourceDirectory
 testSourceDirectorysrc/test/scala/testSourceDirectory
 plugins
   plugin
 groupIdorg.scala-tools/groupId
 artifactIdmaven-scala-plugin/artifactId
 executions
   execution
 goals
   goalcompile/goal
   goaltestCompile/goal
 /goals
   /execution
 /executions
 configuration
   scalaVersion${scala.version}/scalaVersion
 /configuration
   /plugin
   plugin
 groupIdorg.mortbay.jetty/groupId
 artifactIdmaven-jetty-plugin/artifactId
 configuration
   contextPath//contextPath
   scanIntervalSeconds5/scanIntervalSeconds
   stopPort8080/stopPort
   stopKey8080/stopKey
 /configuration
   /plugin
   plugin
 groupIdnet.sf.alchim/groupId
 artifactIdyuicompressor-maven-plugin/artifactId
 executions
   execution
 goals
   goalcompress/goal
 /goals
   /execution
 /executions
 configuration
   nosuffixtrue/nosuffix
 /configuration
   /plugin
   plugin
 groupIdorg.apache.maven.plugins/groupId
 artifactIdmaven-eclipse-plugin/artifactId
 configuration
   downloadSourcestrue/downloadSources
   excludes
 excludeorg.scala-lang:scala-library/exclude
   /excludes
   classpathContainers

classpathContainerch.epfl.lamp.sdt.launching.SCALA_CONTAINER/
classpathContainer
   /classpathContainers
   projectnatures
 java.lang.Stringch.epfl.lamp.sdt.core.scalanature/
java.lang.String
 java.lang.Stringorg.eclipse.jdt.core.javanature/
java.lang.String
   /projectnatures
   buildcommands
 java.lang.Stringch.epfl.lamp.sdt.core.scalabuilder/
java.lang.String
   /buildcommands
 /configuration
   /plugin
 /plugins
   /build
   reporting
 plugins
   plugin
 groupIdorg.scala-tools/groupId
 artifactIdmaven-scala-plugin/artifactId
 

[Lift] Re: QueryParams and joins

2010-01-06 Thread Mads Hartmann
And the boot file looks like this:

package bootstrap.liftweb

import _root_.net.liftweb.util._
import _root_.net.liftweb.http._
import _root_.net.liftweb.sitemap._
import _root_.net.liftweb.sitemap.Loc._
import Helpers._
import _root_.net.liftweb.mapper.{DB, ConnectionManager, Schemifier,
DefaultConnectionIdentifier, ConnectionIdentifier}
import _root_.java.sql.{Connection, DriverManager}
import _root_.scalableKvidr.model._
import _root_.javax.servlet.http.{HttpServletRequest}
import net.liftweb.common._

/**
  * A class that's instantiated early and run.  It allows the
application
  * to modify lift's environment
  */
class Boot {
  def boot {
if (!DB.jndiJdbcConnAvailable_?)
  DB.defineConnectionManager(DefaultConnectionIdentifier,
DBVendor)

// where to search snippet
LiftRules.addToPackages(scalableKvidr)
Schemifier.schemify(true, Log.infoF _, User, Tag, Tweet, TagUser)

// Build SiteMap
 val entries = Menu(Loc(forside, List(index), Forside)) ::

Menu(Loc(Alle_Kategorier, List(allcategories), Alle
Kategorier)) ::

Menu(Loc(Brugere, List(bruger), Brugere)) ::

Menu(Loc(Tilmeld, List(tilmeld), Tilmeld)) ::

Menu(Loc(Hvad Er Kvidr?, List(hvad_er_kvidr), Hvad Er
Kvidr?)) ::

Menu(Loc(kategori, List(category), Kategori,
Hidden)) ::
Nil
LiftRules.setSiteMap(SiteMap(entries:_*))

// Rewrite rules, rules! ;)
LiftRules.rewrite.append {

  case RewriteRequest(
   ParsePath(List(kategori,tag),_,_,_),_,_) =
   RewriteResponse(category :: Nil, Map(tag - tag))
  /*case RewriteRequest(
   ParsePath(List(kategori,alle),_,_,_),_,_) =
   RewriteResponse(allcategories :: Nil)*/

}

/*
 * Show the spinny image when an Ajax call starts
 */
LiftRules.ajaxStart =
  Full(() = LiftRules.jsArtifacts.show(ajax-loader).cmd)

/*
 * Make the spinny image go away when it ends
 */
LiftRules.ajaxEnd =
  Full(() = LiftRules.jsArtifacts.hide(ajax-loader).cmd)

LiftRules.early.append(makeUtf8)

S.addAround(DB.buildLoanWrapper)
  }

  /**
   * Force the request to be UTF-8
   */

  private def makeUtf8(req: HttpServletRequest) {
req.setCharacterEncoding(UTF-8)
  }

}
object DBVendor extends ConnectionManager {
 def newConnection(name : ConnectionIdentifier) = {
   try {
 Class.forName(com.mysql.jdbc.Driver)
 val dm = DriverManager.getConnection(jdbc:mysql://localhost:8889/
databaseinformationhere)
 Full(dm)
   } catch {
 case e : Exception = e.printStackTrace; Empty
   }
 }
 def releaseConnection(conn: Connection) {conn.close}
}





On Jan 6, 1:17 pm, Mads Hartmann mads...@gmail.com wrote:
 Aha! It almost compiles now. There's just one last error:

 [INFO] Compiling 8 source files to /Users/Mads/Projects/scalableKvidr2/
 target/classes at 1262780161026
 [ERROR] /Users/Mads/Projects/scalableKvidr2/src/main/scala/bootstrap/
 liftweb/Boot.scala:61: error: type mismatch;
 [INFO]  found   : (javax.servlet.http.HttpServletRequest) = Unit
 [INFO]  required: (net.liftweb.http.provider.HTTPRequest) = Any
 [INFO]     LiftRules.early.append(makeUtf8)
 [INFO]                            ^
 [ERROR] one error found

 On Jan 6, 12:59 pm, Jeppe Nejsum Madsen je...@ingolfs.dk wrote:



  Mads Hartmann mads...@gmail.com writes:
   Again, I really appreciate you guys helping me out :)

   @Indrajit I just tried with the dependency you declared as the only
   lift related dependency. I get the following error.

   dependency
     groupIdnet.liftweb/groupId
     artifactIdlift-mapper/artifactId
     version1.1-M8/version
   /dependency

  Note, Lift 1.1 is not source compatible with 1.0. You need to change
  your code (in a few places) Specifically, it seems you need to add

  import net.liftweb.common._

  to Boot.scala

  /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.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.




[Lift] Re: QueryParams and joins

2010-01-06 Thread Mads Hartmann
@Indrajit Raychaudhuri, I've applied your changes

On Jan 6, 1:22 pm, Mads Hartmann mads...@gmail.com wrote:
 And the boot file looks like this:

 package bootstrap.liftweb

 import _root_.net.liftweb.util._
 import _root_.net.liftweb.http._
 import _root_.net.liftweb.sitemap._
 import _root_.net.liftweb.sitemap.Loc._
 import Helpers._
 import _root_.net.liftweb.mapper.{DB, ConnectionManager, Schemifier,
 DefaultConnectionIdentifier, ConnectionIdentifier}
 import _root_.java.sql.{Connection, DriverManager}
 import _root_.scalableKvidr.model._
 import _root_.javax.servlet.http.{HttpServletRequest}
 import net.liftweb.common._

 /**
   * A class that's instantiated early and run.  It allows the
 application
   * to modify lift's environment
   */
 class Boot {
   def boot {
     if (!DB.jndiJdbcConnAvailable_?)
       DB.defineConnectionManager(DefaultConnectionIdentifier,
 DBVendor)

     // where to search snippet
     LiftRules.addToPackages(scalableKvidr)
     Schemifier.schemify(true, Log.infoF _, User, Tag, Tweet, TagUser)

     // Build SiteMap
      val entries = Menu(Loc(forside, List(index), Forside)) ::
                                                                         
 Menu(Loc(Alle_Kategorier, List(allcategories), Alle
 Kategorier)) ::
                                                                         
 Menu(Loc(Brugere, List(bruger), Brugere)) ::
                                                                         
 Menu(Loc(Tilmeld, List(tilmeld), Tilmeld)) ::
                                                                         
 Menu(Loc(Hvad Er Kvidr?, List(hvad_er_kvidr), Hvad Er
 Kvidr?)) ::
                                                                         
 Menu(Loc(kategori, List(category), Kategori,
 Hidden)) ::
                                                                         Nil
     LiftRules.setSiteMap(SiteMap(entries:_*))

     // Rewrite rules, rules! ;)
     LiftRules.rewrite.append {

       case RewriteRequest(
            ParsePath(List(kategori,tag),_,_,_),_,_) =
            RewriteResponse(category :: Nil, Map(tag - tag))
       /*case RewriteRequest(
            ParsePath(List(kategori,alle),_,_,_),_,_) =
            RewriteResponse(allcategories :: Nil)*/

     }

     /*
      * Show the spinny image when an Ajax call starts
      */
     LiftRules.ajaxStart =
       Full(() = LiftRules.jsArtifacts.show(ajax-loader).cmd)

     /*
      * Make the spinny image go away when it ends
      */
     LiftRules.ajaxEnd =
       Full(() = LiftRules.jsArtifacts.hide(ajax-loader).cmd)

     LiftRules.early.append(makeUtf8)

     S.addAround(DB.buildLoanWrapper)
   }

   /**
    * Force the request to be UTF-8
    */

   private def makeUtf8(req: HttpServletRequest) {
     req.setCharacterEncoding(UTF-8)
   }

 }

 object DBVendor extends ConnectionManager {
  def newConnection(name : ConnectionIdentifier) = {
    try {
      Class.forName(com.mysql.jdbc.Driver)
      val dm = DriverManager.getConnection(jdbc:mysql://localhost:8889/
 databaseinformationhere)
      Full(dm)
    } catch {
      case e : Exception = e.printStackTrace; Empty
    }
  }
  def releaseConnection(conn: Connection) {conn.close}

 }

 On Jan 6, 1:17 pm, Mads Hartmann mads...@gmail.com wrote:



  Aha! It almost compiles now. There's just one last error:

  [INFO] Compiling 8 source files to /Users/Mads/Projects/scalableKvidr2/
  target/classes at 1262780161026
  [ERROR] /Users/Mads/Projects/scalableKvidr2/src/main/scala/bootstrap/
  liftweb/Boot.scala:61: error: type mismatch;
  [INFO]  found   : (javax.servlet.http.HttpServletRequest) = Unit
  [INFO]  required: (net.liftweb.http.provider.HTTPRequest) = Any
  [INFO]     LiftRules.early.append(makeUtf8)
  [INFO]                            ^
  [ERROR] one error found

  On Jan 6, 12:59 pm, Jeppe Nejsum Madsen je...@ingolfs.dk wrote:

   Mads Hartmann mads...@gmail.com writes:
Again, I really appreciate you guys helping me out :)

@Indrajit I just tried with the dependency you declared as the only
lift related dependency. I get the following error.

dependency
  groupIdnet.liftweb/groupId
  artifactIdlift-mapper/artifactId
  version1.1-M8/version
/dependency

   Note, Lift 1.1 is not source compatible with 1.0. You need to change
   your code (in a few places) Specifically, it seems you need to add

   import net.liftweb.common._

   to Boot.scala

   /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.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.




[Lift] Re: QueryParams and joins

2010-01-06 Thread Mads Hartmann
It compiles and works now! :)

Thanks a lot for your help everyone

On Jan 6, 1:29 pm, Mads Hartmann mads...@gmail.com wrote:
 @Indrajit Raychaudhuri, I've applied your changes

 On Jan 6, 1:22 pm, Mads Hartmann mads...@gmail.com wrote:



  And the boot file looks like this:

  package bootstrap.liftweb

  import _root_.net.liftweb.util._
  import _root_.net.liftweb.http._
  import _root_.net.liftweb.sitemap._
  import _root_.net.liftweb.sitemap.Loc._
  import Helpers._
  import _root_.net.liftweb.mapper.{DB, ConnectionManager, Schemifier,
  DefaultConnectionIdentifier, ConnectionIdentifier}
  import _root_.java.sql.{Connection, DriverManager}
  import _root_.scalableKvidr.model._
  import _root_.javax.servlet.http.{HttpServletRequest}
  import net.liftweb.common._

  /**
    * A class that's instantiated early and run.  It allows the
  application
    * to modify lift's environment
    */
  class Boot {
    def boot {
      if (!DB.jndiJdbcConnAvailable_?)
        DB.defineConnectionManager(DefaultConnectionIdentifier,
  DBVendor)

      // where to search snippet
      LiftRules.addToPackages(scalableKvidr)
      Schemifier.schemify(true, Log.infoF _, User, Tag, Tweet, TagUser)

      // Build SiteMap
       val entries = Menu(Loc(forside, List(index), Forside)) ::
                                                                          
  Menu(Loc(Alle_Kategorier, List(allcategories), Alle
  Kategorier)) ::
                                                                          
  Menu(Loc(Brugere, List(bruger), Brugere)) ::
                                                                          
  Menu(Loc(Tilmeld, List(tilmeld), Tilmeld)) ::
                                                                          
  Menu(Loc(Hvad Er Kvidr?, List(hvad_er_kvidr), Hvad Er
  Kvidr?)) ::
                                                                          
  Menu(Loc(kategori, List(category), Kategori,
  Hidden)) ::
                                                                          Nil
      LiftRules.setSiteMap(SiteMap(entries:_*))

      // Rewrite rules, rules! ;)
      LiftRules.rewrite.append {

        case RewriteRequest(
             ParsePath(List(kategori,tag),_,_,_),_,_) =
             RewriteResponse(category :: Nil, Map(tag - tag))
        /*case RewriteRequest(
             ParsePath(List(kategori,alle),_,_,_),_,_) =
             RewriteResponse(allcategories :: Nil)*/

      }

      /*
       * Show the spinny image when an Ajax call starts
       */
      LiftRules.ajaxStart =
        Full(() = LiftRules.jsArtifacts.show(ajax-loader).cmd)

      /*
       * Make the spinny image go away when it ends
       */
      LiftRules.ajaxEnd =
        Full(() = LiftRules.jsArtifacts.hide(ajax-loader).cmd)

      LiftRules.early.append(makeUtf8)

      S.addAround(DB.buildLoanWrapper)
    }

    /**
     * Force the request to be UTF-8
     */

    private def makeUtf8(req: HttpServletRequest) {
      req.setCharacterEncoding(UTF-8)
    }

  }

  object DBVendor extends ConnectionManager {
   def newConnection(name : ConnectionIdentifier) = {
     try {
       Class.forName(com.mysql.jdbc.Driver)
       val dm = DriverManager.getConnection(jdbc:mysql://localhost:8889/
  databaseinformationhere)
       Full(dm)
     } catch {
       case e : Exception = e.printStackTrace; Empty
     }
   }
   def releaseConnection(conn: Connection) {conn.close}

  }

  On Jan 6, 1:17 pm, Mads Hartmann mads...@gmail.com wrote:

   Aha! It almost compiles now. There's just one last error:

   [INFO] Compiling 8 source files to /Users/Mads/Projects/scalableKvidr2/
   target/classes at 1262780161026
   [ERROR] /Users/Mads/Projects/scalableKvidr2/src/main/scala/bootstrap/
   liftweb/Boot.scala:61: error: type mismatch;
   [INFO]  found   : (javax.servlet.http.HttpServletRequest) = Unit
   [INFO]  required: (net.liftweb.http.provider.HTTPRequest) = Any
   [INFO]     LiftRules.early.append(makeUtf8)
   [INFO]                            ^
   [ERROR] one error found

   On Jan 6, 12:59 pm, Jeppe Nejsum Madsen je...@ingolfs.dk wrote:

Mads Hartmann mads...@gmail.com writes:
 Again, I really appreciate you guys helping me out :)

 @Indrajit I just tried with the dependency you declared as the only
 lift related dependency. I get the following error.

 dependency
   groupIdnet.liftweb/groupId
   artifactIdlift-mapper/artifactId
   version1.1-M8/version
 /dependency

Note, Lift 1.1 is not source compatible with 1.0. You need to change
your code (in a few places) Specifically, it seems you need to add

import net.liftweb.common._

to Boot.scala

/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.com.
For more options, visit this group at 

Re: [Lift] Re: QueryParams and joins

2010-01-05 Thread David Pollak
Lift uses the SQL IN statement rather than joins.  This has a negative
impact for users of MySQL and Derby.

Try:

TagUser.findAll(By(TagUser.tag, this), In(TagUser.user, User.id,
OrderBy(User.followers_count, Descending), MaxRows[User](10)))



On Mon, Jan 4, 2010 at 11:10 PM, Mads Hartmann mads...@gmail.com wrote:

 My ultimate goal would be to only pull out the top x users. I'm
 currently using the following code to achieve this:

 TagUser.findAll(By(TagUser.tag, this.id)).map(_.user.obj.open_!)
.sort(_.followers_count.is  _.followers_count.is)
   .take(x)

 But im concerned that this creates an instance for each of the users
 in tag tag even though i only need the top x.

 Thanks for helping me out :)

 On Jan 5, 1:47 am, David Pollak feeder.of.the.be...@gmail.com wrote:
  On Mon, Jan 4, 2010 at 3:24 PM, Mads Hartmann mads...@gmail.com wrote:
   Hello, I'm having a problem and I'm sure it's an easy fix for someone
   with a bit more experience
 
   I have 3 model classes: tag, user, tweet and a join class TagUser. A
   tag has a list of users.
 
   If i want all of the users in a tag i use the following code (which
   works):
 
   def users = TagUser.findAll(By(TagUser.tag, this.id)).map
   (_.user.obj.open_!)
 
   my problem is that i can't figure out how to apply queryparams so i
   don't pull out all of the users from the DB if i don't need em. I was
   thinking something like this (doesn't compile):
 
   def getTopUsers(in: Int) :List[User] = {
  TagUser.findAll(By(TagUser.tag, this.id),
 OrderBy(User.followers_count, Descending),
 MaxRows(in))
 
  There is an issue:
 
  OrderBy(User., Descending) // illegal... you can only order by a
  TagUser.xxx field
 
  And a potential issue:
 
  MaxRows[TagUser](in) // sometimes the Type Inferencer doesn't get it
 right.
 
  What's your ultimate goal?
 
 
 
 
 
   }
 
   I get the following error:
   [ERROR] ... error: overloaded method value findAll with alternatives
   (net.liftweb.mapper.QueryParam[scalableKvidr.model.TagUser]*)List
   [scalableKvidr.model.TagUser] and ()List
   [scalableKvidr.model.TagUser] cannot be applied to
   (net.liftweb.mapper.Cmp
   [scalableKvidr.model.TagUser,Long],net.liftweb.mapper.OrderBy
   [scalableKvidr.model.User,Int],net.liftweb.mapper.MaxRows[Nothing])
 
   --
 
   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.
 
  --
  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 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.com.

For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.



[Lift] Re: QueryParams and joins

2010-01-05 Thread Mads Hartmann
Sure thing, it's quite long though :)

Just one thing, i added the following for it to compile (I want to
return List[User] not List[TagUser] : .map(_.user.obj.open_!)

So in all it looks like this

def getTopUsers(in: Int) :List[User] = {

   TagUser.findAll(By(TagUser.tag, this.id), In(TagUser.user, User.id,
OrderBy(User.followers_count, Descending), MaxRows[User](in)))
  .map(_.user.obj.open_!)

}

Exception occured while processing /
Message: java.lang.NullPointerException
net.liftweb.mapper.In$$anon$3.init(MetaMapper.scala:1206)
net.liftweb.mapper.In$.apply(MetaMapper.scala:1200)
scalableKvidr.model.Tag.getTopUsers(Tag.scala:38)
scalableKvidr.snippet.TagsSnippets$$anonfun$frontpageTags$1.apply
(TagsSnippets.scala:71)
scalableKvidr.snippet.TagsSnippets$$anonfun$frontpageTags$1.apply
(TagsSnippets.scala:68)
scala.List.flatMap(List.scala:1125)
scalableKvidr.snippet.TagsSnippets.frontpageTags(TagsSnippets.scala:
67)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
net.liftweb.util.ClassHelpers$$anonfun$net$liftweb$util$ClassHelpers$
$_invokeMethod$2$$anonfun$apply$7.apply(ClassHelpers.scala:352)
net.liftweb.util.ControlHelpers$class.tryo(ControlHelpers.scala:40)
net.liftweb.util.Helpers$.tryo(Helpers.scala:29)
net.liftweb.util.ControlHelpers$class.tryo(ControlHelpers.scala:55)
net.liftweb.util.Helpers$.tryo(Helpers.scala:29)
net.liftweb.util.ClassHelpers$$anonfun$net$liftweb$util$ClassHelpers$
$_invokeMethod$2.apply(ClassHelpers.scala:352)
net.liftweb.util.ClassHelpers$$anonfun$net$liftweb$util$ClassHelpers$
$_invokeMethod$2.apply(ClassHelpers.scala:352)
scala.Iterator$$anon$14.next(Iterator.scala:267)
scala.Iterator$class.find(Iterator.scala:462)
scala.Iterator$$anon$14.find(Iterator.scala:265)
net.liftweb.util.ClassHelpers$class.net$liftweb$util$ClassHelpers$
$_invokeMethod(ClassHelpers.scala:353)
net.liftweb.util.ClassHelpers$class.invokeMethod(ClassHelpers.scala:
285)
net.liftweb.util.Helpers$.invokeMethod(Helpers.scala:29)
net.liftweb.http.LiftSession$$anonfun$17$$anonfun$apply$33$$anonfun
$apply$36$$anonfun$apply$38.apply(LiftSession.scala:723)
net.liftweb.http.LiftSession$$anonfun$17$$anonfun$apply$33$$anonfun
$apply$36$$anonfun$apply$38.apply(LiftSession.scala:705)
net.liftweb.util.EmptyBox.openOr(Box.scala:372)
net.liftweb.http.LiftSession$$anonfun$17$$anonfun$apply$33$$anonfun
$apply$36.apply(LiftSession.scala:705)
net.liftweb.http.LiftSession$$anonfun$17$$anonfun$apply$33$$anonfun
$apply$36.apply(LiftSession.scala:705)
net.liftweb.util.EmptyBox.openOr(Box.scala:372)
net.liftweb.http.LiftSession$$anonfun$17$$anonfun$apply$33.apply
(LiftSession.scala:704)
net.liftweb.http.LiftSession$$anonfun$17$$anonfun$apply$33.apply
(LiftSession.scala:704)
net.liftweb.http.S$.doSnippet(S.scala:725)
net.liftweb.http.LiftSession$$anonfun$17.apply(LiftSession.scala:702)
net.liftweb.http.LiftSession$$anonfun$17.apply(LiftSession.scala:701)
net.liftweb.util.Full.map(Box.scala:330)
net.liftweb.http.LiftSession.net$liftweb$http$LiftSession$
$processSnippet(LiftSession.scala:701)
net.liftweb.http.LiftSession$$anonfun$_defaultLiftTagProcessing
$1.apply(LiftSession.scala:793)
net.liftweb.http.LiftSession$$anonfun$_defaultLiftTagProcessing
$1.apply(LiftSession.scala:777)
net.liftweb.util.NamedPF.apply(NamedPartialFunction.scala:30)
net.liftweb.util.NamedPF$.apply(NamedPartialFunction.scala:76)
net.liftweb.http.LiftSession$$anonfun$processSurroundAndInclude$1$
$anonfun$apply$49.apply(LiftSession.scala:808)
net.liftweb.http.LiftSession$$anonfun$processSurroundAndInclude$1$
$anonfun$apply$49.apply(LiftSession.scala:808)
net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:65)
net.liftweb.http.S$.setVars(S.scala:623)
net.liftweb.http.LiftSession$$anonfun$processSurroundAndInclude
$1.apply(LiftSession.scala:808)
net.liftweb.http.LiftSession$$anonfun$processSurroundAndInclude
$1.apply(LiftSession.scala:805)
scala.Seq$class.flatMap(Seq.scala:294)
scala.xml.NodeSeq.flatMap(NodeSeq.scala:34)
net.liftweb.http.LiftSession.processSurroundAndInclude
(LiftSession.scala:804)
net.liftweb.http.LiftSession.net$liftweb$http$LiftSession$
$processSurroundElement(LiftSession.scala:948)
net.liftweb.http.LiftSession$$anonfun$_defaultLiftTagProcessing
$1.apply(LiftSession.scala:784)
net.liftweb.http.LiftSession$$anonfun$_defaultLiftTagProcessing
$1.apply(LiftSession.scala:777)

[Lift] Re: QueryParams and joins

2010-01-05 Thread Mads Hartmann
I've got this in my pom.xml

   dependency
  groupIdnet.liftweb/groupId
  artifactIdlift-core/artifactId
  version1.0/version
/dependency

On Jan 5, 8:54 pm, David Pollak feeder.of.the.be...@gmail.com wrote:
 On Tue, Jan 5, 2010 at 11:51 AM, Mads Hartmann mads...@gmail.com wrote:
  Sure thing, it's quite long though :)

  Just one thing, i added the following for it to compile (I want to
  return List[User] not List[TagUser] : .map(_.user.obj.open_!)

  So in all it looks like this

  def getTopUsers(in: Int) :List[User] = {

     TagUser.findAll(By(TagUser.tag, this.id), In(TagUser.user, User.id,
  OrderBy(User.followers_count, Descending), MaxRows[User](in)))
           .map(_.user.obj.open_!)

  }

 What version of Lift?





  Exception occured while processing /
  Message: java.lang.NullPointerException
         net.liftweb.mapper.In$$anon$3.init(MetaMapper.scala:1206)
         net.liftweb.mapper.In$.apply(MetaMapper.scala:1200)
         scalableKvidr.model.Tag.getTopUsers(Tag.scala:38)
         scalableKvidr.snippet.TagsSnippets$$anonfun$frontpageTags$1.apply
  (TagsSnippets.scala:71)
         scalableKvidr.snippet.TagsSnippets$$anonfun$frontpageTags$1.apply
  (TagsSnippets.scala:68)
         scala.List.flatMap(List.scala:1125)
         scalableKvidr.snippet.TagsSnippets.frontpageTags(TagsSnippets.scala:
  67)
         sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         sun.reflect.NativeMethodAccessorImpl.invoke
  (NativeMethodAccessorImpl.java:39)
         sun.reflect.DelegatingMethodAccessorImpl.invoke
  (DelegatingMethodAccessorImpl.java:25)
         java.lang.reflect.Method.invoke(Method.java:597)

   net.liftweb.util.ClassHelpers$$anonfun$net$liftweb$util$ClassHelpers$
  $_invokeMethod$2$$anonfun$apply$7.apply(ClassHelpers.scala:352)
         net.liftweb.util.ControlHelpers$class.tryo(ControlHelpers.scala:40)
         net.liftweb.util.Helpers$.tryo(Helpers.scala:29)
         net.liftweb.util.ControlHelpers$class.tryo(ControlHelpers.scala:55)
         net.liftweb.util.Helpers$.tryo(Helpers.scala:29)

   net.liftweb.util.ClassHelpers$$anonfun$net$liftweb$util$ClassHelpers$
  $_invokeMethod$2.apply(ClassHelpers.scala:352)

   net.liftweb.util.ClassHelpers$$anonfun$net$liftweb$util$ClassHelpers$
  $_invokeMethod$2.apply(ClassHelpers.scala:352)
         scala.Iterator$$anon$14.next(Iterator.scala:267)
         scala.Iterator$class.find(Iterator.scala:462)
         scala.Iterator$$anon$14.find(Iterator.scala:265)
         net.liftweb.util.ClassHelpers$class.net$liftweb$util$ClassHelpers$
  $_invokeMethod(ClassHelpers.scala:353)
         net.liftweb.util.ClassHelpers$class.invokeMethod(ClassHelpers.scala:
  285)
         net.liftweb.util.Helpers$.invokeMethod(Helpers.scala:29)
         net.liftweb.http.LiftSession$$anonfun$17$$anonfun$apply$33$$anonfun
  $apply$36$$anonfun$apply$38.apply(LiftSession.scala:723)
         net.liftweb.http.LiftSession$$anonfun$17$$anonfun$apply$33$$anonfun
  $apply$36$$anonfun$apply$38.apply(LiftSession.scala:705)
         net.liftweb.util.EmptyBox.openOr(Box.scala:372)
         net.liftweb.http.LiftSession$$anonfun$17$$anonfun$apply$33$$anonfun
  $apply$36.apply(LiftSession.scala:705)
         net.liftweb.http.LiftSession$$anonfun$17$$anonfun$apply$33$$anonfun
  $apply$36.apply(LiftSession.scala:705)
         net.liftweb.util.EmptyBox.openOr(Box.scala:372)
         net.liftweb.http.LiftSession$$anonfun$17$$anonfun$apply$33.apply
  (LiftSession.scala:704)
         net.liftweb.http.LiftSession$$anonfun$17$$anonfun$apply$33.apply
  (LiftSession.scala:704)
         net.liftweb.http.S$.doSnippet(S.scala:725)

   net.liftweb.http.LiftSession$$anonfun$17.apply(LiftSession.scala:702)

   net.liftweb.http.LiftSession$$anonfun$17.apply(LiftSession.scala:701)
         net.liftweb.util.Full.map(Box.scala:330)
         net.liftweb.http.LiftSession.net$liftweb$http$LiftSession$
  $processSnippet(LiftSession.scala:701)
         net.liftweb.http.LiftSession$$anonfun$_defaultLiftTagProcessing
  $1.apply(LiftSession.scala:793)
         net.liftweb.http.LiftSession$$anonfun$_defaultLiftTagProcessing
  $1.apply(LiftSession.scala:777)
         net.liftweb.util.NamedPF.apply(NamedPartialFunction.scala:30)
         net.liftweb.util.NamedPF$.apply(NamedPartialFunction.scala:76)
         net.liftweb.http.LiftSession$$anonfun$processSurroundAndInclude$1$
  $anonfun$apply$49.apply(LiftSession.scala:808)
         net.liftweb.http.LiftSession$$anonfun$processSurroundAndInclude$1$
  $anonfun$apply$49.apply(LiftSession.scala:808)
         net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:65)
         net.liftweb.http.S$.setVars(S.scala:623)
         net.liftweb.http.LiftSession$$anonfun$processSurroundAndInclude
  $1.apply(LiftSession.scala:808)
         net.liftweb.http.LiftSession$$anonfun$processSurroundAndInclude
  $1.apply(LiftSession.scala:805)
         scala.Seq$class.flatMap(Seq.scala:294)
         scala.xml.NodeSeq.flatMap(NodeSeq.scala:34)
         

Re: [Lift] Re: QueryParams and joins

2010-01-05 Thread David Pollak
On Tue, Jan 5, 2010 at 12:10 PM, Mads Hartmann mads...@gmail.com wrote:

 I've got this in my pom.xml

   dependency
  groupIdnet.liftweb/groupId
  artifactIdlift-core/artifactId
  version1.0/version
/dependency


Ah hah!

I'd strongly recommend you upgrade to Lift 1.1-M8.  It's faster, more stable
and better supported than 1.0.




 On Jan 5, 8:54 pm, David Pollak feeder.of.the.be...@gmail.com wrote:
  On Tue, Jan 5, 2010 at 11:51 AM, Mads Hartmann mads...@gmail.com
 wrote:
   Sure thing, it's quite long though :)
 
   Just one thing, i added the following for it to compile (I want to
   return List[User] not List[TagUser] : .map(_.user.obj.open_!)
 
   So in all it looks like this
 
   def getTopUsers(in: Int) :List[User] = {
 
  TagUser.findAll(By(TagUser.tag, this.id), In(TagUser.user, User.id,
   OrderBy(User.followers_count, Descending), MaxRows[User](in)))
.map(_.user.obj.open_!)
 
   }
 
  What version of Lift?
 
 
 
 
 
   Exception occured while processing /
   Message: java.lang.NullPointerException
  net.liftweb.mapper.In$$anon$3.init(MetaMapper.scala:1206)
  net.liftweb.mapper.In$.apply(MetaMapper.scala:1200)
  scalableKvidr.model.Tag.getTopUsers(Tag.scala:38)
  
  scalableKvidr.snippet.TagsSnippets$$anonfun$frontpageTags$1.apply
   (TagsSnippets.scala:71)
  
  scalableKvidr.snippet.TagsSnippets$$anonfun$frontpageTags$1.apply
   (TagsSnippets.scala:68)
  scala.List.flatMap(List.scala:1125)
  
  scalableKvidr.snippet.TagsSnippets.frontpageTags(TagsSnippets.scala:
   67)
  sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  sun.reflect.NativeMethodAccessorImpl.invoke
   (NativeMethodAccessorImpl.java:39)
  sun.reflect.DelegatingMethodAccessorImpl.invoke
   (DelegatingMethodAccessorImpl.java:25)
  java.lang.reflect.Method.invoke(Method.java:597)
 
net.liftweb.util.ClassHelpers$$anonfun$net$liftweb$util$ClassHelpers$
   $_invokeMethod$2$$anonfun$apply$7.apply(ClassHelpers.scala:352)
  
  net.liftweb.util.ControlHelpers$class.tryo(ControlHelpers.scala:40)
  net.liftweb.util.Helpers$.tryo(Helpers.scala:29)
  
  net.liftweb.util.ControlHelpers$class.tryo(ControlHelpers.scala:55)
  net.liftweb.util.Helpers$.tryo(Helpers.scala:29)
 
net.liftweb.util.ClassHelpers$$anonfun$net$liftweb$util$ClassHelpers$
   $_invokeMethod$2.apply(ClassHelpers.scala:352)
 
net.liftweb.util.ClassHelpers$$anonfun$net$liftweb$util$ClassHelpers$
   $_invokeMethod$2.apply(ClassHelpers.scala:352)
  scala.Iterator$$anon$14.next(Iterator.scala:267)
  scala.Iterator$class.find(Iterator.scala:462)
  scala.Iterator$$anon$14.find(Iterator.scala:265)
  net.liftweb.util.ClassHelpers$class.net
 $liftweb$util$ClassHelpers$
   $_invokeMethod(ClassHelpers.scala:353)
  
  net.liftweb.util.ClassHelpers$class.invokeMethod(ClassHelpers.scala:
   285)
  net.liftweb.util.Helpers$.invokeMethod(Helpers.scala:29)
  
  net.liftweb.http.LiftSession$$anonfun$17$$anonfun$apply$33$$anonfun
   $apply$36$$anonfun$apply$38.apply(LiftSession.scala:723)
  
  net.liftweb.http.LiftSession$$anonfun$17$$anonfun$apply$33$$anonfun
   $apply$36$$anonfun$apply$38.apply(LiftSession.scala:705)
  net.liftweb.util.EmptyBox.openOr(Box.scala:372)
  
  net.liftweb.http.LiftSession$$anonfun$17$$anonfun$apply$33$$anonfun
   $apply$36.apply(LiftSession.scala:705)
  
  net.liftweb.http.LiftSession$$anonfun$17$$anonfun$apply$33$$anonfun
   $apply$36.apply(LiftSession.scala:705)
  net.liftweb.util.EmptyBox.openOr(Box.scala:372)
  net.liftweb.http.LiftSession$$anonfun$17$$anonfun$apply$33.apply
   (LiftSession.scala:704)
  net.liftweb.http.LiftSession$$anonfun$17$$anonfun$apply$33.apply
   (LiftSession.scala:704)
  net.liftweb.http.S$.doSnippet(S.scala:725)
 
net.liftweb.http.LiftSession$$anonfun$17.apply(LiftSession.scala:702)
 
net.liftweb.http.LiftSession$$anonfun$17.apply(LiftSession.scala:701)
  net.liftweb.util.Full.map(Box.scala:330)
  net.liftweb.http.LiftSession.net$liftweb$http$LiftSession$
   $processSnippet(LiftSession.scala:701)
  net.liftweb.http.LiftSession$$anonfun$_defaultLiftTagProcessing
   $1.apply(LiftSession.scala:793)
  net.liftweb.http.LiftSession$$anonfun$_defaultLiftTagProcessing
   $1.apply(LiftSession.scala:777)
  net.liftweb.util.NamedPF.apply(NamedPartialFunction.scala:30)
  net.liftweb.util.NamedPF$.apply(NamedPartialFunction.scala:76)
  
  net.liftweb.http.LiftSession$$anonfun$processSurroundAndInclude$1$
   $anonfun$apply$49.apply(LiftSession.scala:808)
  
  net.liftweb.http.LiftSession$$anonfun$processSurroundAndInclude$1$
   $anonfun$apply$49.apply(LiftSession.scala:808)
  net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:65)
  net.liftweb.http.S$.setVars(S.scala:623)
  net.liftweb.http.LiftSession$$anonfun$processSurroundAndInclude
   

Re: [Lift] Re: QueryParams and joins

2010-01-05 Thread Ross Mellgren
It looks like you probably have some other dependencies somewhere or  
old jars pointing to the old lift version.


Please first try mvn clean jetty:run, and if that doesn't work, run  
mvn dependency:tree to try and find where the other version of lift- 
webkit is coming from. If you're still stuck, paste the output of  
dependency:tree please!


-Ross

On Jan 5, 2010, at 4:06 PM, Mads Hartmann wrote:


I really appreciate you taking the time to help me out.

depedency now is:
   dependency
 groupIdnet.liftweb/groupId
 artifactIdlift-core/artifactId
 version1.1-M8/version
   /dependency

It compiles just fine, but when i try to start the server i get the
following error:

ERROR - Failed to Boot
java.lang.NoClassDefFoundError: net/liftweb/util/Box
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at net.liftweb.http.DefaultBootstrap$.boot(LiftRules.scala:1260)
at net.liftweb.http.provider.HTTPProvider$class.bootLift
(HTTPProvider.scala:70)
at net.liftweb.http.LiftFilter.bootLift(LiftServlet.scala:523)
at net.liftweb.http.provider.servlet.ServletFilterProvider$class.init
(ServletFilterProvider.scala:20)
at net.liftweb.http.LiftFilter.init(LiftServlet.scala:523)
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:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
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)
Caused by: java.lang.ClassNotFoundException: net.liftweb.util.Box
   

[Lift] Re: QueryParams and joins

2010-01-04 Thread Mads Hartmann
My ultimate goal would be to only pull out the top x users. I'm
currently using the following code to achieve this:

TagUser.findAll(By(TagUser.tag, this.id)).map(_.user.obj.open_!)
   .sort(_.followers_count.is  _.followers_count.is)
   .take(x)

But im concerned that this creates an instance for each of the users
in tag tag even though i only need the top x.

Thanks for helping me out :)

On Jan 5, 1:47 am, David Pollak feeder.of.the.be...@gmail.com wrote:
 On Mon, Jan 4, 2010 at 3:24 PM, Mads Hartmann mads...@gmail.com wrote:
  Hello, I'm having a problem and I'm sure it's an easy fix for someone
  with a bit more experience

  I have 3 model classes: tag, user, tweet and a join class TagUser. A
  tag has a list of users.

  If i want all of the users in a tag i use the following code (which
  works):

  def users = TagUser.findAll(By(TagUser.tag, this.id)).map
  (_.user.obj.open_!)

  my problem is that i can't figure out how to apply queryparams so i
  don't pull out all of the users from the DB if i don't need em. I was
  thinking something like this (doesn't compile):

  def getTopUsers(in: Int) :List[User] = {
     TagUser.findAll(By(TagUser.tag, this.id),
                        OrderBy(User.followers_count, Descending),
                        MaxRows(in))

 There is an issue:

 OrderBy(User., Descending) // illegal... you can only order by a
 TagUser.xxx field

 And a potential issue:

 MaxRows[TagUser](in) // sometimes the Type Inferencer doesn't get it right.

 What's your ultimate goal?





  }

  I get the following error:
  [ERROR] ... error: overloaded method value findAll with alternatives
  (net.liftweb.mapper.QueryParam[scalableKvidr.model.TagUser]*)List
  [scalableKvidr.model.TagUser] and ()List
  [scalableKvidr.model.TagUser] cannot be applied to
  (net.liftweb.mapper.Cmp
  [scalableKvidr.model.TagUser,Long],net.liftweb.mapper.OrderBy
  [scalableKvidr.model.User,Int],net.liftweb.mapper.MaxRows[Nothing])

  --

  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 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 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.