Discussion:
string tempids don't always seem to work
(too old to reply)
Mykola Rozhok
2016-12-04 12:01:00 UTC
Permalink
Hi guys,

Some fantastic updates in Datomic 0.9.5530!
However, the string tempids don't always seem to work for me.
As a basic example, this transaction:

[

;; a partition
{:db/id "a"
:db/ident :db.part/a}
[:db/add :db.part/db :db.install/partition "a"]

;; b partition
{:db/id "b"
:db/ident :db.part/b}
[:db/add :db.part/db :db.install/partition "b"]

]

(slurp)ed from a file and sent through (read-string ...) and then into the
transactor via (datomic.api/transact ...), throws the following exception:

Exception in thread "main" java.util.concurrent.ExecutionException:
java.lang.IllegalArgumentException: :db.error/tempid-not-an-entity tempid
used only as value in transaction,
compiling:(/private/var/folders/rl/8pck6b653gj5vmp25vqtg32h0000gn/T/form-init7020203088859753920.clj:1:125)

at clojure.lang.Compiler.load(Compiler.java:7442)

at clojure.lang.Compiler.loadFile(Compiler.java:7368)

at clojure.main$load_script.invokeStatic(main.clj:277)

at clojure.main$init_opt.invokeStatic(main.clj:279)

at clojure.main$init_opt.invoke(main.clj:279)

at clojure.main$initialize.invokeStatic(main.clj:310)

at clojure.main$null_opt.invokeStatic(main.clj:344)

at clojure.main$null_opt.invoke(main.clj:341)

at clojure.main$main.invokeStatic(main.clj:423)

at clojure.main$main.doInvoke(main.clj:386)

at clojure.lang.RestFn.applyTo(RestFn.java:137)

at clojure.lang.Var.applyTo(Var.java:700)

at clojure.main.main(main.java:37)

Caused by: java.util.concurrent.ExecutionException:
java.lang.IllegalArgumentException: :db.error/tempid-not-an-entity tempid
used only as value in transaction

at
datomic.promise$throw_executionexception_if_throwable.invokeStatic(promise.clj:10)

at
datomic.promise$throw_executionexception_if_throwable.invoke(promise.clj:6)

at datomic.promise$settable_future$reify__4437.deref(promise.clj:54)

at clojure.core$deref.invokeStatic(core.clj:2310)

at clojure.core$deref.invoke(core.clj:2296)

at tinetree.tools.freshdb$_main.invokeStatic(freshdb.clj:11)

at tinetree.tools.freshdb$_main.doInvoke(freshdb.clj:5)

at clojure.lang.RestFn.invoke(RestFn.java:397)

at clojure.lang.Var.invoke(Var.java:375)

at user$eval15.invokeStatic(form-init7020203088859753920.clj:1)

at user$eval15.invoke(form-init7020203088859753920.clj:1)

at clojure.lang.Compiler.eval(Compiler.java:6978)

at clojure.lang.Compiler.eval(Compiler.java:6968)

at clojure.lang.Compiler.load(Compiler.java:7430)

... 12 more

Caused by: java.lang.IllegalArgumentException:
:db.error/tempid-not-an-entity tempid used only as value in transaction

at datomic.error$deserialize_exception.invokeStatic(error.clj:124)

at datomic.error$deserialize_exception.invoke(error.clj:117)

at datomic.peer.Connection.notify_error(peer.clj:400)

at datomic.connector$fn__7364.invokeStatic(connector.clj:169)

at datomic.connector$fn__7364.invoke(connector.clj:167)

at clojure.lang.MultiFn.invoke(MultiFn.java:233)

at
datomic.connector$create_hornet_notifier$fn__7370$fn__7371$fn__7374$fn__7375.invoke(connector.clj:194)

at
datomic.connector$create_hornet_notifier$fn__7370$fn__7371$fn__7374.invoke(connector.clj:189)

at
datomic.connector$create_hornet_notifier$fn__7370$fn__7371.invoke(connector.clj:187)

at clojure.core$binding_conveyor_fn$fn__6772.invoke(core.clj:2020)

at clojure.lang.AFn.call(AFn.java:18)

at java.util.concurrent.FutureTask.run(FutureTask.java:266)

at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

at java.lang.Thread.run(Thread.java:745)

I get similar exceptions (in a seemingly random fashion) when I actually
try to load some seed data from a file as well (after loading the schema of
course). Same idea - a certain tempid has a valid bunch of facts stated
about it, and then when another entity's :db.type/ref attribute tries to
use the tempid in the same transaction, it throws the exception.

Any guidance would be really appreciated, as I have spent a few days and
nights trying to figure this out now :)


Many thanks,
Mykola
--
You received this message because you are subscribed to the Google Groups "Datomic" group.
To unsubscribe from this group and stop receiving emails from it, send an email to datomic+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Jaret Binford
2016-12-05 01:25:55 UTC
Permalink
Mykola,

I was able to reproduce the error. You aren't doing anything wrong here.
Looks like we will need to fix this in an upcoming release. I will update
as soon as we have more information.

Thanks,
Jaret
Post by Mykola Rozhok
Hi guys,
Some fantastic updates in Datomic 0.9.5530!
However, the string tempids don't always seem to work for me.
[
;; a partition
{:db/id "a"
:db/ident :db.part/a}
[:db/add :db.part/db :db.install/partition "a"]
;; b partition
{:db/id "b"
:db/ident :db.part/b}
[:db/add :db.part/db :db.install/partition "b"]
]
(slurp)ed from a file and sent through (read-string ...) and then into the
java.lang.IllegalArgumentException: :db.error/tempid-not-an-entity tempid
used only as value in transaction,
compiling:(/private/var/folders/rl/8pck6b653gj5vmp25vqtg32h0000gn/T/form-init7020203088859753920.clj:1:125)
at clojure.lang.Compiler.load(Compiler.java:7442)
at clojure.lang.Compiler.loadFile(Compiler.java:7368)
at clojure.main$load_script.invokeStatic(main.clj:277)
at clojure.main$init_opt.invokeStatic(main.clj:279)
at clojure.main$init_opt.invoke(main.clj:279)
at clojure.main$initialize.invokeStatic(main.clj:310)
at clojure.main$null_opt.invokeStatic(main.clj:344)
at clojure.main$null_opt.invoke(main.clj:341)
at clojure.main$main.invokeStatic(main.clj:423)
at clojure.main$main.doInvoke(main.clj:386)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.lang.Var.applyTo(Var.java:700)
at clojure.main.main(main.java:37)
java.lang.IllegalArgumentException: :db.error/tempid-not-an-entity tempid
used only as value in transaction
at
datomic.promise$throw_executionexception_if_throwable.invokeStatic(promise.clj:10)
at
datomic.promise$throw_executionexception_if_throwable.invoke(promise.clj:6)
at datomic.promise$settable_future$reify__4437.deref(promise.clj:54)
at clojure.core$deref.invokeStatic(core.clj:2310)
at clojure.core$deref.invoke(core.clj:2296)
at tinetree.tools.freshdb$_main.invokeStatic(freshdb.clj:11)
at tinetree.tools.freshdb$_main.doInvoke(freshdb.clj:5)
at clojure.lang.RestFn.invoke(RestFn.java:397)
at clojure.lang.Var.invoke(Var.java:375)
at user$eval15.invokeStatic(form-init7020203088859753920.clj:1)
at user$eval15.invoke(form-init7020203088859753920.clj:1)
at clojure.lang.Compiler.eval(Compiler.java:6978)
at clojure.lang.Compiler.eval(Compiler.java:6968)
at clojure.lang.Compiler.load(Compiler.java:7430)
... 12 more
:db.error/tempid-not-an-entity tempid used only as value in transaction
at datomic.error$deserialize_exception.invokeStatic(error.clj:124)
at datomic.error$deserialize_exception.invoke(error.clj:117)
at datomic.peer.Connection.notify_error(peer.clj:400)
at datomic.connector$fn__7364.invokeStatic(connector.clj:169)
at datomic.connector$fn__7364.invoke(connector.clj:167)
at clojure.lang.MultiFn.invoke(MultiFn.java:233)
at
datomic.connector$create_hornet_notifier$fn__7370$fn__7371$fn__7374$fn__7375.invoke(connector.clj:194)
at
datomic.connector$create_hornet_notifier$fn__7370$fn__7371$fn__7374.invoke(connector.clj:189)
at
datomic.connector$create_hornet_notifier$fn__7370$fn__7371.invoke(connector.clj:187)
at clojure.core$binding_conveyor_fn$fn__6772.invoke(core.clj:2020)
at clojure.lang.AFn.call(AFn.java:18)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
I get similar exceptions (in a seemingly random fashion) when I actually
try to load some seed data from a file as well (after loading the schema of
course). Same idea - a certain tempid has a valid bunch of facts stated
about it, and then when another entity's :db.type/ref attribute tries to
use the tempid in the same transaction, it throws the exception.
Any guidance would be really appreciated, as I have spent a few days and
nights trying to figure this out now :)
Many thanks,
Mykola
--
You received this message because you are subscribed to the Google Groups "Datomic" group.
To unsubscribe from this group and stop receiving emails from it, send an email to datomic+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Mykola Rozhok
2016-12-05 18:43:59 UTC
Permalink
Many thanks Jaret!

The #db/id[... -n] tempids seem to work anyway - I'll use them instead
for now.


Regards,
Mykola
Post by Jaret Binford
Mykola,
I was able to reproduce the error. You aren't doing anything wrong here.
Looks like we will need to fix this in an upcoming release. I will update
as soon as we have more information.
Thanks,
Jaret
Post by Mykola Rozhok
Hi guys,
Some fantastic updates in Datomic 0.9.5530!
However, the string tempids don't always seem to work for me.
[
;; a partition
{:db/id "a"
:db/ident :db.part/a}
[:db/add :db.part/db :db.install/partition "a"]
;; b partition
{:db/id "b"
:db/ident :db.part/b}
[:db/add :db.part/db :db.install/partition "b"]
]
(slurp)ed from a file and sent through (read-string ...) and then into
the transactor via (datomic.api/transact ...), throws the following
java.lang.IllegalArgumentException: :db.error/tempid-not-an-entity tempid
used only as value in transaction,
compiling:(/private/var/folders/rl/8pck6b653gj5vmp25vqtg32h0000gn/T/form-init7020203088859753920.clj:1:125)
at clojure.lang.Compiler.load(Compiler.java:7442)
at clojure.lang.Compiler.loadFile(Compiler.java:7368)
at clojure.main$load_script.invokeStatic(main.clj:277)
at clojure.main$init_opt.invokeStatic(main.clj:279)
at clojure.main$init_opt.invoke(main.clj:279)
at clojure.main$initialize.invokeStatic(main.clj:310)
at clojure.main$null_opt.invokeStatic(main.clj:344)
at clojure.main$null_opt.invoke(main.clj:341)
at clojure.main$main.invokeStatic(main.clj:423)
at clojure.main$main.doInvoke(main.clj:386)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.lang.Var.applyTo(Var.java:700)
at clojure.main.main(main.java:37)
java.lang.IllegalArgumentException: :db.error/tempid-not-an-entity tempid
used only as value in transaction
at
datomic.promise$throw_executionexception_if_throwable.invokeStatic(promise.clj:10)
at
datomic.promise$throw_executionexception_if_throwable.invoke(promise.clj:6)
at datomic.promise$settable_future$reify__4437.deref(promise.clj:54)
at clojure.core$deref.invokeStatic(core.clj:2310)
at clojure.core$deref.invoke(core.clj:2296)
at tinetree.tools.freshdb$_main.invokeStatic(freshdb.clj:11)
at tinetree.tools.freshdb$_main.doInvoke(freshdb.clj:5)
at clojure.lang.RestFn.invoke(RestFn.java:397)
at clojure.lang.Var.invoke(Var.java:375)
at user$eval15.invokeStatic(form-init7020203088859753920.clj:1)
at user$eval15.invoke(form-init7020203088859753920.clj:1)
at clojure.lang.Compiler.eval(Compiler.java:6978)
at clojure.lang.Compiler.eval(Compiler.java:6968)
at clojure.lang.Compiler.load(Compiler.java:7430)
... 12 more
:db.error/tempid-not-an-entity tempid used only as value in transaction
at datomic.error$deserialize_exception.invokeStatic(error.clj:124)
at datomic.error$deserialize_exception.invoke(error.clj:117)
at datomic.peer.Connection.notify_error(peer.clj:400)
at datomic.connector$fn__7364.invokeStatic(connector.clj:169)
at datomic.connector$fn__7364.invoke(connector.clj:167)
at clojure.lang.MultiFn.invoke(MultiFn.java:233)
at
datomic.connector$create_hornet_notifier$fn__7370$fn__7371$fn__7374$fn__7375.invoke(connector.clj:194)
at
datomic.connector$create_hornet_notifier$fn__7370$fn__7371$fn__7374.invoke(connector.clj:189)
at
datomic.connector$create_hornet_notifier$fn__7370$fn__7371.invoke(connector.clj:187)
at clojure.core$binding_conveyor_fn$fn__6772.invoke(core.clj:2020)
at clojure.lang.AFn.call(AFn.java:18)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
I get similar exceptions (in a seemingly random fashion) when I actually
try to load some seed data from a file as well (after loading the schema of
course). Same idea - a certain tempid has a valid bunch of facts stated
about it, and then when another entity's :db.type/ref attribute tries to
use the tempid in the same transaction, it throws the exception.
Any guidance would be really appreciated, as I have spent a few days and
nights trying to figure this out now :)
Many thanks,
Mykola
--
You received this message because you are subscribed to the Google Groups "Datomic" group.
To unsubscribe from this group and stop receiving emails from it, send an email to datomic+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Jaret Binford
2016-12-06 18:04:18 UTC
Permalink
Mykola,

We have resolved the tempid bug in release 0.9.5544.

https://groups.google.com/forum/#!topic/datomic/N2hMneocI-0

Thanks,
Jaret
Post by Mykola Rozhok
Many thanks Jaret!
The #db/id[... -n] tempids seem to work anyway - I'll use them instead
for now.
Regards,
Mykola
Post by Jaret Binford
Mykola,
I was able to reproduce the error. You aren't doing anything wrong here.
Looks like we will need to fix this in an upcoming release. I will update
as soon as we have more information.
Thanks,
Jaret
Post by Mykola Rozhok
Hi guys,
Some fantastic updates in Datomic 0.9.5530!
However, the string tempids don't always seem to work for me.
[
;; a partition
{:db/id "a"
:db/ident :db.part/a}
[:db/add :db.part/db :db.install/partition "a"]
;; b partition
{:db/id "b"
:db/ident :db.part/b}
[:db/add :db.part/db :db.install/partition "b"]
]
(slurp)ed from a file and sent through (read-string ...) and then into
the transactor via (datomic.api/transact ...), throws the following
java.lang.IllegalArgumentException: :db.error/tempid-not-an-entity tempid
used only as value in transaction,
compiling:(/private/var/folders/rl/8pck6b653gj5vmp25vqtg32h0000gn/T/form-init7020203088859753920.clj:1:125)
at clojure.lang.Compiler.load(Compiler.java:7442)
at clojure.lang.Compiler.loadFile(Compiler.java:7368)
at clojure.main$load_script.invokeStatic(main.clj:277)
at clojure.main$init_opt.invokeStatic(main.clj:279)
at clojure.main$init_opt.invoke(main.clj:279)
at clojure.main$initialize.invokeStatic(main.clj:310)
at clojure.main$null_opt.invokeStatic(main.clj:344)
at clojure.main$null_opt.invoke(main.clj:341)
at clojure.main$main.invokeStatic(main.clj:423)
at clojure.main$main.doInvoke(main.clj:386)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.lang.Var.applyTo(Var.java:700)
at clojure.main.main(main.java:37)
java.lang.IllegalArgumentException: :db.error/tempid-not-an-entity tempid
used only as value in transaction
at
datomic.promise$throw_executionexception_if_throwable.invokeStatic(promise.clj:10)
at
datomic.promise$throw_executionexception_if_throwable.invoke(promise.clj:6)
at datomic.promise$settable_future$reify__4437.deref(promise.clj:54)
at clojure.core$deref.invokeStatic(core.clj:2310)
at clojure.core$deref.invoke(core.clj:2296)
at tinetree.tools.freshdb$_main.invokeStatic(freshdb.clj:11)
at tinetree.tools.freshdb$_main.doInvoke(freshdb.clj:5)
at clojure.lang.RestFn.invoke(RestFn.java:397)
at clojure.lang.Var.invoke(Var.java:375)
at user$eval15.invokeStatic(form-init7020203088859753920.clj:1)
at user$eval15.invoke(form-init7020203088859753920.clj:1)
at clojure.lang.Compiler.eval(Compiler.java:6978)
at clojure.lang.Compiler.eval(Compiler.java:6968)
at clojure.lang.Compiler.load(Compiler.java:7430)
... 12 more
:db.error/tempid-not-an-entity tempid used only as value in transaction
at datomic.error$deserialize_exception.invokeStatic(error.clj:124)
at datomic.error$deserialize_exception.invoke(error.clj:117)
at datomic.peer.Connection.notify_error(peer.clj:400)
at datomic.connector$fn__7364.invokeStatic(connector.clj:169)
at datomic.connector$fn__7364.invoke(connector.clj:167)
at clojure.lang.MultiFn.invoke(MultiFn.java:233)
at
datomic.connector$create_hornet_notifier$fn__7370$fn__7371$fn__7374$fn__7375.invoke(connector.clj:194)
at
datomic.connector$create_hornet_notifier$fn__7370$fn__7371$fn__7374.invoke(connector.clj:189)
at
datomic.connector$create_hornet_notifier$fn__7370$fn__7371.invoke(connector.clj:187)
at clojure.core$binding_conveyor_fn$fn__6772.invoke(core.clj:2020)
at clojure.lang.AFn.call(AFn.java:18)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
I get similar exceptions (in a seemingly random fashion) when I actually
try to load some seed data from a file as well (after loading the schema of
course). Same idea - a certain tempid has a valid bunch of facts stated
about it, and then when another entity's :db.type/ref attribute tries to
use the tempid in the same transaction, it throws the exception.
Any guidance would be really appreciated, as I have spent a few days and
nights trying to figure this out now :)
Many thanks,
Mykola
--
You received this message because you are subscribed to the Google Groups "Datomic" group.
To unsubscribe from this group and stop receiving emails from it, send an email to datomic+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Mykola Rozhok
2016-12-06 20:24:40 UTC
Permalink
Oh wow, you guys are fast!

Just tried 0.9.5544 with my string tempids - works great.


Many thanks Jaret,
Mykola
Post by Jaret Binford
Mykola,
We have resolved the tempid bug in release 0.9.5544.
https://groups.google.com/forum/#!topic/datomic/N2hMneocI-0
Thanks,
Jaret
Post by Mykola Rozhok
Many thanks Jaret!
The #db/id[... -n] tempids seem to work anyway - I'll use them
instead for now.
Regards,
Mykola
Post by Jaret Binford
Mykola,
I was able to reproduce the error. You aren't doing anything wrong here.
Looks like we will need to fix this in an upcoming release. I will update
as soon as we have more information.
Thanks,
Jaret
Post by Mykola Rozhok
Hi guys,
Some fantastic updates in Datomic 0.9.5530!
However, the string tempids don't always seem to work for me.
[
;; a partition
{:db/id "a"
:db/ident :db.part/a}
[:db/add :db.part/db :db.install/partition "a"]
;; b partition
{:db/id "b"
:db/ident :db.part/b}
[:db/add :db.part/db :db.install/partition "b"]
]
(slurp)ed from a file and sent through (read-string ...) and then into
the transactor via (datomic.api/transact ...), throws the following
java.lang.IllegalArgumentException: :db.error/tempid-not-an-entity tempid
used only as value in transaction,
compiling:(/private/var/folders/rl/8pck6b653gj5vmp25vqtg32h0000gn/T/form-init7020203088859753920.clj:1:125)
at clojure.lang.Compiler.load(Compiler.java:7442)
at clojure.lang.Compiler.loadFile(Compiler.java:7368)
at clojure.main$load_script.invokeStatic(main.clj:277)
at clojure.main$init_opt.invokeStatic(main.clj:279)
at clojure.main$init_opt.invoke(main.clj:279)
at clojure.main$initialize.invokeStatic(main.clj:310)
at clojure.main$null_opt.invokeStatic(main.clj:344)
at clojure.main$null_opt.invoke(main.clj:341)
at clojure.main$main.invokeStatic(main.clj:423)
at clojure.main$main.doInvoke(main.clj:386)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.lang.Var.applyTo(Var.java:700)
at clojure.main.main(main.java:37)
java.lang.IllegalArgumentException: :db.error/tempid-not-an-entity tempid
used only as value in transaction
at
datomic.promise$throw_executionexception_if_throwable.invokeStatic(promise.clj:10)
at
datomic.promise$throw_executionexception_if_throwable.invoke(promise.clj:6)
at datomic.promise$settable_future$reify__4437.deref(promise.clj:54)
at clojure.core$deref.invokeStatic(core.clj:2310)
at clojure.core$deref.invoke(core.clj:2296)
at tinetree.tools.freshdb$_main.invokeStatic(freshdb.clj:11)
at tinetree.tools.freshdb$_main.doInvoke(freshdb.clj:5)
at clojure.lang.RestFn.invoke(RestFn.java:397)
at clojure.lang.Var.invoke(Var.java:375)
at user$eval15.invokeStatic(form-init7020203088859753920.clj:1)
at user$eval15.invoke(form-init7020203088859753920.clj:1)
at clojure.lang.Compiler.eval(Compiler.java:6978)
at clojure.lang.Compiler.eval(Compiler.java:6968)
at clojure.lang.Compiler.load(Compiler.java:7430)
... 12 more
:db.error/tempid-not-an-entity tempid used only as value in transaction
at datomic.error$deserialize_exception.invokeStatic(error.clj:124)
at datomic.error$deserialize_exception.invoke(error.clj:117)
at datomic.peer.Connection.notify_error(peer.clj:400)
at datomic.connector$fn__7364.invokeStatic(connector.clj:169)
at datomic.connector$fn__7364.invoke(connector.clj:167)
at clojure.lang.MultiFn.invoke(MultiFn.java:233)
at
datomic.connector$create_hornet_notifier$fn__7370$fn__7371$fn__7374$fn__7375.invoke(connector.clj:194)
at
datomic.connector$create_hornet_notifier$fn__7370$fn__7371$fn__7374.invoke(connector.clj:189)
at
datomic.connector$create_hornet_notifier$fn__7370$fn__7371.invoke(connector.clj:187)
at clojure.core$binding_conveyor_fn$fn__6772.invoke(core.clj:2020)
at clojure.lang.AFn.call(AFn.java:18)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
I get similar exceptions (in a seemingly random fashion) when I
actually try to load some seed data from a file as well (after loading the
schema of course). Same idea - a certain tempid has a valid bunch of facts
stated about it, and then when another entity's :db.type/ref attribute
tries to use the tempid in the same transaction, it throws the exception.
Any guidance would be really appreciated, as I have spent a few days
and nights trying to figure this out now :)
Many thanks,
Mykola
--
You received this message because you are subscribed to the Google Groups "Datomic" group.
To unsubscribe from this group and stop receiving emails from it, send an email to datomic+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Brandon Bloom
2016-12-23 01:30:39 UTC
Permalink
I found one other place where string tempids are not support correctly:
Calls to d/entity in database functions. Tempid structures do work there.
See below:

;; Schema
[{:db/ident :foo/name
:db/valueType :db.type/string
:db/cardinality :db.cardinality/one}
{:db/ident :foo/ref
:db/valueType :db.type/ref
:db/cardinality :db.cardinality/one}
{:db/ident :myAdd
:db/fn #db/fn {:lang :clojure
:params [db e a v]
:code [[:db/add (:db/id (d/entity db e)) a v]]}}]

;; The other examples are indirectly this.
@(d/transact conn
[[:db/add "a" :foo/name "x"]
[:db/add "b" :foo/name "y"]
[:db/add "a" :foo/ref "b"]]))

;; Works! Note that d/entity resolves tempid.
(let [a (d/tempid :db.part/user)]
@(d/transact conn
[[:db/add a :foo/name "x"]
[:db/add "b" :foo/name "y"]
[:myAdd a :foo/ref "b"]]))

;; Fails with :db.error/not-a-keyword.
@(d/transact conn
[[:db/add "a" :foo/name "x"]
[:db/add "b" :foo/name "y"]
[:myAdd "a" :foo/ref "b"]])
Post by Mykola Rozhok
Oh wow, you guys are fast!
Just tried 0.9.5544 with my string tempids - works great.
Many thanks Jaret,
Mykola
Post by Jaret Binford
Mykola,
We have resolved the tempid bug in release 0.9.5544.
https://groups.google.com/forum/#!topic/datomic/N2hMneocI-0
Thanks,
Jaret
Post by Mykola Rozhok
Many thanks Jaret!
The #db/id[... -n] tempids seem to work anyway - I'll use them
instead for now.
Regards,
Mykola
Post by Jaret Binford
Mykola,
I was able to reproduce the error. You aren't doing anything wrong
here. Looks like we will need to fix this in an upcoming release. I will
update as soon as we have more information.
Thanks,
Jaret
Post by Mykola Rozhok
Hi guys,
Some fantastic updates in Datomic 0.9.5530!
However, the string tempids don't always seem to work for me.
[
;; a partition
{:db/id "a"
:db/ident :db.part/a}
[:db/add :db.part/db :db.install/partition "a"]
;; b partition
{:db/id "b"
:db/ident :db.part/b}
[:db/add :db.part/db :db.install/partition "b"]
]
(slurp)ed from a file and sent through (read-string ...) and then into
the transactor via (datomic.api/transact ...), throws the following
java.lang.IllegalArgumentException: :db.error/tempid-not-an-entity tempid
used only as value in transaction,
compiling:(/private/var/folders/rl/8pck6b653gj5vmp25vqtg32h0000gn/T/form-init7020203088859753920.clj:1:125)
at clojure.lang.Compiler.load(Compiler.java:7442)
at clojure.lang.Compiler.loadFile(Compiler.java:7368)
at clojure.main$load_script.invokeStatic(main.clj:277)
at clojure.main$init_opt.invokeStatic(main.clj:279)
at clojure.main$init_opt.invoke(main.clj:279)
at clojure.main$initialize.invokeStatic(main.clj:310)
at clojure.main$null_opt.invokeStatic(main.clj:344)
at clojure.main$null_opt.invoke(main.clj:341)
at clojure.main$main.invokeStatic(main.clj:423)
at clojure.main$main.doInvoke(main.clj:386)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.lang.Var.applyTo(Var.java:700)
at clojure.main.main(main.java:37)
java.lang.IllegalArgumentException: :db.error/tempid-not-an-entity tempid
used only as value in transaction
at
datomic.promise$throw_executionexception_if_throwable.invokeStatic(promise.clj:10)
at
datomic.promise$throw_executionexception_if_throwable.invoke(promise.clj:6)
at datomic.promise$settable_future$reify__4437.deref(promise.clj:54)
at clojure.core$deref.invokeStatic(core.clj:2310)
at clojure.core$deref.invoke(core.clj:2296)
at tinetree.tools.freshdb$_main.invokeStatic(freshdb.clj:11)
at tinetree.tools.freshdb$_main.doInvoke(freshdb.clj:5)
at clojure.lang.RestFn.invoke(RestFn.java:397)
at clojure.lang.Var.invoke(Var.java:375)
at user$eval15.invokeStatic(form-init7020203088859753920.clj:1)
at user$eval15.invoke(form-init7020203088859753920.clj:1)
at clojure.lang.Compiler.eval(Compiler.java:6978)
at clojure.lang.Compiler.eval(Compiler.java:6968)
at clojure.lang.Compiler.load(Compiler.java:7430)
... 12 more
:db.error/tempid-not-an-entity tempid used only as value in transaction
at datomic.error$deserialize_exception.invokeStatic(error.clj:124)
at datomic.error$deserialize_exception.invoke(error.clj:117)
at datomic.peer.Connection.notify_error(peer.clj:400)
at datomic.connector$fn__7364.invokeStatic(connector.clj:169)
at datomic.connector$fn__7364.invoke(connector.clj:167)
at clojure.lang.MultiFn.invoke(MultiFn.java:233)
at
datomic.connector$create_hornet_notifier$fn__7370$fn__7371$fn__7374$fn__7375.invoke(connector.clj:194)
at
datomic.connector$create_hornet_notifier$fn__7370$fn__7371$fn__7374.invoke(connector.clj:189)
at
datomic.connector$create_hornet_notifier$fn__7370$fn__7371.invoke(connector.clj:187)
at clojure.core$binding_conveyor_fn$fn__6772.invoke(core.clj:2020)
at clojure.lang.AFn.call(AFn.java:18)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
I get similar exceptions (in a seemingly random fashion) when I
actually try to load some seed data from a file as well (after loading the
schema of course). Same idea - a certain tempid has a valid bunch of facts
stated about it, and then when another entity's :db.type/ref attribute
tries to use the tempid in the same transaction, it throws the exception.
Any guidance would be really appreciated, as I have spent a few days
and nights trying to figure this out now :)
Many thanks,
Mykola
--
You received this message because you are subscribed to the Google Groups "Datomic" group.
To unsubscribe from this group and stop receiving emails from it, send an email to datomic+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Jaret Binford
2016-12-23 13:56:20 UTC
Permalink
Brandon,

