Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing dependencies #2

Closed
hookercookerman opened this issue Feb 13, 2015 · 22 comments
Closed

Missing dependencies #2

hookercookerman opened this issue Feb 13, 2015 · 22 comments

Comments

@hookercookerman
Copy link

hi there great article BTW

Could not find artifact prismatic:schema:jar:0.3.8-SNAPSHOT in clojars (https://clojars.org/repo/)
Could not find artifact com.datomic:datomic-pro:jar:0.9.5130 in central (https://repo1.maven.org/maven2/)
Could not find artifact com.datomic:datomic-pro:jar:0.9.5130 in clojars (https://clojars.org/repo/)
Could not find artifact yuppiechef:onyx-dynamodb:jar:0.5.0 in central (https://repo1.maven.org/maven2/)
Could not find artifact yuppiechef:onyx-dynamodb:jar:0.5.0 in clojars (https://clojars.org/repo/)

@CmdrDats
Copy link
Contributor

Hi, thanks!

Sorry about that:

  • You may need to git clone https://github.com/Prismatic/schema.git and run lein install on it. 0.3.8 is required for the new UUID coercion implementation and they haven't deployed that yet.
  • You'll need to change datomic-pro to datomic-free in the project.clj or sign up for a free starter pro license at http://my.datomic.com and follow the instructions to add the datomic repo to your ~/.lein/profiles.clj
  • I've deployed the onyx-dynamodb 0.5.0, so that should work now :)

Let me know if there's anything else I can assist with!

@hookercookerman
Copy link
Author

all good also added datomic repository

:repositories  {"my.datomic.com"  {:url  "https://my.datomic.com/repo" :creds :gpg}}

so I can build now all good no errors.

however starting repl I get; any ideas; thanks again

SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/Users/hookercookerman/.m2/repository/org/slf4j/slf4j-log4j12/1.6.1/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/Users/hookercookerman/.m2/repository/org/slf4j/slf4j-nop/1.7.5/slf4j-nop-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
#<CompilerException java.io.FileNotFoundException: Could not locate schema/core__init.class or schema/core.clj on classpath: , compiling:(cqrs_server/core.clj:1:1)>

@CmdrDats
Copy link
Contributor

wow, odd. Try a lein clean then lein repl?

otherwise try link it to checkouts (in the project folder):

mkdir checkouts
cd checkouts
ln -s /path/to/prismatic/schema/clone
cd ..
lein clean
lein repl

@hookercookerman
Copy link
Author

thanks for the help; soz but same problem remains. I will try a few things

@CmdrDats
Copy link
Contributor

ai, I'm sorry - I tried a clean clone on my machine and I can't replicate this :(

The radical alternative is to remove prismatic/schema as a dep and simply make the validation step a no-op? that way you can at least get going.

@jackdempsey
Copy link

Same thing here FWIW:

 ~/cqrs-tester/cqrs-server master > lein clean
 ~/cqrs-tester/cqrs-server master > lein repl
CompilerException java.io.FileNotFoundException: Could not locate schema/core__init.class or schema/core.clj on classpath: , compiling:(cqrs_server/core.clj:1:1)

The above came after trying the clean checkout schema suggestion.

How would we make the validation a no-op?

i.e. when I simply comment out the schema dep I get:

cqrs-server.core=> (start)

ClassNotFoundException org.apache.http.protocol.HttpContext  java.net.URLClassLoader$1.run (URLClassLoader.java:372)

update:

I was able to get to setup complete with the following changes:

diff --git a/project.clj b/project.clj
index 56f54f2..a9b2366 100644
--- a/project.clj
+++ b/project.clj
@@ -5,9 +5,7 @@
             :url "http://www.eclipse.org/legal/epl-v10.html"}
   :dependencies
   [[org.clojure/clojure "1.6.0"]
-   [prismatic/schema "0.3.8-SNAPSHOT"]
    [danlentz/clj-uuid "0.0.7-SNAPSHOT"]
-
    [zookeeper-clj "0.9.3"]
    [org.slf4j/slf4j-api "1.7.7"]
    [org.clojure/data.json "0.2.3"]
@@ -15,10 +13,11 @@
    [com.mdrogalis/onyx "0.5.0"]
    [com.mdrogalis/onyx-core-async "0.5.0"]
    [commons-codec "1.7"]
-   [com.datomic/datomic-pro "0.9.5130" :exclusions [org.slf4j/slf4j-nop org.slf4j/log4j-over-slf4j joda-time]]
+   [com.datomic/datomic-free "0.9.5130" :exclusions [org.slf4j/slf4j-nop org.slf4j/log4j-over-slf4j joda-time]]
    [datomic-schema "1.2.1"]
    [org.clojure/core.async "0.1.346.0-17112a-alpha"]
    [criterium "0.4.3"]
+   [clj-http "1.0.1"]
    [yuppiechef/onyx-dynamodb "0.5.0"]
    [com.taoensso/faraday "1.5.0" :exclusions [org.clojure/clojure]]
    [com.mdrogalis/onyx-datomic "0.5.0"]
@@ -30,3 +29,5 @@
   :repl-options
   {:init-ns cqrs-server.core}
   :main cqrs-server.core)
+
+   ;[prismatic/schema "0.3.8-SNAPSHOT"]
diff --git a/src/cqrs_server/module.clj b/src/cqrs_server/module.clj
index 39f9653..6b0c9dd 100644
--- a/src/cqrs_server/module.clj
+++ b/src/cqrs_server/module.clj
@@ -30,11 +30,11 @@

 ;; Command validation

-(cqrs/install-commands
-  {:user/register {:name s/Str :age s/Int}
-   :user/update-email {:uuid s/Uuid :email s/Str}
-   :user/disable {:uuid s/Uuid}
-   :user/pageview {:uuid s/Uuid :url s/Str :render-time s/Int}})
+;(cqrs/install-commands
+  ;{:user/register {:name s/Str :age s/Int}
+   ;:user/update-email {:uuid s/Uuid :email s/Str}
+   ;:user/disable {:uuid s/Uuid}
+   ;:user/pageview {:uuid s/Uuid :url s/Str :render-time s/Int}})

@CmdrDats
Copy link
Contributor

Thanks for the diff @jackdempsey - You'd probably need a tweak in the cqrs.clj as well? It should be a matter of tweaking the validation function out.

Again, apologies - I'll be able to look into this more carefully in the coming week

@jackdempsey
Copy link

Cool, glad to help even a little. Unfortunately when I started running things like register user, the event was tracked but the user didn't seem to make it.

This is less an issue and more question, but since we're here: when things go wrong, as they always do, would you worry about this many pieces and their coordination making things more difficult to debug? Or do you think that part is easier, but keeping everything running perfectly is more the challenge?

One of the hardest things to do is determine the right level of abstraction, complexity, and splitting apart of components, and without having a lot of experience with any of these pieces, intuitively I'd wonder if incidental complexity created with this sort of setup is manageable because once it's set and understood it pretty much doesn't break?

You can probably tell at this point I'm working with something on the other side of things that's fairly simple but likely needs to be rewritten to run in a system more like this example. Thanks for any thoughts you can share from your experiences!

@Folcon
Copy link

Folcon commented Feb 15, 2015

Hey guys, really interested in the project and was trying to get it setup properly. I managed to work out why prismatic/schema isn't working.

You can't just run lein install on it. Because it's a cljx project. You're jar file will only contain macros.clj. You need to call lein cljx once followed by lein do pom, jar, install to get it to install properly.

However, I currently can't get datomic to say it's recorded anything. Am I still missing something?

cqrs-server.core=> (start)
"Setup complete"
cqrs-server.core=> (send-command :user/register {:name "Bob" :age 31})
nil
cqrs-server.core=> (d/q '[:find [?e ...] :where [?e :user/name]] (d/db (d/connect datomic-uri)))
[]
cqrs-server.core=> (d/q '[:find ?tx ?tx-time ?v :in $ ?e ?a :where [?e ?a ?v ?tx _][?tx :db/txInstant ?tx-time]] (d/history (d/db (d/connect datomic-uri))) 2000 :db/doc)
#{}
cqrs-server.core=> (far/scan dynamodb-cred :events)
[{:date 1424021216065N, :data #<byte[] [B@76bc7083>, :basis-t 1000N, :id "51e650fe-a39f-5e48-a1a0-95ca61a22842", :type "user/registered"}]

@jackdempsey
Copy link

That was my issue as well and I don't know datomic well enough to dice
further. Thanks for the notes!
On Sun, Feb 15, 2015 at 9:28 AM Folcon notifications@github.com wrote:

Hey guys, really interested in the project and was trying to get it setup
properly. I managed to work out why prismatic/schema isn't working.

You can't just run lein install on it. Because it's a cljx project.
You're jar file will only contain macros.clj. You need to call lein cljx
once followed by lein do pom, jar, install to get it to install properly.

However, I currently can't get datomic to say it's recorded anything. Am I
still missing something?

cqrs-server.core=> (start)
"Setup complete"
cqrs-server.core=> (send-command :user/register {:name "Bob" :age 31})
nil
cqrs-server.core=> (d/q '[:find [?e ...] :where [?e :user/name]](d/db %28d/connect datomic-uri%29))
[]
cqrs-server.core=> (d/q '[:find ?tx ?tx-time ?v :in $ ?e ?a :where [?e ?a ?v ?tx _][?tx :db/txInstant ?tx-time]](d/history %28d/db %28d/connect datomic-uri%29%29) 2000 :db/doc)
#{}
cqrs-server.core=> (far/scan dynamodb-cred :events)
[{:date 1424021216065N, :data #<byte[] [B@76bc7083>, :basis-t 1000N, :id "51e650fe-a39f-5e48-a1a0-95ca61a22842", :type "user/registered"}]


Reply to this email directly or view it on GitHub
#2 (comment)
.

@Folcon
Copy link

Folcon commented Feb 15, 2015

Not a problem, I'm still poking it to see where it's failing, hopefully I can work out why datomic isn't recording anything.

@CmdrDats
Copy link
Contributor

Oh yes, @Folcon - I remember having that same cljx once issue while I was developing now.. ai. Should have made a note back then! Thanks :) I'll make a note of the deps in the main README

I'm seeing the same behaviour regarding the datomic recording - I'm looking into it and will let you know - I suspect it something fairly trivial missing.

@jackdempsey , regarding the debugging and problem solving - what I've found with this kind of setup is that you can test the pieces independently on a much smaller scale to make sure all your basic building blocks are solid. Currently, Onyx is pre-production ready (they're busy working hard on 0.6.0, which is much closer to production ready), so there's still some bit being ironed out.

But once you have the underlying system and all the pieces in place, they effectively disappear, and you can build your applications at a comfortable level of abstraction.

I always think of it like this - You need all the pieces, some systems just hide the bits from you. This system brings out all the pieces, which forces you to understand them all (as architect), but gives you a far more solid system down the line. Hope the kinda answers your concern?

@Folcon
Copy link

Folcon commented Feb 15, 2015

@CmdrDats No problem.

One thing I've noticed, is that I'm getting a lot of KeeperErrorCode's in zookeeper.

[2015-02-15 18:28:37,241] INFO Got user-level KeeperException when processing sessionid:0x14b8e68906c0019 type:create cxid:0x3 zxid:0x1af txntype:-1 reqpath:n/a Error Path:/consumers/onyx-consumer Error:KeeperErrorCode = NodeExists for /consumers/onyx-consumer (org.apache.zookeeper.server.PrepRequestProcessor)
[2015-02-15 18:28:37,241] INFO Got user-level KeeperException when processing sessionid:0x14b8e68906c0017 type:create cxid:0x3 zxid:0x1b0 txntype:-1 reqpath:n/a Error Path:/consumers/onyx-consumer Error:KeeperErrorCode = NodeExists for /consumers/onyx-consumer (org.apache.zookeeper.server.PrepRequestProcessor)
[2015-02-15 18:28:37,241] INFO Got user-level KeeperException when processing sessionid:0x14b8e68906c0018 type:create cxid:0x3 zxid:0x1b1 txntype:-1 reqpath:n/a Error Path:/consumers/onyx-consumer Error:KeeperErrorCode = NodeExists for /consumers/onyx-consumer (org.apache.zookeeper.server.PrepRequestProcessor)
[2015-02-15 18:28:37,242] INFO Got user-level KeeperException when processing sessionid:0x14b8e68906c001b type:create cxid:0x4 zxid:0x1b3 txntype:-1 reqpath:n/a Error Path:/consumers/onyx-consumer/ids Error:KeeperErrorCode = NodeExists for /consumers/onyx-consumer/ids (org.apache.zookeeper.server.PrepRequestProcessor)
[2015-02-15 18:28:37,242] INFO Got user-level KeeperException when processing sessionid:0x14b8e68906c0019 type:create cxid:0x4 zxid:0x1b4 txntype:-1 reqpath:n/a Error Path:/consumers/onyx-consumer/ids Error:KeeperErrorCode = NodeExists for /consumers/onyx-consumer/ids (org.apache.zookeeper.server.PrepRequestProcessor)
[2015-02-15 18:28:37,243] INFO Got user-level KeeperException when processing sessionid:0x14b8e68906c0017 type:create cxid:0x4 zxid:0x1b5 txntype:-1 reqpath:n/a Error Path:/consumers/onyx-consumer/ids Error:KeeperErrorCode = NodeExists for /consumers/onyx-consumer/ids (org.apache.zookeeper.server.PrepRequestProcessor)
[2015-02-15 18:28:37,243] INFO Got user-level KeeperException when processing sessionid:0x14b8e68906c0018 type:create cxid:0x4 zxid:0x1b6 txntype:-1 reqpath:n/a Error Path:/consumers/onyx-consumer/ids Error:KeeperErrorCode = NodeExists for /consumers/onyx-consumer/ids (org.apache.zookeeper.server.PrepRequestProcessor)
[2015-02-15 18:29:02,574] INFO Got user-level KeeperException when processing sessionid:0x14b8e68906c0000 type:setData cxid:0x33 zxid:0x1bc txntype:-1 reqpath:n/a Error Path:/config/topics/command-queue Error:KeeperErrorCode = NoNode for /config/topics/command-queue (org.apache.zookeeper.server.PrepRequestProcessor)
[2015-02-15 18:29:02,575] INFO Got user-level KeeperException when processing sessionid:0x14b8e68906c0000 type:create cxid:0x34 zxid:0x1bd txntype:-1 reqpath:n/a Error Path:/config/topics Error:KeeperErrorCode = NodeExists for /config/topics (org.apache.zookeeper.server.PrepRequestProcessor)
[2015-02-15 18:29:02,639] INFO Got user-level KeeperException when processing sessionid:0x14b8e68906c0000 type:create cxid:0x3d zxid:0x1c0 txntype:-1 reqpath:n/a Error Path:/brokers/topics/command-queue/partitions/0 Error:KeeperErrorCode = NoNode for /brokers/topics/command-queue/partitions/0 (org.apache.zookeeper.server.PrepRequestProcessor)
[2015-02-15 18:29:02,640] INFO Got user-level KeeperException when processing sessionid:0x14b8e68906c0000 type:create cxid:0x3e zxid:0x1c1 txntype:-1 reqpath:n/a Error Path:/brokers/topics/command-queue/partitions Error:KeeperErrorCode = NoNode for /brokers/topics/command-queue/partitions (org.apache.zookeeper.server.PrepRequestProcessor)
[2015-02-15 18:29:02,649] INFO Got user-level KeeperException when processing sessionid:0x14b8e68906c001b type:create cxid:0x24 zxid:0x1c5 txntype:-1 reqpath:n/a Error Path:/consumers/onyx-consumer/owners/command-queue Error:KeeperErrorCode = NoNode for /consumers/onyx-consumer/owners/command-queue (org.apache.zookeeper.server.PrepRequestProcessor)
[2015-02-15 18:29:02,650] INFO Got user-level KeeperException when processing sessionid:0x14b8e68906c001b type:create cxid:0x25 zxid:0x1c6 txntype:-1 reqpath:n/a Error Path:/consumers/onyx-consumer/owners Error:KeeperErrorCode = NoNode for /consumers/onyx-consumer/owners (org.apache.zookeeper.server.PrepRequestProcessor)
[2015-02-15 18:29:05,136] INFO Got user-level KeeperException when processing sessionid:0x14b8e68906c0000 type:setData cxid:0x4d zxid:0x1ca txntype:-1 reqpath:n/a Error Path:/config/topics/event-queue Error:KeeperErrorCode = NoNode for /config/topics/event-queue (org.apache.zookeeper.server.PrepRequestProcessor)
[2015-02-15 18:29:05,136] INFO Got user-level KeeperException when processing sessionid:0x14b8e68906c0000 type:create cxid:0x4e zxid:0x1cb txntype:-1 reqpath:n/a Error Path:/config/topics Error:KeeperErrorCode = NodeExists for /config/topics (org.apache.zookeeper.server.PrepRequestProcessor)
[2015-02-15 18:29:05,153] INFO Got user-level KeeperException when processing sessionid:0x14b8e68906c0000 type:create cxid:0x59 zxid:0x1ce txntype:-1 reqpath:n/a Error Path:/brokers/topics/event-queue/partitions/0 Error:KeeperErrorCode = NoNode for /brokers/topics/event-queue/partitions/0 (org.apache.zookeeper.server.PrepRequestProcessor)
[2015-02-15 18:29:05,154] INFO Got user-level KeeperException when processing sessionid:0x14b8e68906c0000 type:create cxid:0x5a zxid:0x1cf txntype:-1 reqpath:n/a Error Path:/brokers/topics/event-queue/partitions Error:KeeperErrorCode = NoNode for /brokers/topics/event-queue/partitions (org.apache.zookeeper.server.PrepRequestProcessor)
[2015-02-15 18:29:05,174] INFO Got user-level KeeperException when processing sessionid:0x14b8e68906c0017 type:create cxid:0x24 zxid:0x1d3 txntype:-1 reqpath:n/a Error Path:/consumers/onyx-consumer/owners/event-queue Error:KeeperErrorCode = NoNode for /consumers/onyx-consumer/owners/event-queue (org.apache.zookeeper.server.PrepRequestProcessor)
[2015-02-15 18:29:37,049] INFO Got user-level KeeperException when processing sessionid:0x14b8e68906c0017 type:setData cxid:0x29 zxid:0x1eb txntype:-1 reqpath:n/a Error Path:/consumers/onyx-consumer/offsets/event-queue/0 Error:KeeperErrorCode = NoNode for /consumers/onyx-consumer/offsets/event-queue/0 (org.apache.zookeeper.server.PrepRequestProcessor)
[2015-02-15 18:29:37,049] INFO Got user-level KeeperException when processing sessionid:0x14b8e68906c001b type:setData cxid:0x2d zxid:0x1ec txntype:-1 reqpath:n/a Error Path:/consumers/onyx-consumer/offsets/command-queue/0 Error:KeeperErrorCode = NoNode for /consumers/onyx-consumer/offsets/command-queue/0 (org.apache.zookeeper.server.PrepRequestProcessor)
[2015-02-15 18:29:37,050] INFO Got user-level KeeperException when processing sessionid:0x14b8e68906c0017 type:create cxid:0x2a zxid:0x1ed txntype:-1 reqpath:n/a Error Path:/consumers/onyx-consumer/offsets Error:KeeperErrorCode = NoNode for /consumers/onyx-consumer/offsets (org.apache.zookeeper.server.PrepRequestProcessor)
[2015-02-15 18:29:37,050] INFO Got user-level KeeperException when processing sessionid:0x14b8e68906c001b type:create cxid:0x2e zxid:0x1ee txntype:-1 reqpath:n/a Error Path:/consumers/onyx-consumer/offsets Error:KeeperErrorCode = NoNode for /consumers/onyx-consumer/offsets (org.apache.zookeeper.server.PrepRequestProcessor)
[2015-02-15 18:29:37,051] INFO Got user-level KeeperException when processing sessionid:0x14b8e68906c001b type:create cxid:0x2f zxid:0x1f0 txntype:-1 reqpath:n/a Error Path:/consumers/onyx-consumer/offsets Error:KeeperErrorCode = NodeExists for /consumers/onyx-consumer/offsets (org.apache.zookeeper.server.PrepRequestProcessor)

Is there some part of the setup that's missing? I'm running this on osx if that helps.

@CmdrDats
Copy link
Contributor

@Folcon ye, those are no problems - Zookeeper and Kafka are both somewhat noisy - one place that's particularly useful is checking the onyx.log under cqrs-server while you're running. I did find that I needed to checkout onyx and trim down the logging in the lifecycle.clj to make this feasible though :)

I've updated to onyx 0.5.2 and onyx-datomic 0.5.2 in the deps - This runs on mine with :

cqrs-server.core=> (start)
"Setup complete"
cqrs-server.core=> (send-command :user/register {:name "Bob" :age 31})
nil
cqrs-server.core=> (d/q '[:find [?e ...] :where [?e :user/name]] (d/db (d/connect datomic-uri)))
[17592186045422]

@Folcon
Copy link

Folcon commented Feb 15, 2015

Beautiful! Now works like a charm.

cqrs-server.core=> (start)
"Setup complete"
cqrs-server.core=> (send-command :user/register {:name "Bob" :age 31})
nil
cqrs-server.core=> (d/q '[:find [?e ...] :where [?e :user/name]] (d/db (d/connect datomic-uri)))
[17592186045422]
cqrs-server.core=> (far/scan dynamodb-cred :events)
[{:date 1424027953336N, :data #<byte[] [B@7cc3b9d8>, :basis-t 1000N, :id "cd0879db-8a6f-516d-88cb-369bf4553df9", :type "user/registered"}]
cqrs-server.core=> (map #(d/touch (d/entity (d/db (d/connect datomic-uri)) %)) (d/q '[:find [?e ...] :where [?e :user/name]] (d/db (d/connect datomic-uri))))
({:base/uuid #uuid "54e0f131-2323-4493-9522-a7b6afe6a37e", :user/age 31, :user/name "Bob", :user/status :user.status/active, :db/id 17592186045422})

Now to work out how to create my own commands ;)...

@jackdempsey
Copy link

Strange, FWIW, still nothing in datomic for me after a fresh clone, following updated Schema instructions:

 ~/cqrs-tester/cqrs-server master > lein repl
nREPL server started on port 56260 on host 127.0.0.1 - nrepl://127.0.0.1:56260
REPL-y 0.3.1
Clojure 1.6.0
    Docs: (doc function-name-here)
          (find-doc "part-of-name-here")
  Source: (source function-name-here)
 Javadoc: (javadoc java-object-or-class-here)
    Exit: Control+D or (exit) or (quit)
 Results: Stored in vars *1, *2, *3, an exception in *e

cqrs-server.core=> (start)
"Setup complete"
cqrs-server.core=> (send-command :user/register {:name "Bob" :age 31})
nil
cqrs-server.core=> (d/q '[:find [?e ...] :where [?e :user/name]] (d/db (d/connect datomic-uri)))
[]
cqrs-server.core=>

Will give a try another time perhaps.

And thanks for the thoughts @CmdrDats . I agree on the benefits of pieces being more apparent. The hard part (especially if you're introducing a new language on top of a new technology) is that you often don't know how good of a decision it is/was until months or more down the line :-)

I'll be curious to see how Onyx grows and is compared to Storm, as each time I try to do a bit with the latter I just get stuck in the weeds.

@CmdrDats
Copy link
Contributor

@jackdempsey Did you try the d/q again after a few seconds? It takes a few seconds to go through because of the batching in onyx. If you check your onyx.log, do you see anything related to datomic?

I'm sorry it's not working out at the moment, thanks for your patience and your feedback! If there's anything else I can do to help, please le me know

@jackdempsey
Copy link

I did wait, no luck, but the bit on checking out onyx log was useful:

onyx.log:datomic.impl.Exceptions$IllegalArgumentExceptionInfo:
:db.error/not-a-data-function Unable to resolve data function:
:idempotent-tx
onyx.log:2015-Feb-16 11:29:33 -0800 jacks-mbp WARN
[onyx.peer.task-lifecycle] -
java.util.concurrent.ExecutionException:
java.lang.IllegalArgumentException: :db.error/not-a-data-function Unable to
resolve data function: :idempotent-tx

Didn't even realize that log existed. My guess is that when this function's
fixed things will start working as it seems datomic related.

2015-Feb-16 11:31:54 -0800 jacks-mbp WARN [onyx.peer.task-lifecycle] -
         java.util.concurrent.ExecutionException:
java.lang.IllegalArgumentException: :db.error/not-a-data-function Unable to
resolve data function: :idempotent-tx
datomic.impl.Exceptions$IllegalArgumentExceptionInfo:
:db.error/not-a-data-function Unable to resolve data function:
:idempotent-tx
    data: {:db/error :db.error/not-a-data-function}
                                 datomic.error/arg
 error.clj:   57
                                 datomic.error/arg
 error.clj:   55
                  datomic.db.ProcessInpoint/inject
db.clj: 2246
                  datomic.db/with-tx/inject-all/fn
db.clj: 2424
                         clojure.core.protocols/fn
 protocols.clj:   79

Any idea why I'd see this but not you? This is a fresh/clean git clone.

On Sun, Feb 15, 2015 at 11:53 PM, CmdrDats notifications@github.com wrote:

@jackdempsey https://github.com/jackdempsey Did you try the d/q again
after a few seconds? It takes a few seconds to go through because of the
batching in onyx. If you check your onyx.log, do you see anything related
to datomic?

I'm sorry it's not working out at the moment, thanks for your patience and
your feedback! If there's anything else I can do to help, please le me know


Reply to this email directly or view it on GitHub
#2 (comment)
.

@CmdrDats
Copy link
Contributor

Ah - sorry for the pain - I had this same issue and found that I needed to add a feature to datomic-schema so that I can mix schema with transactor function. I had upversioned and deployed datomic-schema, but never upversioned the dependency from 1.2.1 to 1.2.2 in cqrs-server.

Note to self: be a lot more rigid in testing dependencies on release!

Anyhow - needless to say, I have pushed an update for the latest version of datomic-schema. Just pull the changes and let me know :)

@Folcon
Copy link

Folcon commented Feb 17, 2015

I've pulled your updates and my setup still seems ok.

@jackdempsey
Copy link

Woot!

At first I thought "still, no" but then waited another second and...success!

cqrs-server.core=> (send-command :user/register {:name "Bob" :age 31})
nil
cqrs-server.core=> (d/q '[:find [?e ...] :where [?e :user/name]] (d/db
(d/connect datomic-uri)))
[]
cqrs-server.core=> (d/q '[:find [?e ...] :where [?e :user/name]] (d/db
(d/connect datomic-uri)))
[17592186045422]

That datomic-schema update was definitely it. Thanks for sticking to
getting this completd. Now to figure out how the hell this all works :-)

On Mon, Feb 16, 2015 at 4:59 PM, Folcon notifications@github.com wrote:

I've pulled your updates and my setup still seems ok.


Reply to this email directly or view it on GitHub
#2 (comment)
.

@CmdrDats
Copy link
Contributor

Fantastic, enjoy! :) I'm going to close this issue now, but please feel free to fire any questions in my direction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants