This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-03-13
Channels
- # admin-announcements (1)
- # beginners (53)
- # boot (355)
- # braid-chat (4)
- # cider (15)
- # cljsjs (3)
- # clojure (88)
- # clojure-austin (1)
- # clojure-new-zealand (4)
- # clojure-russia (46)
- # clojure-uk (7)
- # clojurescript (61)
- # component (2)
- # cursive (3)
- # data-science (5)
- # datomic (6)
- # dirac (49)
- # editors (8)
- # emacs (15)
- # funcool (15)
- # jobs (1)
- # ldnclj (10)
- # melbourne (1)
- # off-topic (14)
- # om (61)
- # om-next (2)
- # onyx (32)
- # re-frame (28)
- # reagent (19)
- # test200 (1)
- # vim (3)
I meet a problem when I try to uberjar with :aot :all
:
java.lang.ClassNotFoundException: com.stuartsierra.component.Lifecycle
The code is something like:
clojure
(ns tunnel.datomic
(:require [datomic.api :as d]
[com.stuartsierra.component :as component]
[ :as io])
(:import datomic.Util))
(defrecord DatomicDatabase [uri schema initial-data connection]
component/Lifecycle
(start [component]
(d/create-database uri)
(let [c (d/connect uri)]
@(d/transact c schema)
@(d/transact c initial-data)
(assoc component :connection c)))
(stop [component]
(d/delete-database uri)
(assoc component :connection nil)))
(defn new-database [db-uri]
(DatomicDatabase.
db-uri
(first (Util/readAll (io/reader (io/resource "data/schema.edn"))))
(first (Util/readAll (io/reader (io/resource "data/initial.edn"))))
nil))