Lift RestContinuation and Jetty 7

81 views
Skip to first unread message

Michael

unread,
May 6, 2011, 8:30:58 PM5/6/11
to Lift
I upgraded from jetty 6.1.25 to 7.4.0 and now experience problem with
RestContinuation.async:

When ever this code executed, I'm getting a HTTP ERROR 404 error

RestContinuation.async {
writeResponse => {
val channel = new Channel(answer => writeResponse(answer),
worker._id.value.toString,
worker.login.value,
userIp(req))
Channel ! ("addChannel", channel, worker._id.value, userIp(req))
}
}

Jetty is running as a maven plugin. If i downgrade jetty, it's working
as it should.
What can be the problem?

David Pollak

unread,
May 7, 2011, 7:38:21 AM5/7/11
to lif...@googlegroups.com
Can you put together a sample app that demonstrates this as well as perhaps demonstrating the other issue you were having.  I'll have a look at it.


--
You received this message because you are subscribed to the Google Groups "Lift" group.
To post to this group, send email to lif...@googlegroups.com.
To unsubscribe from this group, send email to liftweb+u...@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

Michael

unread,
May 8, 2011, 12:33:51 AM5/8/11
to Lift
I think it's just a misconfiguration on my part.
Sample project (from basic lift archetype)

git clone https://github.com/esspe/LiftJetty7.git
cd LiftJetty7
mvn jetty:run

Now try to request http://127.0.0.1:8080/async
you will see a 404 not found

If you switch to 6.1.26 jetty in pom:
mv pom.xml pom-jetty-7.xml
mv pom-jetty-6.xml pom.xml
mvn jetty:run

than you can request http://127.0.0.1:8080/async and see a Response
several
seconds later.

The /async is routed to lib.Api:

object Api extends RestHelper {
serve {
case "async" :: Nil Get req =>
RestContinuation.async {
writeResponse => {
future {
Thread.sleep(5000)
writeResponse(<xml>Response</xml>)
}
}
}
}
}

I will try to make a sample app for my first bug with delays later.
Currently i suspect, that it's the problem of Java on FreeBSD. I'm
waiting for linux server to confirm that.

David Pollak

unread,
May 13, 2011, 6:31:29 AM5/13/11
to lif...@googlegroups.com
Thanks for putting together this example.  I've opened a ticket and will resolve the issue:

https://www.assembla.com/spaces/liftweb/tickets/1006-restcontinuation-does-not-work-on-jetty7

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

David Pollak

unread,
May 14, 2011, 4:02:39 PM5/14/11
to lif...@googlegroups.com


On Friday, May 13, 2011 3:31:29 AM UTC-7, David Pollak wrote:
Thanks for putting together this example.  I've opened a ticket and will resolve the issue:

https://www.assembla.com/spaces/liftweb/tickets/1006-restcontinuation-does-not-work-on-jetty7


Found the 1 line (one boolean return value) fix.  It's in master and will be part of 2.4-M1
 

On May 7, 2:38 pm, David Pollak <feeder.of...@gmail.com> wrote:
> Can you put together a sample app that demonstrates this as well as perhaps
> demonstrating the other issue you were having.  I'll have a look at it.

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

Michael

unread,
May 15, 2011, 8:56:30 PM5/15/11
to Lift
Thanks, tested it on 2.4-SNAPSHOT and it works.

On May 14, 11:02 pm, David Pollak <feeder.of.the.be...@gmail.com>
wrote:
> On Friday, May 13, 2011 3:31:29 AM UTC-7, David Pollak wrote:
>
> > Thanks for putting together this example.  I've opened a ticket and will
> > resolve the issue:
>
> >https://www.assembla.com/spaces/liftweb/tickets/1006-restcontinuation...
Reply all
Reply to author
Forward
0 new messages