Are you using 0.9.5544? I am traveling and I'll try this later today.

Thanks,
Jaret
Post by Brandon Bloom
Calls to d/entity in database functions. Tempid structures do work there.
;; Schema
[{:db/ident :foo/name
:db/valueType :db.type/string
:db/cardinality :db.cardinality/one}
{:db/ident :foo/ref
:db/valueType :db.type/ref
:db/cardinality :db.cardinality/one}
{:db/ident :myAdd
:db/fn #db/fn {:lang :clojure
:params [db e a v]
:code [[:db/add (:db/id (d/entity db e)) a v]]}}]
;; The other examples are indirectly this.
@(d/transact conn
[[:db/add "a" :foo/name "x"]
[:db/add "b" :foo/name "y"]
[:db/add "a" :foo/ref "b"]]))
;; Works! Note that d/entity resolves tempid.
(let [a (d/tempid :db.part/user)]
@(d/transact conn
[[:db/add a :foo/name "x"]
[:db/add "b" :foo/name "y"]
[:myAdd a :foo/ref "b"]]))
;; Fails with :db.error/not-a-keyword.
@(d/transact conn
[[:db/add "a" :foo/name "x"]
[:db/add "b" :foo/name "y"]
[:myAdd "a" :foo/ref "b"]])
Post by Mykola Rozhok
Oh wow, you guys are fast!
Just tried 0.9.5544 with my string tempids - works great.
Many thanks Jaret,
Mykola
Post by Jaret Binford
Mykola,
We have resolved the tempid bug in release 0.9.5544.
https://groups.google.com/forum/#!topic/datomic/N2hMneocI-0
Thanks,
Jaret
Post by Mykola Rozhok
Many thanks Jaret!
The #db/id[... -n] tempids seem to work anyway - I'll use them
instead for now.
Regards,
Mykola
Post by Jaret Binford
Mykola,
I was able to reproduce the error. You aren't doing anything wrong
here. Looks like we will need to fix this in an upcoming release. I will
update as soon as we have more information.
Thanks,
Jaret
Post by Mykola Rozhok
Hi guys,
Some fantastic updates in Datomic 0.9.5530!
However, the string tempids don't always seem to work for me.
[
;; a partition
{:db/id "a"
:db/ident :db.part/a}
[:db/add :db.part/db :db.install/partition "a"]
;; b partition
{:db/id "b"
:db/ident :db.part/b}
[:db/add :db.part/db :db.install/partition "b"]
]
(slurp)ed from a file and sent through (read-string ...) and then
into the transactor via (datomic.api/transact ...), throws the following
java.lang.IllegalArgumentException: :db.error/tempid-not-an-entity tempid
used only as value in transaction,
compiling:(/private/var/folders/rl/8pck6b653gj5vmp25vqtg32h0000gn/T/form-init7020203088859753920.clj:1:125)
at clojure.lang.Compiler.load(Compiler.java:7442)
at clojure.lang.Compiler.loadFile(Compiler.java:7368)
at clojure.main$load_script.invokeStatic(main.clj:277)
at clojure.main$init_opt.invokeStatic(main.clj:279)
at clojure.main$init_opt.invoke(main.clj:279)
at clojure.main$initialize.invokeStatic(main.clj:310)
at clojure.main$null_opt.invokeStatic(main.clj:344)
at clojure.main$null_opt.invoke(main.clj:341)
at clojure.main$main.invokeStatic(main.clj:423)
at clojure.main$main.doInvoke(main.clj:386)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.lang.Var.applyTo(Var.java:700)
at clojure.main.main(main.java:37)
java.lang.IllegalArgumentException: :db.error/tempid-not-an-entity tempid
used only as value in transaction
at
datomic.promise$throw_executionexception_if_throwable.invokeStatic(promise.clj:10)
at
datomic.promise$throw_executionexception_if_throwable.invoke(promise.clj:6)
at datomic.promise$settable_future$reify__4437.deref(promise.clj:54)
at clojure.core$deref.invokeStatic(core.clj:2310)
at clojure.core$deref.invoke(core.clj:2296)
at tinetree.tools.freshdb$_main.invokeStatic(freshdb.clj:11)
at tinetree.tools.freshdb$_main.doInvoke(freshdb.clj:5)
at clojure.lang.RestFn.invoke(RestFn.java:397)
at clojure.lang.Var.invoke(Var.java:375)
at user$eval15.invokeStatic(form-init7020203088859753920.clj:1)
at user$eval15.invoke(form-init7020203088859753920.clj:1)
at clojure.lang.Compiler.eval(Compiler.java:6978)
at clojure.lang.Compiler.eval(Compiler.java:6968)
at clojure.lang.Compiler.load(Compiler.java:7430)
... 12 more
:db.error/tempid-not-an-entity tempid used only as value in transaction
at datomic.error$deserialize_exception.invokeStatic(error.clj:124)
at datomic.error$deserialize_exception.invoke(error.clj:117)
at datomic.peer.Connection.notify_error(peer.clj:400)
at datomic.connector$fn__7364.invokeStatic(connector.clj:169)
at datomic.connector$fn__7364.invoke(connector.clj:167)
at clojure.lang.MultiFn.invoke(MultiFn.java:233)
at
datomic.connector$create_hornet_notifier$fn__7370$fn__7371$fn__7374$fn__7375.invoke(connector.clj:194)
at
datomic.connector$create_hornet_notifier$fn__7370$fn__7371$fn__7374.invoke(connector.clj:189)
at
datomic.connector$create_hornet_notifier$fn__7370$fn__7371.invoke(connector.clj:187)
at clojure.core$binding_conveyor_fn$fn__6772.invoke(core.clj:2020)
at clojure.lang.AFn.call(AFn.java:18)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
I get similar exceptions (in a seemingly random fashion) when I
actually try to load some seed data from a file as well (after loading the
schema of course). Same idea - a certain tempid has a valid bunch of facts
stated about it, and then when another entity's :db.type/ref attribute
tries to use the tempid in the same transaction, it throws the exception.
Any guidance would be really appreciated, as I have spent a few days
and nights trying to figure this out now :)
Many thanks,
Mykola
--
You received this message because you are subscribed to the Google Groups "Datomic" group.
To unsubscribe from this group and stop receiving emails from it, send an email to datomic+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Brandon Bloom
2016-12-23 18:37:01 UTC
Permalink
Post by Jaret Binford
Are you using 0.9.5544?
Yes.
--
You received this message because you are subscribed to the Google Groups "Datomic" group.
To unsubscribe from this group and stop receiving emails from it, send an email to datomic+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Brandon Bloom
2016-12-23 19:10:15 UTC
Permalink
Related, the following also fails. It's a separate bug, but may give some
insight in to the string tempid problem:

;; Schema.
(deref
(d/transact conn
[{:db/ident :foo/name
:db/valueType :db.type/string
:db/cardinality :db.cardinality/one
:db/unique :db.unique/identity}
{:db/ident :foo/ref
:db/valueType :db.type/ref
:db/cardinality :db.cardinality/one}
{:db/ident :myAdd
:db/fn #db/fn {:lang :clojure
:params [db e a v]
:code [[:db/add (:db/id (d/entity db e)) a v]]}}]))

;; Fails with :db.error/not-an-entity.
(deref
(d/transact conn
[[:db/add "a" :foo/name "x"]
[:db/add "b" :foo/name "y"]
[:myAdd [:foo/name "x"] :foo/ref "b"]]))

In this case, d/entity is being called with a lookup ref for an object
created within the same transaction. Since that lookup ref doesn't exist
until the transaction actually runs, d/entity can't find it.

Outside of a transaction, calling d/entity with any random id number always
returns an entity object. Datums for that entity do not need to exist.
Calling d/entity with a lookup ref might return an entity, or might return
nil, depending on whether that lookup ref can be found. This behavior feels
inconsistent, but seems like it could reasonably break consumers who are
using d/entity as an fast/easy exists check.

At minimum, calling d/entity with an not-found lookup ref inside a
transaction should return nil. Ideally, it should return an implicit entity
object just like any given id number.
--
You received this message because you are subscribed to the Google Groups "Datomic" group.
To unsubscribe from this group and stop receiving emails from it, send an email to datomic+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Jaret Binford
2016-12-26 14:27:51 UTC
Permalink
Brandon,

Thanks for the post. I reproduced everything and will discuss with the
team after the holidays. I will update this thread after our discussion.

Cheers,
Jaret
Post by Brandon Bloom
Related, the following also fails. It's a separate bug, but may give some
;; Schema.
(deref
(d/transact conn
[{:db/ident :foo/name
:db/valueType :db.type/string
:db/cardinality :db.cardinality/one
:db/unique :db.unique/identity}
{:db/ident :foo/ref
:db/valueType :db.type/ref
:db/cardinality :db.cardinality/one}
{:db/ident :myAdd
:db/fn #db/fn {:lang :clojure
:params [db e a v]
:code [[:db/add (:db/id (d/entity db e)) a v]]}}]))
;; Fails with :db.error/not-an-entity.
(deref
(d/transact conn
[[:db/add "a" :foo/name "x"]
[:db/add "b" :foo/name "y"]
[:myAdd [:foo/name "x"] :foo/ref "b"]]))
In this case, d/entity is being called with a lookup ref for an object
created within the same transaction. Since that lookup ref doesn't exist
until the transaction actually runs, d/entity can't find it.
Outside of a transaction, calling d/entity with any random id number
always returns an entity object. Datums for that entity do not need to
exist. Calling d/entity with a lookup ref might return an entity, or might
return nil, depending on whether that lookup ref can be found. This
behavior feels inconsistent, but seems like it could reasonably break
consumers who are using d/entity as an fast/easy exists check.
At minimum, calling d/entity with an not-found lookup ref inside a
transaction should return nil. Ideally, it should return an implicit entity
object just like any given id number.
--
You received this message because you are subscribed to the Google Groups "Datomic" group.
To unsubscribe from this group and stop receiving emails from it, send an email to datomic+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Jaret Binford
2017-01-03 19:33:44 UTC
Permalink
Brandon,

I spoke about this with the team and the error you are seeing is correct in
that, you should be unable to pass any tempid (string or otherwise) to
d/entity as the tempid does not technically exist yet. Entity returns a
dynamic map for a given id, but in these cases the id does not yet exist.

http://docs.datomic.com/clojure/index.html#datomic.api/entity

Notice that the doc string for the entity function specified that the
entity API takes "Usage: (entity db eid)." A string tempid is not an entity
identifier (eid).

http://docs.datomic.com/identity.html#entity-identifiers

We could possibly benefit from better error messaging here and I think it
would make a great feature suggestion on the my.datomic.com account page's
"suggest feature" section.

Thanks,
Jaret
Post by Brandon Bloom
Related, the following also fails. It's a separate bug, but may give some
;; Schema.
(deref
(d/transact conn
[{:db/ident :foo/name
:db/valueType :db.type/string
:db/cardinality :db.cardinality/one
:db/unique :db.unique/identity}
{:db/ident :foo/ref
:db/valueType :db.type/ref
:db/cardinality :db.cardinality/one}
{:db/ident :myAdd
:db/fn #db/fn {:lang :clojure
:params [db e a v]
:code [[:db/add (:db/id (d/entity db e)) a v]]}}]))
;; Fails with :db.error/not-an-entity.
(deref
(d/transact conn
[[:db/add "a" :foo/name "x"]
[:db/add "b" :foo/name "y"]
[:myAdd [:foo/name "x"] :foo/ref "b"]]))
In this case, d/entity is being called with a lookup ref for an object
created within the same transaction. Since that lookup ref doesn't exist
until the transaction actually runs, d/entity can't find it.
Outside of a transaction, calling d/entity with any random id number
always returns an entity object. Datums for that entity do not need to
exist. Calling d/entity with a lookup ref might return an entity, or might
return nil, depending on whether that lookup ref can be found. This
behavior feels inconsistent, but seems like it could reasonably break
consumers who are using d/entity as an fast/easy exists check.
At minimum, calling d/entity with an not-found lookup ref inside a
transaction should return nil. Ideally, it should return an implicit entity
object just like any given id number.
--
You received this message because you are subscribed to the Google Groups "Datomic" group.
To unsubscribe from this group and stop receiving emails from it, send an email to datomic+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Brandon Bloom
2017-01-03 21:48:53 UTC
Permalink
Thanks for the follow-up.

I spoke about this with the team and the error you are seeing is correct in
Post by Jaret Binford
that, you should be unable to pass any tempid (string or otherwise) to
d/entity as the tempid does not technically exist yet.
OK, but objects created by d/tempid (not strings or negative numbers) do
seem to work. Maybe they too should throw an exception?
Post by Jaret Binford
I think it would make a great feature suggestion on the my.datomic.com
account page's "suggest feature" section.
It seems like my feedback has been received, so if you want to track it
internally, feel free. I've worked around the shortcoming on my end and am
content to continue doing so.

Cheers,
Brandon
--
You received this message because you are subscribed to the Google Groups "Datomic" group.
To unsubscribe from this group and stop receiving emails from it, send an email to datomic+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Mykola Rozhok
2017-01-17 21:00:20 UTC
Permalink
Hi Jaret,

Thanks again for fixing this. Quick question: what version
of com.datomic/clj-client is the fix in?


