Re: [Lift] Compile error

2010-03-01 Thread David Pollak
Send it to me directly, but please make sure that there are no hard-coded
paths or dependencies other than Ant and Ivy that I might not have on my
machine.

On Mon, Mar 1, 2010 at 9:46 AM, Donald McLean  wrote:

> Fortunately, I'm doing a tech-eval prototype so I can just send the
> whole kit-n-caboodle. It's just under 700k as a tar file.
>
> Where should I send it?
>
> Donald
>
> On Mon, Mar 1, 2010 at 12:32 PM, David Pollak
>  wrote:
> >
> >
> > On Mon, Mar 1, 2010 at 9:28 AM, Donald McLean 
> wrote:
> >>
> >> That didn't help. The problem is related to the Lift-2.0-M2 libraries.
> >> I went to 1.0.3 and it is fine.
> >
> > If you can put together a reproduceable example, we'll look into it.
>
> --
> Family photographs are a critical legacy for
> ourselves and our descendants. Protect that
> legacy with a digital backup and recovery plan.
>
> Join the photo preservation advocacy Facebook group:
> http://www.facebook.com/home.php?ref=logo#/group.php?gid=148274709288
>
> --
> 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, 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.



Re: [Lift] Compile error

2010-03-01 Thread Donald McLean
Fortunately, I'm doing a tech-eval prototype so I can just send the
whole kit-n-caboodle. It's just under 700k as a tar file.

Where should I send it?

Donald

On Mon, Mar 1, 2010 at 12:32 PM, David Pollak
 wrote:
>
>
> On Mon, Mar 1, 2010 at 9:28 AM, Donald McLean  wrote:
>>
>> That didn't help. The problem is related to the Lift-2.0-M2 libraries.
>> I went to 1.0.3 and it is fine.
>
> If you can put together a reproduceable example, we'll look into it.

-- 
Family photographs are a critical legacy for
ourselves and our descendants. Protect that
legacy with a digital backup and recovery plan.

Join the photo preservation advocacy Facebook group:
http://www.facebook.com/home.php?ref=logo#/group.php?gid=148274709288

-- 
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] Compile error

2010-03-01 Thread David Pollak
On Mon, Mar 1, 2010 at 9:28 AM, Donald McLean  wrote:

> That didn't help. The problem is related to the Lift-2.0-M2 libraries.
> I went to 1.0.3 and it is fine.
>

If you can put together a reproduceable example, we'll look into it.


>
> Donald
>
> On Mon, Mar 1, 2010 at 11:51 AM, David Pollak
>  wrote:
> >
> >
> > On Mon, Mar 1, 2010 at 8:19 AM, Donald McLean 
> wrote:
> >>
> >> I appreciate the response but I'm not using Maven, I'm using Ant. If
> >> you could tell me what that would accomplish I could probably figure
> >> out the equivalent.
> >>
> >
> > whatever does a clean... whatever deletes all the .class files.
> >
> >>
> >> Thank you,
> >>
> >> Donald
> >>
> >> On Mon, Mar 1, 2010 at 11:07 AM, David Pollak
> >>  wrote:
> >> >
> >> >
> >> > On Mon, Mar 1, 2010 at 8:03 AM, Donald McLean 
> >> > wrote:
> >> >>
> >> >> I just updated to Lift 2.0m2 and Scala 2.7.7 and now I'm getting this
> >> >> error message. I would greatly appreciate a suggestion on how to
> >> >> resolve this.
> >> >
> >> >
> >> > This is a known bug in the Scala compiler.
> >> >
> >> > To fix it, do: mvn clean
> >> >
> >> >> java.lang.RuntimeException: malformed Scala signature of Loc at 5720;
> >> >> reference value common of package liftweb refers to nonexisting
> >> >> symbol.
> >> >>at
> >> >>
> >> >>
> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.errorBadSignature(UnPickler.scala:762)
> >> >>
> >> >> --
> >> >> Family photographs are a critical legacy for
> >> >> ourselves and our descendants. Protect that
> >> >> legacy with a digital backup and recovery plan.
> >> >>
> >> >> Join the photo preservation advocacy Facebook group:
> >> >>
> http://www.facebook.com/home.php?ref=logo#/group.php?gid=148274709288
> >> >>
> >> >> --
> >> >> 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, 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.
> >> >
> >>
> >>
> >>
> >> --
> >> Family photographs are a critical legacy for
> >> ourselves and our descendants. Protect that
> >> legacy with a digital backup and recovery plan.
> >>
> >> Join the photo preservation advocacy Facebook group:
> >> http://www.facebook.com/home.php?ref=logo#/group.php?gid=148274709288
> >>
> >> --
> >> 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, 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.
> >
>
>
>
> --
> Family photographs are a critical legacy for
> ourselves and our descendants. Protect that
> legacy with a digital backup and recovery plan.
>
> Join the photo preservation advocacy Facebook group:
> http://www.facebook.com/home.php?ref=logo#/group.php?gid=148274709288
>
> --
> 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, 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...@googl

Re: [Lift] Compile error

2010-03-01 Thread Donald McLean
That didn't help. The problem is related to the Lift-2.0-M2 libraries.
I went to 1.0.3 and it is fine.

Donald

On Mon, Mar 1, 2010 at 11:51 AM, David Pollak
 wrote:
>
>
> On Mon, Mar 1, 2010 at 8:19 AM, Donald McLean  wrote:
>>
>> I appreciate the response but I'm not using Maven, I'm using Ant. If
>> you could tell me what that would accomplish I could probably figure
>> out the equivalent.
>>
>
> whatever does a clean... whatever deletes all the .class files.
>
>>
>> Thank you,
>>
>> Donald
>>
>> On Mon, Mar 1, 2010 at 11:07 AM, David Pollak
>>  wrote:
>> >
>> >
>> > On Mon, Mar 1, 2010 at 8:03 AM, Donald McLean 
>> > wrote:
>> >>
>> >> I just updated to Lift 2.0m2 and Scala 2.7.7 and now I'm getting this
>> >> error message. I would greatly appreciate a suggestion on how to
>> >> resolve this.
>> >
>> >
>> > This is a known bug in the Scala compiler.
>> >
>> > To fix it, do: mvn clean
>> >
>> >> java.lang.RuntimeException: malformed Scala signature of Loc at 5720;
>> >> reference value common of package liftweb refers to nonexisting
>> >> symbol.
>> >>        at
>> >>
>> >> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.errorBadSignature(UnPickler.scala:762)
>> >>
>> >> --
>> >> Family photographs are a critical legacy for
>> >> ourselves and our descendants. Protect that
>> >> legacy with a digital backup and recovery plan.
>> >>
>> >> Join the photo preservation advocacy Facebook group:
>> >> http://www.facebook.com/home.php?ref=logo#/group.php?gid=148274709288
>> >>
>> >> --
>> >> 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, 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.
>> >
>>
>>
>>
>> --
>> Family photographs are a critical legacy for
>> ourselves and our descendants. Protect that
>> legacy with a digital backup and recovery plan.
>>
>> Join the photo preservation advocacy Facebook group:
>> http://www.facebook.com/home.php?ref=logo#/group.php?gid=148274709288
>>
>> --
>> 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, 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.
>



-- 
Family photographs are a critical legacy for
ourselves and our descendants. Protect that
legacy with a digital backup and recovery plan.

Join the photo preservation advocacy Facebook group:
http://www.facebook.com/home.php?ref=logo#/group.php?gid=148274709288

-- 
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] Compile error

2010-03-01 Thread David Pollak
On Mon, Mar 1, 2010 at 8:19 AM, Donald McLean  wrote:

