[Play 2.1.1 Scala] JNotify creates a bunch of "Error removing watch [xx]" where [xx] are numbers

312 views
Skip to first unread message

Todd O'Bryan

unread,
May 19, 2013, 9:13:50 PM5/19/13
to play-fr...@googlegroups.com
I'm on Kubuntu 12.04 and running console within my Play project gives:

Welcome to Scala version 2.10.1 (Java HotSpot(TM) 64-Bit
Server VM, Java 1.6.0_45).

The short version is that every time I stop the embedded server, I get
a few hundred lines of exception messages that all boil down to some
version of the following:

net.contentobjects.jnotify.linux.JNotifyException_linux: Error removing watch 12
at net.contentobjects.jnotify.linux.JNotify_linux.removeWatch(Unknown
Source)
at net.contentobjects.jnotify.linux.JNotifyAdapterLinux.unwatch(Unknown
Source)
at net.contentobjects.jnotify.linux.JNotifyAdapterLinux.removeWatch(Unknown
Source)
at net.contentobjects.jnotify.JNotify.removeWatch(Unknown Source)
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 sbt.PlayReloader$$anon$2$$anon$8.removeWatch(PlayReloader.scala:88)
...

This is the last one. I get errors for watches 8 through 11 before this one.

Is this something I should be concerned about, or should I just cover
my eyes and hope it gets fixed at some point?

Thanks!
Todd

KajMagnus

unread,
Aug 25, 2013, 5:29:32 PM8/25/13
to play-fr...@googlegroups.com
Hi Todd,

I have the same problem. Did you find any solution / workaround?

I'm also using Kubuntu 12.04, however, the problem happened also when I installed Play & my application in a Ubuntu Server 12.04 LTS virtual machine.
Currently I'm using Play 2.1.3 and Java version 1.7.0_25 and Scala 2.10.1.

***

Here's a Google Groups thread I created about this: (I was wrong in that thread when I said that "playOnStopped` does work in that new project", it just worked for a short while initially.)
In my case the error prevents a certain onPlayStopped() SBT task from running, which is rather annoying: it prevents me from killing a Grunt background process, so they accumulate.

Best regards,
Kaj-Magnus


(PS: The stack trace. I get perhaps 20 of these errors, when terminating the app with CTRL+D.

net.contentobjects.jnotify.linux.JNotifyException_linux: Error removing watch 119
 at net.contentobjects.jnotify.linux.JNotify_linux.removeWatch(Unknown Source)
 at net.contentobjects.jnotify.linux.JNotifyAdapterLinux.unwatch(Unknown Source)
 at net.contentobjects.jnotify.linux.JNotifyAdapterLinux.removeWatch(Unknown Source)
 at net.contentobjects.jnotify.JNotify.removeWatch(Unknown Source)
 at sun.reflect.GeneratedMethodAccessor29.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:606)
 at sbt.PlayReloader$$anon$2$$anon$8.removeWatch(PlayReloader.scala:88)
 at sun.reflect.GeneratedMethodAccessor28.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:606)
 at sbt.PlayReloader$$anon$2$$anonfun$clean$1.apply$mcVI$sp(PlayReloader.scala:196)
 at sbt.PlayReloader$$anon$2$$anonfun$clean$1.apply(PlayReloader.scala:196)
 at sbt.PlayReloader$$anon$2$$anonfun$clean$1.apply(PlayReloader.scala:196)
 at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:59)
 at scala.collection.immutable.List.foreach(List.scala:76)
 at sbt.PlayReloader$$anon$2.clean(PlayReloader.scala:196)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:606)
 at sbt.PlayCommands$$anonfun$53$$anonfun$55.apply(PlayCommands.scala:656)
 at sbt.PlayCommands$$anonfun$53$$anonfun$55.apply(PlayCommands.scala:507)
 at scala.Either$RightProjection.map(Either.scala:533)
 at sbt.PlayCommands$$anonfun$53.apply(PlayCommands.scala:507)
 at sbt.PlayCommands$$anonfun$53.apply(PlayCommands.scala:487)
 at sbt.Command$$anonfun$sbt$Command$$apply1$1$$anonfun$apply$6.apply(Command.scala:72)
 at sbt.Command$.process(Command.scala:90)
 at sbt.MainLoop$$anonfun$next$1$$anonfun$apply$1.apply(MainLoop.scala:71)
 at sbt.MainLoop$$anonfun$next$1$$anonfun$apply$1.apply(MainLoop.scala:71)
 at sbt.State$$anon$2.process(State.scala:170)
 at sbt.MainLoop$$anonfun$next$1.apply(MainLoop.scala:71)
 at sbt.MainLoop$$anonfun$next$1.apply(MainLoop.scala:71)
 at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:18)
 at sbt.MainLoop$.next(MainLoop.scala:71)
 at sbt.MainLoop$.run(MainLoop.scala:64)
 at sbt.MainLoop$$anonfun$runWithNewLog$1.apply(MainLoop.scala:53)
 at sbt.MainLoop$$anonfun$runWithNewLog$1.apply(MainLoop.scala:50)
 at sbt.Using.apply(Using.scala:25)
 at sbt.MainLoop$.runWithNewLog(MainLoop.scala:50)
 at sbt.MainLoop$.runAndClearLast(MainLoop.scala:33)
 at sbt.MainLoop$.runLoggedLoop(MainLoop.scala:17)
 at sbt.MainLoop$.runLogged(MainLoop.scala:13)
 at sbt.xMain.run(Main.scala:26)
 at xsbt.boot.Launch$.run(Launch.scala:55)
 at xsbt.boot.Launch$$anonfun$explicit$1.apply(Launch.scala:45)
 at xsbt.boot.Launch$.launch(Launch.scala:69)
 at xsbt.boot.Launch$.apply(Launch.scala:16)
 at xsbt.boot.Boot$.runImpl(Boot.scala:31)
 at xsbt.boot.Boot$.main(Boot.scala:20)
 at xsbt.boot.Boot.main(Boot.scala)
)

Timo Hirt

unread,
Dec 5, 2013, 3:48:09 AM12/5/13
to play-fr...@googlegroups.com
Same problem here with ubuntu 13.10. Is there any solution?


On Monday, May 20, 2013 3:13:50 AM UTC+2, Todd O'Bryan wrote:

virtualeyes

unread,
May 13, 2014, 1:48:41 PM5/13/14
to play-fr...@googlegroups.com
> Same problem here with ubuntu 13.10. Is there any solution?

There is.

While try/catching this method call in Player Reloader.scala is for some reason uncatchable (maybe due to lazy val + outer try/catch), adding an empty print statement before the method call suppresses the stack trace.

Far better than being faced with a benign but gruesome stack trace everytime you ctrl-d out of ~run ;-)
Reply all
Reply to author
Forward
0 new messages