Thanks,
Mykola
Post by Jaret Binford
Mykola,
We have resolved the tempid bug in release 0.9.5544.
https://groups.google.com/forum/#!topic/datomic/N2hMneocI-0
Thanks,
Jaret
Post by Mykola Rozhok
Many thanks Jaret!
The #db/id[... -n] tempids seem to work anyway - I'll use them
instead for now.
Regards,
Mykola
Post by Jaret Binford
Mykola,
I was able to reproduce the error. You aren't doing anything wrong here.
Looks like we will need to fix this in an upcoming release. I will update
as soon as we have more information.
Thanks,
Jaret
Post by Mykola Rozhok
Hi guys,
Some fantastic updates in Datomic 0.9.5530!
However, the string tempids don't always seem to work for me.
[
;; a partition
{:db/id "a"
:db/ident :db.part/a}
[:db/add :db.part/db :db.install/partition "a"]
;; b partition
{:db/id "b"
:db/ident :db.part/b}
[:db/add :db.part/db :db.install/partition "b"]
]
(slurp)ed from a file and sent through (read-string ...) and then into
the transactor via (datomic.api/transact ...), throws the following
java.lang.IllegalArgumentException: :db.error/tempid-not-an-entity tempid
used only as value in transaction,
compiling:(/private/var/folders/rl/8pck6b653gj5vmp25vqtg32h0000gn/T/form-init7020203088859753920.clj:1:125)
at clojure.lang.Compiler.load(Compiler.java:7442)
at clojure.lang.Compiler.loadFile(Compiler.java:7368)
at clojure.main$load_script.invokeStatic(main.clj:277)
at clojure.main$init_opt.invokeStatic(main.clj:279)
at clojure.main$init_opt.invoke(main.clj:279)
at clojure.main$initialize.invokeStatic(main.clj:310)
at clojure.main$null_opt.invokeStatic(main.clj:344)
at clojure.main$null_opt.invoke(main.clj:341)
at clojure.main$main.invokeStatic(main.clj:423)
at clojure.main$main.doInvoke(main.clj:386)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.lang.Var.applyTo(Var.java:700)
at clojure.main.main(main.java:37)
java.lang.IllegalArgumentException: :db.error/tempid-not-an-entity tempid
used only as value in transaction
at
datomic.promise$throw_executionexception_if_throwable.invokeStatic(promise.clj:10)
at
datomic.promise$throw_executionexception_if_throwable.invoke(promise.clj:6)
at datomic.promise$settable_future$reify__4437.deref(promise.clj:54)
at clojure.core$deref.invokeStatic(core.clj:2310)
at clojure.core$deref.invoke(core.clj:2296)
at tinetree.tools.freshdb$_main.invokeStatic(freshdb.clj:11)
at tinetree.tools.freshdb$_main.doInvoke(freshdb.clj:5)
at clojure.lang.RestFn.invoke(RestFn.java:397)
at clojure.lang.Var.invoke(Var.java:375)
at user$eval15.invokeStatic(form-init7020203088859753920.clj:1)
at user$eval15.invoke(form-init7020203088859753920.clj:1)
at clojure.lang.Compiler.eval(Compiler.java:6978)
at clojure.lang.Compiler.eval(Compiler.java:6968)
at clojure.lang.Compiler.load(Compiler.java:7430)
... 12 more
:db.error/tempid-not-an-entity tempid used only as value in transaction
at datomic.error$deserialize_exception.invokeStatic(error.clj:124)
at datomic.error$deserialize_exception.invoke(error.clj:117)
at datomic.peer.Connection.notify_error(peer.clj:400)
at datomic.connector$fn__7364.invokeStatic(connector.clj:169)
at datomic.connector$fn__7364.invoke(connector.clj:167)
at clojure.lang.MultiFn.invoke(MultiFn.java:233)
at
datomic.connector$create_hornet_notifier$fn__7370$fn__7371$fn__7374$fn__7375.invoke(connector.clj:194)
at
datomic.connector$create_hornet_notifier$fn__7370$fn__7371$fn__7374.invoke(connector.clj:189)
at
datomic.connector$create_hornet_notifier$fn__7370$fn__7371.invoke(connector.clj:187)
at clojure.core$binding_conveyor_fn$fn__6772.invoke(core.clj:2020)
at clojure.lang.AFn.call(AFn.java:18)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
I get similar exceptions (in a seemingly random fashion) when I
actually try to load some seed data from a file as well (after loading the
schema of course). Same idea - a certain tempid has a valid bunch of facts
stated about it, and then when another entity's :db.type/ref attribute
tries to use the tempid in the same transaction, it throws the exception.
Any guidance would be really appreciated, as I have spent a few days
and nights trying to figure this out now :)
Many thanks,
Mykola
--
You received this message because you are subscribed to the Google Groups "Datomic" group.
To unsubscribe from this group and stop receiving emails from it, send an email to datomic+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Jaret Binford
2017-01-18 15:01:26 UTC
Permalink
Mykola,

The fix actually wasn't in client, so by upgrading to datomic 0.9.5544
you'll resolve the issue without updating your client version.

The announcement for reference:
https://groups.google.com/forum/#!topic/datomic/N2hMneocI-0