> I appreciate the response but I'm not using Maven, I'm using Ant. If
> you could tell me what that would accomplish I could probably figure
> out the equivalent.
>
>
whatever does a clean... whatever deletes all the .class files.


> Thank you,
>
> Donald
>
> On Mon, Mar 1, 2010 at 11:07 AM, David Pollak
>  wrote:
> >
> >
> > On Mon, Mar 1, 2010 at 8:03 AM, Donald McLean 
> wrote:
> >>
> >> I just updated to Lift 2.0m2 and Scala 2.7.7 and now I'm getting this
> >> error message. I would greatly appreciate a suggestion on how to
> >> resolve this.
> >
> >
> > This is a known bug in the Scala compiler.
> >
> > To fix it, do: mvn clean
> >
> >> java.lang.RuntimeException: malformed Scala signature of Loc at 5720;
> >> reference value common of package liftweb refers to nonexisting
> >> symbol.
> >>at
> >>
> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.errorBadSignature(UnPickler.scala:762)
> >>
> >> --
> >> Family photographs are a critical legacy for
> >> ourselves and our descendants. Protect that
> >> legacy with a digital backup and recovery plan.
> >>
> >> Join the photo preservation advocacy Facebook group:
> >> http://www.facebook.com/home.php?ref=logo#/group.php?gid=148274709288
> >>
> >> --
> >> 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, 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.
> >
>
>
>
> --
> Family photographs are a critical legacy for
> ourselves and our descendants. Protect that
> legacy with a digital backup and recovery plan.
>
> Join the photo preservation advocacy Facebook group:
> http://www.facebook.com/home.php?ref=logo#/group.php?gid=148274709288
>
> --
> 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, 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.



Re: [Lift] Compile error

2010-03-01 Thread Donald McLean
I appreciate the response but I'm not using Maven, I'm using Ant. If
you could tell me what that would accomplish I could probably figure
out the equivalent.

Thank you,

Donald

On Mon, Mar 1, 2010 at 11:07 AM, David Pollak
 wrote:
>
>
> On Mon, Mar 1, 2010 at 8:03 AM, Donald McLean  wrote:
>>
>> I just updated to Lift 2.0m2 and Scala 2.7.7 and now I'm getting this
>> error message. I would greatly appreciate a suggestion on how to
>> resolve this.
>
>
> This is a known bug in the Scala compiler.
>
> To fix it, do: mvn clean
>
>> java.lang.RuntimeException: malformed Scala signature of Loc at 5720;
>> reference value common of package liftweb refers to nonexisting
>> symbol.
>>        at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.errorBadSignature(UnPickler.scala:762)
>>
>> --
>> Family photographs are a critical legacy for
>> ourselves and our descendants. Protect that
>> legacy with a digital backup and recovery plan.
>>
>> Join the photo preservation advocacy Facebook group:
>> http://www.facebook.com/home.php?ref=logo#/group.php?gid=148274709288
>>
>> --
>> 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, 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.
>



-- 
Family photographs are a critical legacy for
ourselves and our descendants. Protect that
legacy with a digital backup and recovery plan.

Join the photo preservation advocacy Facebook group:
http://www.facebook.com/home.php?ref=logo#/group.php?gid=148274709288

-- 
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] Compile error

2010-03-01 Thread David Pollak
On Mon, Mar 1, 2010 at 8:03 AM, Donald McLean  wrote:

> I just updated to Lift 2.0m2 and Scala 2.7.7 and now I'm getting this
> error message. I would greatly appreciate a suggestion on how to
> resolve this.
>


This is a known bug in the Scala compiler.

To fix it, do: mvn clean




>
> Donald
>
> java.lang.RuntimeException: malformed Scala signature of Loc at 5720;
> reference value common of package liftweb refers to nonexisting
> symbol.
>at
> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.errorBadSignature(UnPickler.scala:762)
>
> --
> Family photographs are a critical legacy for
> ourselves and our descendants. Protect that
> legacy with a digital backup and recovery plan.
>
> Join the photo preservation advocacy Facebook group:
> http://www.facebook.com/home.php?ref=logo#/group.php?gid=148274709288
>
> --
> 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, 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] Compile error

