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

Datahike in Class Path Breaks Datomic Client, Cannot Connect to Proxy Server #138

Closed
samdesota opened this issue Apr 20, 2020 · 5 comments
Closed

Comments

@samdesota
Copy link

Have a strange issue, I have a project where I'm syncing some datoms from Datomic into datahike persisted on level db, but when I include datahike in the project (using lein) it breaks the Datomic client, making it impossible to connect to Datomic.

Running (datomic.client.api/connect client {:db-name name}) hangs forever. I don't even need to import the datahike namespace, if datahike is in my project.clj, I cannot connect to Datomic. If I comment out datahike, I can connect again.

This leads me to believe it's a peer dependency issue of some sort? Any ideas where this would be from or any additional info I can look into to help debug?

@samdesota samdesota changed the title Datahike in Class Path Breaks Datomic Client, Cannot Connect to Local Server Datahike in Class Path Breaks Datomic Client, Cannot Connect to Proxy Server Apr 20, 2020
@samdesota
Copy link
Author

Some additional info, was running in a Calva Repl, there was an error I didn't see in another buffer:

Exception in thread "async-dispatch-2" java.lang.NoSuchMethodError: com.cognitect.transit.TransitFactory.writer(Lcom/cognitect/transit/TransitFactory$Format;Ljava/io/OutputStream;Ljava/util/Map;Lcom/cognitect/transit/WriteHandler;Ljava/util/function/Function;)Lcom/cognitect/transit/Writer;
        at cognitect.transit$writer.invokeStatic(transit.clj:157)
        at cognitect.transit$writer.invoke(transit.clj:139)
        at datomic.client.impl.shared.io$marshal.invokeStatic(io.clj:48)
        at datomic.client.impl.shared.io$marshal.invoke(io.clj:38)
        at datomic.client.impl.shared.io$client_req__GT_http_req.invokeStatic(io.clj:76)
        at datomic.client.impl.shared.io$client_req__GT_http_req.invoke(io.clj:73)
        at datomic.client.impl.shared.Client._async_op(shared.clj:383)
        at datomic.client.impl.shared.Client$fn__16730$state_machine__12285__auto____16745$fn__16747.invoke(shared.clj:407)
        at datomic.client.impl.shared.Client$fn__16730$state_machine__12285__auto____16745.invoke(shared.clj:406)
        at clojure.core.async.impl.ioc_macros$run_state_machine.invokeStatic(ioc_macros.clj:978)
        at clojure.core.async.impl.ioc_macros$run_state_machine.invoke(ioc_macros.clj:977)
        at clojure.core.async.impl.ioc_macros$run_state_machine_wrapped.invokeStatic(ioc_macros.clj:982)
        at clojure.core.async.impl.ioc_macros$run_state_machine_wrapped.invoke(ioc_macros.clj:980)
        at datomic.client.impl.shared.Client$fn__16730.invoke(shared.clj:406)
        at clojure.lang.AFn.run(AFn.java:22)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at clojure.core.async.impl.concurrent$counted_thread_factory$reify__6195$fn__6196.invoke(concurrent.clj:29)
        at clojure.lang.AFn.run(AFn.java:22)
        at java.lang.Thread.run(Thread.java:748)

Perhaps this is a version conflict issue with Transit.

@samdesota
Copy link
Author

Okay, I was able to fix by adding a dependency on the latest version of transit to my project:

[com.cognitect/transit-clj "1.0.324"]

Not sure if there's anything actionable for this project, but perhaps updating dependencies. If not, sorry for the noise and feel free to close out the issue. Thanks!

@kordano
Copy link
Member

kordano commented Apr 21, 2020

For migrations you could also use wanderung which is targeted right at datomic cloud but we will add on-prem versions as well.

@whilo
Copy link
Member

whilo commented Apr 26, 2020

Thank you for reporting. We will try to bump the deps, but there is still an open issue here: cognitect/transit-java#31

@whilo
Copy link
Member

whilo commented Mar 16, 2023

This issue is probably solved by now as we ship a newer version with incognito. Incognito is also not needed anymore for the persistent-sorted-set backend, so it can be excluded from your deps in case you still run into the issue. Please reopen if the issue persists and is not easy to resolve.

@whilo whilo closed this as completed Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

3 participants