Replacing scala.actors with LiftActor

8 views
Skip to first unread message

Timothy Perrett

unread,
Jul 9, 2009, 8:34:47 AM7/9/09
to Lift
Hey guys,

Im getting the following trace from my application:

java.lang.InterruptedException
at scala.actors.LinkedQueue.put(Unknown Source)
at scala.actors.FJTaskRunnerGroup.execute(Unknown Source)
at scala.actors.FJTaskScheduler2.execute
(FJTaskScheduler2.scala:156)
at scala.actors.Scheduler$.execute(Scheduler.scala:84)
at scala.actors.Actor$class.scheduleActor(Actor.scala:719)
at com.xmpie.example.property.comet.Proofer.scheduleActor
(Proofer.scala:18)
at scala.actors.Actor$$anonfun$scala$actors$Actor$$seq$1.apply
(Actor.scala:800)
at scala.actors.Actor$$anonfun$scala$actors$Actor$$seq$1.apply
(Actor.scala:794)
at scala.actors.Reaction.run(Reaction.scala:82)
at scala.actors.FJTask$Wrap.run(Unknown Source)
at scala.actors.FJTaskRunner.scanWhileIdling(Unknown Source)
at scala.actors.FJTaskRunner.run(Unknown Source)
^C
!!!! exc !!!java.io.IOException: Broken pipe
at java.io.FileOutputStream.writeBytes(Native Method)
at java.io.FileOutputStream.write(FileOutputStream.java:260)
at java.io.BufferedOutputStream.flushBuffer
(BufferedOutputStream.java:65)
at java.io.BufferedOutputStream.flush
(BufferedOutputStream.java:123)
at org.scala_tools.maven.StreamPiper.run(StreamPiper.java:42)
Exception in thread "Thread-4" java.lang.RuntimeException: wrap:
Broken pipe
at org.scala_tools.maven.StreamPiper.run(StreamPiper.java:56)
Caused by: java.io.IOException: Broken pipe
at java.io.FileOutputStream.writeBytes(Native Method)
at java.io.FileOutputStream.write(FileOutputStream.java:260)
at java.io.BufferedOutputStream.flushBuffer
(BufferedOutputStream.java:65)
at java.io.BufferedOutputStream.flush
(BufferedOutputStream.java:123)
at org.scala_tools.maven.StreamPiper.run(StreamPiper.java:42)
^C
!!!! exc !!!java.io.IOException: Stream closed
at java.io.BufferedInputStream.getBufIfOpen
(BufferedInputStream.java:145)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:
261)
at java.io.BufferedInputStream.read(BufferedInputStream.java:
313)
at java.io.FilterInputStream.read(FilterInputStream.java:90)
at org.scala_tools.maven.StreamPiper.run(StreamPiper.java:39)
Exception in thread "Thread-6" java.lang.RuntimeException: wrap:
Stream closed
at org.scala_tools.maven.StreamPiper.run(StreamPiper.java:56)
Caused by: java.io.IOException: Stream closed
at java.io.BufferedInputStream.getBufIfOpen
(BufferedInputStream.java:145)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:
261)
at java.io.BufferedInputStream.read(BufferedInputStream.java:
313)
at java.io.FilterInputStream.read(FilterInputStream.java:90)
at org.scala_tools.maven.StreamPiper.run(StreamPiper.java:39)

I presume this is because I need to move to the LiftActor code, what
steps do I need to make in order to move to LiftActor?

thanks

Tim

David Pollak

unread,
Jul 9, 2009, 9:43:38 AM7/9/09
to lif...@googlegroups.com

No.  The Lift Actor stuff is completely independent of the Scala Actor stuff.

First, it looks like your app is 2.7.4, I'd suggest switching to 2.7.5.  2.7.5 using the java.util.concurrent package for actor scheduling rather than some random version of the Fork Join library.  That will likely address this issue.
 
what
steps do I need to make in order to move to LiftActor?

thanks

Tim




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

Timothy Perrett

unread,
Jul 9, 2009, 11:08:44 AM7/9/09
to Lift
> No.  The Lift Actor stuff is completely independent of the Scala Actor
> stuff.

This I understand of course.

> First, it looks like your app is 2.7.4, I'd suggest switching to 2.7.5.
> 2.7.5 using the java.util.concurrent package for actor scheduling rather
> than some random version of the Fork Join library.  That will likely address
> this issue.

Actually no, I already upgraded to 2.7.5... Looking at it I had a
dependency on one of my custom libs that was still 2.7.4.

Generally speaking however, to use the lift actor implementation its
just a case of:

import _root_.net.liftweb.actor.LiftActor

object MyActor extends LiftActor {
....
}

Is that right? Meaning there is zero dependency on the main
scala.actors lib...?

Cheers, Tim

David Pollak

unread,
Jul 9, 2009, 11:31:50 AM7/9/09
to lif...@googlegroups.com

There is no common code between the Lift Actor lib and the Scala Actor lib.
 


Cheers, Tim

Reply all
Reply to author
Forward
0 new messages