2010-03-01 Thread Donald McLean
I just updated to Lift 2.0m2 and Scala 2.7.7 and now I'm getting this
error message. I would greatly appreciate a suggestion on how to
resolve this.

Donald

java.lang.RuntimeException: malformed Scala signature of Loc at 5720;
reference value common of package liftweb refers to nonexisting
symbol.
at 
scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.errorBadSignature(UnPickler.scala:762)

-- 
Family photographs are a critical legacy for
ourselves and our descendants. Protect that
legacy with a digital backup and recovery plan.

Join the photo preservation advocacy Facebook group:
http://www.facebook.com/home.php?ref=logo#/group.php?gid=148274709288

-- 
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: Basic RESTful webservice with LIFT compile error "... since method createTag in trait XMLApiHelper ..."

2009-10-08 Thread David Pollak
On Thu, Oct 8, 2009 at 7:19 PM, Alex Black  wrote:

>
> Hi David, thanks for the response.
>
> Thanks, that gets it compiling, and I think I see what it does.
>
> Is the right way to proceed if I want to return JSON (rather than
> XML)?
>

Roll your own :-(

You can also use the excellent lift-json libraries to parse the XML and
return JSON.


>
> - Alex
>
> On Oct 8, 2:17 pm, David Pollak  wrote:
> > In order to use the XMLApiHelper trait, you must define an outer-most XML
> > Elem that will wrap the response.
> > For example:
> >
> > def createTag(in: NodeSeq): Elem = {in}
> >
> > Now... if your stuff already does the wrapping in the outer-most Elem,
> you
> > can do:
> >
> > def createTag(in: NodeSeq): Elem = in.flatMap{case e: Elem => List(e)
> case _
> > => Nil}.firstOption getOrElse 
> >
> >
> >
> > On Thu, Oct 8, 2009 at 10:36 AM, Alex Black  wrote:
> >
> > > I'm getting started with Scala and Lift, implementing a simple REST
> > > service.  I've extended XMLApiHelper, following examples in "Exploring
> > > Lift", but I'm getting a compile error I'm not sure about, any
> > > suggestions?
> >
> > > error:
> >
> > > class RestAPI needs to be abstract, since method createTag in trait
> > > XMLApiHelper of type (scala.xml.NodeSeq)scala.xml.Elem is not defined
> > > RestAPI.scala   /poc/src/main/scala/com/somecompany/api Unknown Scala
> > > Problem
> >
> > > So its telling me I have to implement createTag... but, I don't know
> > > how to :)  Also, the examples i've seen don't seem to implement it,
> > > making me think I'm doing something wrong.
> >
> > > package com.somecompany.api
> >
> > > import _root_.net.liftweb.util._
> > > import _root_.net.liftweb.http._
> > > import Helpers._
> >
> > > import net.liftweb.http.rest.XMLApiHelper
> >
> > > class RestAPI  extends XMLApiHelper {
> > >  def dispatch: LiftRules.DispatchPF = {
> >
> > >case Req(List("api", "camera", cameraId), "", DeleteRequest) =>
> > >() => deleteCamera(cameraId)
> >
> > >// Invalid API request - route to our error handler
> > >case Req(List("api", _), "", _) => failure _
> > >}
> >
> > >  def failure : LiftResponse = BadResponse()
> >
> > >  def deleteCamera(cameraId : String) : LiftResponse = {
> > >NoContentResponse()
> >
> > >  }
> >
> > > }
> >
> > > Thanks!
> >
> > > - Alex
> >
> > --
> > Lift, the simply functional web frameworkhttp://liftweb.net
> > Beginning Scalahttp://www.apress.com/book/view/1430219890
> > Follow me:http://twitter.com/dpp
> > Surf the harmonics
> >
>


