app w/ quartzite hangs, complains about slf4j

46 views
Skip to first unread message

ja...@decomplecting.org

unread,
Jan 4, 2013, 1:55:01 PM1/4/13
to clojure...@googlegroups.com
Hey,

I'm new to quartzite and I'm trying to get a sample app working based on the examples in the docs. Here's the code I'm working with:

(ns acedia.scheduler
  (:require [clojurewerkz.quartzite.scheduler :as qs]
            [clojurewerkz.quartzite.triggers :as t]
            [clojurewerkz.quartzite.jobs :as j])
  (:use [clojurewerkz.quartzite.jobs :only [defjob]]
        [clojurewerkz.quartzite.schedule.simple :only [schedule with-repeat-count with-interval-in-milliseconds]]))



(defjob NoOpJob
  [ctx]
  (comment "Does nothing")
  (spit "test.txt" "test"))

(defn run []
  (qs/initialize)
  (qs/start)
  (let [
    job (j/build
          (j/of-type NoOpJob)
          (j/using-job-data {:id "123"})
          (j/with-identity (j/key "jobs.noop.1")))
    trigger (t/build
              (t/with-identity (t/key "triggers.1"))
              (t/start-now)
              (t/with-schedule (schedule
                                  (with-repeat-count 10)
                                  (with-interval-in-milliseconds 200))))]
  (qs/schedule job trigger)))

When I execute with `lein run`, the program compiles and launches, but I get the following error:

[11:36][~/code/cronic]$ lein run
Compiling cronic.core
Hello, World!
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
#inst "2013-01-04T16:45:08.198-00:00"

The SLF4J docs seem to indicate this shouldn't be a huge issue, it just defaults to no-op logger. But after this, the program hangs and the scheduled job never executes.

Any ideas?

Thanks,

Jason

ja...@decomplecting.org

unread,
Jan 4, 2013, 2:05:42 PM1/4/13
to clojure...@googlegroups.com
Update - definitely not the SLF4J issue - added [org.slf4j/slf4j-nop "1.7.2"] to project.clj, took care of warnings, but my job still isn't executing and the program just hangs.

Jason

ja...@decomplecting.org

unread,
Jan 4, 2013, 4:00:08 PM1/4/13
to clojure...@googlegroups.com
Oops... Apparently I had the same issue as Luis Reyes in another thread... I had (j/using-job-data {:id "123"}) in my schedule as per the examples, and as soon as I commented out that out it started working.

Not sure why, but since that wasn't really necessary anyhow, I can worry about that later :)

Thanks,
Jason

Michael Klishin

unread,
Jan 5, 2013, 12:28:23 PM1/5/13
to clojure...@googlegroups.com

I had (j/using-job-data {:id "123"}) in my schedule as per the examples, and as soon as I commented out that out it started working.


My guess is that job details map currently only can use string keys.
--
MK

http://github.com/michaelklishin
http://twitter.com/michaelklishin
Reply all
Reply to author
Forward
0 new messages