Thanks,
Jaret
Post by Mykola Rozhok
Hi Jaret,
Thanks again for fixing this. Quick question: what version
of com.datomic/clj-client is the fix in?
Thanks,
Mykola
Post by Jaret Binford
Mykola,
We have resolved the tempid bug in release 0.9.5544.
https://groups.google.com/forum/#!topic/datomic/N2hMneocI-0
Thanks,
Jaret
Post by Mykola Rozhok
Many thanks Jaret!
The #db/id[... -n] tempids seem to work anyway - I'll use them
instead for now.
Regards,
Mykola
Post by Jaret Binford
Mykola,
I was able to reproduce the error. You aren't doing anything wrong
here. Looks like we will need to fix this in an upcoming release. I will
update as soon as we have more information.
Thanks,
Jaret
Post by Mykola Rozhok
Hi guys,
Some fantastic updates in Datomic 0.9.5530!
However, the string tempids don't always seem to work for me.
[
;; a partition
{:db/id "a"
:db/ident :db.part/a}
[:db/add :db.part/db :db.install/partition "a"]
;; b partition
{:db/id "b"
:db/ident :db.part/b}
[:db/add :db.part/db :db.install/partition "b"]
]
(slurp)ed from a file and sent through (read-string ...) and then into
the transactor via (datomic.api/transact ...), throws the following
java.lang.IllegalArgumentException: :db.error/tempid-not-an-entity tempid
used only as value in transaction,
compiling:(/private/var/folders/rl/8pck6b653gj5vmp25vqtg32h0000gn/T/form-init7020203088859753920.clj:1:125)
at clojure.lang.Compiler.load(Compiler.java:7442)
at clojure.lang.Compiler.loadFile(Compiler.java:7368)
at clojure.main$load_script.invokeStatic(main.clj:277)
at clojure.main$init_opt.invokeStatic(main.clj:279)
at clojure.main$init_opt.invoke(main.clj:279)
at clojure.main$initialize.invokeStatic(main.clj:310)
at clojure.main$null_opt.invokeStatic(main.clj:344)
at clojure.main$null_opt.invoke(main.clj:341)
at clojure.main$main.invokeStatic(main.clj:423)
at clojure.main$main.doInvoke(main.clj:386)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.lang.Var.applyTo(Var.java:700)
at clojure.main.main(main.java:37)
java.lang.IllegalArgumentException: :db.error/tempid-not-an-entity tempid
used only as value in transaction
at
datomic.promise$throw_executionexception_if_throwable.invokeStatic(promise.clj:10)
at
datomic.promise$throw_executionexception_if_throwable.invoke(promise.clj:6)
at datomic.promise$settable_future$reify__4437.deref(promise.clj:54)
at clojure.core$deref.invokeStatic(core.clj:2310)
at clojure.core$deref.invoke(core.clj:2296)
at tinetree.tools.freshdb$_main.invokeStatic(freshdb.clj:11)
at tinetree.tools.freshdb$_main.doInvoke(freshdb.clj:5)
at clojure.lang.RestFn.invoke(RestFn.java:397)
at clojure.lang.Var.invoke(Var.java:375)
at user$eval15.invokeStatic(form-init7020203088859753920.clj:1)
at user$eval15.invoke(form-init7020203088859753920.clj:1)
at clojure.lang.Compiler.eval(Compiler.java:6978)
at clojure.lang.Compiler.eval(Compiler.java:6968)
at clojure.lang.Compiler.load(Compiler.java:7430)
... 12 more
:db.error/tempid-not-an-entity tempid used only as value in transaction
at datomic.error$deserialize_exception.invokeStatic(error.clj:124)
at datomic.error$deserialize_exception.invoke(error.clj:117)
at datomic.peer.Connection.notify_error(peer.clj:400)
at datomic.connector$fn__7364.invokeStatic(connector.clj:169)
at datomic.connector$fn__7364.invoke(connector.clj:167)
at clojure.lang.MultiFn.invoke(MultiFn.java:233)
at
datomic.connector$create_hornet_notifier$fn__7370$fn__7371$fn__7374$fn__7375.invoke(connector.clj:194)
at
datomic.connector$create_hornet_notifier$fn__7370$fn__7371$fn__7374.invoke(connector.clj:189)
at
datomic.connector$create_hornet_notifier$fn__7370$fn__7371.invoke(connector.clj:187)
at clojure.core$binding_conveyor_fn$fn__6772.invoke(core.clj:2020)
at clojure.lang.AFn.call(AFn.java:18)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
I get similar exceptions (in a seemingly random fashion) when I
actually try to load some seed data from a file as well (after loading the
schema of course). Same idea - a certain tempid has a valid bunch of facts
stated about it, and then when another entity's :db.type/ref attribute
tries to use the tempid in the same transaction, it throws the exception.
Any guidance would be really appreciated, as I have spent a few days
and nights trying to figure this out now :)
Many thanks,
Mykola
--
You received this message because you are subscribed to the Google Groups "Datomic" group.
To unsubscribe from this group and stop receiving emails from it, send an email to datomic+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Mykola Rozhok
2017-01-19 18:49:59 UTC
Permalink
Thanks Jaret.
Post by Jaret Binford
Mykola,
The fix actually wasn't in client, so by upgrading to datomic 0.9.5544
you'll resolve the issue without updating your client version.
https://groups.google.com/forum/#!topic/datomic/N2hMneocI-0
Thanks,
Jaret
Post by Mykola Rozhok
Hi Jaret,
Thanks again for fixing this. Quick question: what version
of com.datomic/clj-client is the fix in?
Thanks,
Mykola
Post by Jaret Binford
Mykola,
We have resolved the tempid bug in release 0.9.5544.
https://groups.google.com/forum/#!topic/datomic/N2hMneocI-0
Thanks,
Jaret
Post by Mykola Rozhok
Many thanks Jaret!
The #db/id[... -n] tempids seem to work anyway - I'll use them
instead for now.
Regards,
Mykola
Post by Jaret Binford
Mykola,
I was able to reproduce the error. You aren't doing anything wrong
here. Looks like we will need to fix this in an upcoming release. I will
update as soon as we have more information.
Thanks,
Jaret
Post by Mykola Rozhok
Hi guys,
Some fantastic updates in Datomic 0.9.5530!
However, the string tempids don't always seem to work for me.
[
;; a partition
{:db/id "a"
:db/ident :db.part/a}
[:db/add :db.part/db :db.install/partition "a"]
;; b partition
{:db/id "b"
:db/ident :db.part/b}
[:db/add :db.part/db :db.install/partition "b"]
]
(slurp)ed from a file and sent through (read-string ...) and then
into the transactor via (datomic.api/transact ...), throws the following
java.lang.IllegalArgumentException: :db.error/tempid-not-an-entity tempid
used only as value in transaction,
compiling:(/private/var/folders/rl/8pck6b653gj5vmp25vqtg32h0000gn/T/form-init7020203088859753920.clj:1:125)
at clojure.lang.Compiler.load(Compiler.java:7442)
at clojure.lang.Compiler.loadFile(Compiler.java:7368)
at clojure.main$load_script.invokeStatic(main.clj:277)
at clojure.main$init_opt.invokeStatic(main.clj:279)
at clojure.main$init_opt.invoke(main.clj:279)
at clojure.main$initialize.invokeStatic(main.clj:310)
at clojure.main$null_opt.invokeStatic(main.clj:344)
at clojure.main$null_opt.invoke(main.clj:341)
at clojure.main$main.invokeStatic(main.clj:423)
at clojure.main$main.doInvoke(main.clj:386)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.lang.Var.applyTo(Var.java:700)
at clojure.main.main(main.java:37)
java.lang.IllegalArgumentException: :db.error/tempid-not-an-entity tempid
used only as value in transaction
at
datomic.promise$throw_executionexception_if_throwable.invokeStatic(promise.clj:10)
at
datomic.promise$throw_executionexception_if_throwable.invoke(promise.clj:6)
at datomic.promise$settable_future$reify__4437.deref(promise.clj:54)
at clojure.core$deref.invokeStatic(core.clj:2310)
at clojure.core$deref.invoke(core.clj:2296)
at tinetree.tools.freshdb$_main.invokeStatic(freshdb.clj:11)
at tinetree.tools.freshdb$_main.doInvoke(freshdb.clj:5)
at clojure.lang.RestFn.invoke(RestFn.java:397)
at clojure.lang.Var.invoke(Var.java:375)
at user$eval15.invokeStatic(form-init7020203088859753920.clj:1)
at user$eval15.invoke(form-init7020203088859753920.clj:1)
at clojure.lang.Compiler.eval(Compiler.java:6978)
at clojure.lang.Compiler.eval(Compiler.java:6968)
at clojure.lang.Compiler.load(Compiler.java:7430)
... 12 more
:db.error/tempid-not-an-entity tempid used only as value in transaction
at datomic.error$deserialize_exception.invokeStatic(error.clj:124)
at datomic.error$deserialize_exception.invoke(error.clj:117)
at datomic.peer.Connection.notify_error(peer.clj:400)
at datomic.connector$fn__7364.invokeStatic(connector.clj:169)
at datomic.connector$fn__7364.invoke(connector.clj:167)
at clojure.lang.MultiFn.invoke(MultiFn.java:233)
at
datomic.connector$create_hornet_notifier$fn__7370$fn__7371$fn__7374$fn__7375.invoke(connector.clj:194)
at
datomic.connector$create_hornet_notifier$fn__7370$fn__7371$fn__7374.invoke(connector.clj:189)
at
datomic.connector$create_hornet_notifier$fn__7370$fn__7371.invoke(connector.clj:187)
at clojure.core$binding_conveyor_fn$fn__6772.invoke(core.clj:2020)
at clojure.lang.AFn.call(AFn.java:18)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
I get similar exceptions (in a seemingly random fashion) when I
actually try to load some seed data from a file as well (after loading the
schema of course). Same idea - a certain tempid has a valid bunch of facts
stated about it, and then when another entity's :db.type/ref attribute
tries to use the tempid in the same transaction, it throws the exception.
Any guidance would be really appreciated, as I have spent a few days
and nights trying to figure this out now :)
Many thanks,
Mykola
--
You received this message because you are subscribed to the Google Groups "Datomic" group.
To unsubscribe from this group and stop receiving emails from it, send an email to datomic+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Continue reading on narkive:
Loading...