-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Surf the harmonics

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



[Lift] Re: Basic RESTful webservice with LIFT compile error "... since method createTag in trait XMLApiHelper ..."

2009-10-08 Thread Alex Black

Hi David, thanks for the response.

Thanks, that gets it compiling, and I think I see what it does.

Is the right way to proceed if I want to return JSON (rather than
XML)?

- Alex

On Oct 8, 2:17 pm, David Pollak  wrote:
> In order to use the XMLApiHelper trait, you must define an outer-most XML
> Elem that will wrap the response.
> For example:
>
> def createTag(in: NodeSeq): Elem = {in}
>
> Now... if your stuff already does the wrapping in the outer-most Elem, you
> can do:
>
> def createTag(in: NodeSeq): Elem = in.flatMap{case e: Elem => List(e) case _
> => Nil}.firstOption getOrElse 
>
>
>
> On Thu, Oct 8, 2009 at 10:36 AM, Alex Black  wrote:
>
> > I'm getting started with Scala and Lift, implementing a simple REST
> > service.  I've extended XMLApiHelper, following examples in "Exploring
> > Lift", but I'm getting a compile error I'm not sure about, any
> > suggestions?
>
> > error:
>
> > class RestAPI needs to be abstract, since method createTag in trait
> > XMLApiHelper of type (scala.xml.NodeSeq)scala.xml.Elem is not defined
> > RestAPI.scala   /poc/src/main/scala/com/somecompany/api Unknown Scala
> > Problem
>
> > So its telling me I have to implement createTag... but, I don't know
> > how to :)  Also, the examples i've seen don't seem to implement it,
> > making me think I'm doing something wrong.
>
> > package com.somecompany.api
>
> > import _root_.net.liftweb.util._
> > import _root_.net.liftweb.http._
> > import Helpers._
>
> > import net.liftweb.http.rest.XMLApiHelper
>
> > class RestAPI  extends XMLApiHelper {
> >  def dispatch: LiftRules.DispatchPF = {
>
> >    case Req(List("api", "camera", cameraId), "", DeleteRequest) =>
> >        () => deleteCamera(cameraId)
>
> >        // Invalid API request - route to our error handler
> >    case Req(List("api", _), "", _) => failure _
> >        }
>
> >  def failure : LiftResponse = BadResponse()
>
> >  def deleteCamera(cameraId : String) : LiftResponse = {
> >        NoContentResponse()
>
> >  }
>
> > }
>
> > Thanks!
>
> > - Alex
>
> --
> Lift, the simply functional web frameworkhttp://liftweb.net
> Beginning Scalahttp://www.apress.com/book/view/1430219890
> Follow me:http://twitter.com/dpp
> Surf the harmonics
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Basic RESTful webservice with LIFT compile error "... since method createTag in trait XMLApiHelper ..."

2009-10-08 Thread David Pollak
In order to use the XMLApiHelper trait, you must define an outer-most XML
Elem that will wrap the response.
For example:

def createTag(in: NodeSeq): Elem = {in}

Now... if your stuff already does the wrapping in the outer-most Elem, you
can do:

def createTag(in: NodeSeq): Elem = in.flatMap{case e: Elem => List(e) case _
=> Nil}.firstOption getOrElse 

On Thu, Oct 8, 2009 at 10:36 AM, Alex Black  wrote:

>
> I'm getting started with Scala and Lift, implementing a simple REST
> service.  I've extended XMLApiHelper, following examples in "Exploring
> Lift", but I'm getting a compile error I'm not sure about, any
> suggestions?
>
> error:
>
> class RestAPI needs to be abstract, since method createTag in trait
> XMLApiHelper of type (scala.xml.NodeSeq)scala.xml.Elem is not defined
> RestAPI.scala   /poc/src/main/scala/com/somecompany/api Unknown Scala
> Problem
>
> So its telling me I have to implement createTag... but, I don't know
> how to :)  Also, the examples i've seen don't seem to implement it,
> making me think I'm doing something wrong.
>
> package com.somecompany.api
>
> import _root_.net.liftweb.util._
> import _root_.net.liftweb.http._
> import Helpers._
>
> import net.liftweb.http.rest.XMLApiHelper
>
> class RestAPI  extends XMLApiHelper {
>  def dispatch: LiftRules.DispatchPF = {
>
>case Req(List("api", "camera", cameraId), "", DeleteRequest) =>
>() => deleteCamera(cameraId)
>
>// Invalid API request - route to our error handler
>case Req(List("api", _), "", _) => failure _
>}
>
>  def failure : LiftResponse = BadResponse()
>
>  def deleteCamera(cameraId : String) : LiftResponse = {
>NoContentResponse()
>
>  }
>
> }
>
> Thanks!
>
> - Alex
>
> >
>


-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Surf the harmonics

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



[Lift] Re: Basic RESTful webservice with LIFT compile error "... since method createTag in trait XMLApiHelper ..."

2009-10-08 Thread Alex Black

I noticed that other examples use a singleton object instead of class,
so I changed my code, but I just get the same sort of error but for an
object:

object creation impossible, since method createTag in trait
XMLApiHelper of type (scala.xml.NodeSeq)scala.xml.Elem is not defined
RestAPI.scala   /poc/src/main/scala/com/somecompany/api Unknown Scala
Problem


On Oct 8, 1:36 pm, Alex Black  wrote:
> I'm getting started with Scala and Lift, implementing a simple REST
> service.  I've extended XMLApiHelper, following examples in "Exploring
> Lift", but I'm getting a compile error I'm not sure about, any
> suggestions?
>
> error:
>
> class RestAPI needs to be abstract, since method createTag in trait
> XMLApiHelper of type (scala.xml.NodeSeq)scala.xml.Elem is not defined
> RestAPI.scala   /poc/src/main/scala/com/somecompany/api Unknown Scala
> Problem
>
> So its telling me I have to implement createTag... but, I don't know
> how to :)  Also, the examples i've seen don't seem to implement it,
> making me think I'm doing something wrong.
>
> package com.somecompany.api
>
> import _root_.net.liftweb.util._
> import _root_.net.liftweb.http._
> import Helpers._
>
> import net.liftweb.http.rest.XMLApiHelper
>
> class RestAPI  extends XMLApiHelper {
>   def dispatch: LiftRules.DispatchPF = {
>
>     case Req(List("api", "camera", cameraId), "", DeleteRequest) =>
>         () => deleteCamera(cameraId)
>
>         // Invalid API request - route to our error handler
>     case Req(List("api", _), "", _) => failure _
>         }
>
>   def failure : LiftResponse = BadResponse()
>
>   def deleteCamera(cameraId : String) : LiftResponse = {
>         NoContentResponse()
>
>   }
>
> }
>
> Thanks!
>
> - Alex
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Basic RESTful webservice with LIFT compile error "... since method createTag in trait XMLApiHelper ..."

2009-10-08 Thread Alex Black

I'm getting started with Scala and Lift, implementing a simple REST
service.  I've extended XMLApiHelper, following examples in "Exploring
Lift", but I'm getting a compile error I'm not sure about, any
suggestions?

error:

class RestAPI needs to be abstract, since method createTag in trait
XMLApiHelper of type (scala.xml.NodeSeq)scala.xml.Elem is not defined
RestAPI.scala   /poc/src/main/scala/com/somecompany/api Unknown Scala
Problem

So its telling me I have to implement createTag... but, I don't know
how to :)  Also, the examples i've seen don't seem to implement it,
making me think I'm doing something wrong.

package com.somecompany.api

import _root_.net.liftweb.util._
import _root_.net.liftweb.http._
import Helpers._

import net.liftweb.http.rest.XMLApiHelper

class RestAPI  extends XMLApiHelper {
  def dispatch: LiftRules.DispatchPF = {

case Req(List("api", "camera", cameraId), "", DeleteRequest) =>
() => deleteCamera(cameraId)

// Invalid API request - route to our error handler
case Req(List("api", _), "", _) => failure _
}

  def failure : LiftResponse = BadResponse()

  def deleteCamera(cameraId : String) : LiftResponse = {
NoContentResponse()

  }

}

Thanks!

- Alex

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



[Lift] Compile error with 1.1-M1 and CRUDify

2009-05-04 Thread jon

Hi,

I saw the following after moving my project from lift 1.0 to 1.1-M1:

[WARNING]  self-type com.company.model.City does not conform to
net.liftweb.mapper.CRUDify[Long,com.company.model.City]'s selftype
net.liftweb.mapper.CRUDify[Long,com.company.model.City] with
com.company.model.City with net.liftweb.mapper.KeyedMetaMapper
[Long,com.company.model.City]
[WARNING] class City extends LongKeyedMapper[City] with IdPK with
CRUDify[Long, City] {

I fixed by moving the CRUDify trait from the class to the meta object
definition.  Is that correct usage?

Was the CRUDify trait always supposed to be used on the meta object
(the liftbook example shows the trait on the class)?

Thanks,

Jon

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



[Lift] Compile error in TD.scala whith example in "Starting with Lift" HTML guide

2009-04-03 Thread Dano!


Good morning,

Scala has been getting some interest in the project I work with, and
I've been asked to investigate the Lift framework as a possibility to
migrate our custom coded website to it.  I'm a Scala newbie, so I'm
working on absorbing a lot in a short period of time.

I'm having problems with the "Stating with Lift" found at:
http://liftweb.net/docs/getting_started/mod_master.html

I was able to get everything working up through section 2.8.  I'm
getting stuck in Section 2.12 where it suggests starting the server
and trying the changes from Section 2.9.

Specifically I'm getting hung up with a compile time error with
TD.scala.  First I get these two errors:

$ mvn jetty:run
...
[INFO] Checking for multiple versions of scala
[INFO] Compiling 3 source files to /Users/danielmckagan/Workspaces/
lift-test/todo/target/classes
[WARNING] /Users/danielmckagan/Workspaces/lift-test/todo/src/main/
scala/com/liftworkshop/model/ToDo.scala:29: error: ')' expected but
integer literal found.
[WARNING] valMinLen(3, ~Description must be 3 characters~) _ ::
[WARNING]   ^
[WARNING] /Users/danielmckagan/Workspaces/lift-test/todo/src/main/
scala/com/liftworkshop/snippet/TD.scala:33: error: ')' expected but
'.' found.
[WARNING]   ~priority~ -> todo.priority.toForm,
[WARNING] ^
[WARNING] two errors found
...

If I change the '3' to 'three' in the first example, that error falls
away and the second one remains:

...
[INFO] Checking for multiple versions of scala
[INFO] Compiling 3 source files to /Users/danielmckagan/Workspaces/
lift-test/todo/target/classes
[WARNING] /Users/danielmckagan/Workspaces/lift-test/todo/src/main/
scala/com/liftworkshop/snippet/TD.scala:33: error: ')' expected but
'.' found.
[WARNING]   ~priority~ -> todo.priority.toForm,
[WARNING] ^
[WARNING] one error found
...

And I can't figure out how to get over it.  I deleted the entire todo
project and started from the beginning, cutting and pasting the
examples, and have gotten the same behavior both times.

This may help...

$ mvn --version
Apache Maven 2.1.0 (r755702; 2009-03-18 12:10:27-0700)
Java version: 1.5.0_16
Java home: /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/
Home
Default locale: en_US, platform encoding: MacRoman
OS name: "mac os x" version: "10.5.6" arch: "i386" Family: "unix"

Any help would be appreciated,
Dano!

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