Code Monkey home page Code Monkey logo

Comments (27)

belucid avatar belucid commented on September 16, 2024

Further bit of info, I see this same error on 2 different machines (both Mac OS X), one with brew'd RethinkDB 2.0.3 and one with the binary package of 2.0.3.

from clj-rethinkdb.

danielytics avatar danielytics commented on September 16, 2024

This doesn't look like a RethinkDB version issue since it happens without connecting or issuing queries. It looks like an issue compiling rethinkdb.net:

java.lang.ClassNotFoundException: rethinkdb.net

I assume a problem with the 0.9.40 release is broken. Does 0.9.39 work for you?

I'll try it myself later today if I get time.

from clj-rethinkdb.

belucid avatar belucid commented on September 16, 2024

Well... the plot thickens. Maybe the issue doesn't have anything to do with 2.x.x.

If I clone the repo, and run the tests, they pass fine on 2.0.3:

Reflection warning, clj_time/core.clj:468:36 - reference to field getMonths on org.joda.time.ReadablePeriod can't be resolved.
Reflection warning, clj_time/core.clj:469:27 - reference to field getYears on org.joda.time.ReadablePeriod can't be resolved.
Reflection warning, clj_time/core.clj:461:28 - reference to field getMonths on org.joda.time.ReadablePeriod can't be resolved.
Reflection warning, clj_time/core.clj:462:33 - reference to field getYears on org.joda.time.ReadablePeriod can't be resolved.
Reflection warning, clojure/data/priority_map.clj:215:19 - call to method equiv on java.lang.Object can't be resolved (no such method).
Reflection warning, clojure/core/memoize.clj:72:23 - reference to field cache can't be resolved.
Reflection warning, rethinkdb/types.clj:9:3 - reference to field getNumber on java.lang.Enum can't be resolved.
Reflection warning, rethinkdb/types.clj:14:3 - reference to field getNumber on java.lang.Enum can't be resolved.

lein test rethinkdb.connection-test
performance (connection per query)
"Elapsed time: 114.08 msecs"
performance (reusing connection
"Elapsed time: 34.96 msecs"
performance (parallel, one connection)
"Elapsed time: 21.181 msecs"
performance (pooled connection
multiple connection test

lein test rethinkdb.core-test

Ran 17 tests containing 92 assertions.
0 failures, 0 errors.

from clj-rethinkdb.

danielytics avatar danielytics commented on September 16, 2024

If you clone the repo and run lein install, does your code work then?

from clj-rethinkdb.

belucid avatar belucid commented on September 16, 2024

0.9.39 has the same issue:

[local 07/07/15 09:32:16 ~/source/open-company/open-company-api (master)] lein deps
Retrieving rethinkdb/rethinkdb/0.9.39/rethinkdb-0.9.39.pom from clojars
Retrieving rethinkdb/rethinkdb/0.9.39/rethinkdb-0.9.39.jar from clojars
[local 07/07/15 09:32:22 ~/source/open-company/open-company-api (master)] lein repl
WARNING: tagged-literal already refers to: #'clojure.core/tagged-literal in namespace: puget.data, being replaced by: #'puget.data/tagged-literal
WARNING: tagged-literal? already refers to: #'clojure.core/tagged-literal? in namespace: puget.data, being replaced by: #'puget.data/tagged-literal?
WARNING: cat already refers to: #'clojure.core/cat in namespace: net.cgrand.parsley.fold, being replaced by: #'net.cgrand.parsley.fold/cat
nREPL server started on port 55075 on host 127.0.0.1 - nrepl://127.0.0.1:55075
REPL-y 0.3.5, nREPL 0.2.6
Clojure 1.7.0
Java HotSpot(TM) 64-Bit Server VM 1.7.0_25-b15
    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

user=> (require '[rethinkdb.query :as r])

user=>                           clojure.core/eval                          core.clj: 3081
                                        ...
                              user/eval7750  form-init6417356265125171371.clj:    1
                                        ...
                       clojure.core/require                          core.clj: 5832
                         clojure.core/apply                          core.clj:  632
                                        ...
                     clojure.core/load-libs                          core.clj: 5749
                         clojure.core/apply                          core.clj:  632
                                        ...
                      clojure.core/load-lib                          core.clj: 5710
                   clojure.core/load-lib/fn                          core.clj: 5711
                      clojure.core/load-one                          core.clj: 5671
                                        ...
                          clojure.core/load                          core.clj: 5865
                       clojure.core/load/fn                          core.clj: 5866
                                        ...
                   rethinkdb.query/eval7754                         query.clj:    1
   rethinkdb.query/eval7754/loading--auto--                         query.clj:    1
                                        ...
                       clojure.core/require                          core.clj: 5832
                         clojure.core/apply                          core.clj:  632
                                        ...
                     clojure.core/load-libs                          core.clj: 5749
                         clojure.core/apply                          core.clj:  632
                                        ...
                      clojure.core/load-lib                          core.clj: 5710
                   clojure.core/load-lib/fn                          core.clj: 5711
                      clojure.core/load-one                          core.clj: 5671
                                        ...
                          clojure.core/load                          core.clj: 5865
                       clojure.core/load/fn                          core.clj: 5866
                                        ...
                    java.lang.Class.forName                        Class.java:  270
                   java.lang.Class.forName0                        Class.java
            java.lang.ClassLoader.loadClass                  ClassLoader.java:  357
                                        ...
            java.lang.ClassLoader.loadClass                  ClassLoader.java:  424
                                        ...
          java.net.URLClassLoader.findClass               URLClassLoader.java:  354
java.security.AccessController.doPrivileged             AccessController.java
              java.net.URLClassLoader$1.run               URLClassLoader.java:  355
              java.net.URLClassLoader$1.run               URLClassLoader.java:  366
       java.lang.ClassNotFoundException: rethinkdb.net
clojure.lang.Compiler$CompilerException: java.lang.ClassNotFoundException: rethinkdb.net, compiling:(rethinkdb/net.clj:62:19)

from clj-rethinkdb.

belucid avatar belucid commented on September 16, 2024

FWIW, if I switch back to 0.9.40 and to Clojure 1.6 rather than Clojure 1.7, I get a different error:

Clojure 1.6.0
Java HotSpot(TM) 64-Bit Server VM 1.7.0_25-b15
    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

user=> (require '[rethinkdb.query :as r])

user=>                        clojure.core/eval                          core.clj: 2927
                                     ...
                           user/eval7750  form-init1049654065514578794.clj:    1
                                     ...
                    clojure.core/require                          core.clj: 5607
                      clojure.core/apply                          core.clj:  626
                                     ...
                  clojure.core/load-libs                          core.clj: 5524
                      clojure.core/apply                          core.clj:  626
                                     ...
                   clojure.core/load-lib                          core.clj: 5485
                clojure.core/load-lib/fn                          core.clj: 5486
                   clojure.core/load-one                          core.clj: 5446
                                     ...
                       clojure.core/load                          core.clj: 5640
                    clojure.core/load/fn                          core.clj: 5641
                                     ...
                rethinkdb.query/eval7754                         query.clj:    1
rethinkdb.query/eval7754/loading--auto--                         query.clj:    1
                                     ...
                    clojure.core/require                          core.clj: 5607
                      clojure.core/apply                          core.clj:  626
                                     ...
                  clojure.core/load-libs                          core.clj: 5524
                      clojure.core/apply                          core.clj:  626
                                     ...
                   clojure.core/load-lib                          core.clj: 5485
                clojure.core/load-lib/fn                          core.clj: 5486
                   clojure.core/load-one                          core.clj: 5446
                                     ...
                       clojure.core/load                          core.clj: 5640
                    clojure.core/load/fn                          core.clj: 5641
                                     ...
             java.lang.RuntimeException: Unable to resolve symbol: loop_15270 in this context
clojure.lang.Compiler$CompilerException: java.lang.RuntimeException: Unable to resolve symbol: loop_15270 in this context, compiling:(rethinkdb/net.clj:63:19)

from clj-rethinkdb.

danielytics avatar danielytics commented on September 16, 2024

I can't reproduce this. :-/

image

from clj-rethinkdb.

belucid avatar belucid commented on September 16, 2024

Let me strip down to a bare leiningen file and see if I can still reproduce it.

from clj-rethinkdb.

danielytics avatar danielytics commented on September 16, 2024

In the above test, I created a new project, changed clojure version to 1.7 and added rethinkdb as a dependency and then ran lein repl. 1.6 works too.

from clj-rethinkdb.

belucid avatar belucid commented on September 16, 2024

Yes, I did the same and it worked fine for 1.6 and 1.7. So there's a conflict with something else in my project.clj.

Here it is BTW: https://github.com/open-company/open-company-api/blob/mainline/project.clj

I'll slowly add back in what's there until I see what causes it.

from clj-rethinkdb.

danielytics avatar danielytics commented on September 16, 2024

Going by your 1.6 error, it looks like maybe a clash in core.async versions preventing rethinkdb.net from compiling. Although I can't see why... (I've never had any problems with core.async versions before!)

You could try this:

[rethinkdb "0.9.40" :exclusions [org.clojure/core.async]]

edit: removed my comment about transducers, it seems that the latest core.async is still built against 1.6

from clj-rethinkdb.

belucid avatar belucid commented on September 16, 2024

I don't think anything else is bringing in core.async other than clj-rethinkdb....

[rethinkdb 0.9.40 :exclusions [org.clojure/core.async]]

Results in a different error:

clojure.lang.Compiler$CompilerException: java.io.FileNotFoundException: Could not locate clojure/core/async__init.class or clojure/core/async.clj on classpath., compiling:(rethinkdb/net.clj:1:1)

And actually. [org.clojure/core.match "0.3.0-alpha4"] was the culprit. If I comment it out, all is fine.

Here's the deps-tree output on core.match:

[org.clojure/core.match "0.3.0-alpha4"]
    [org.clojure/tools.analyzer.jvm "0.6.5"]
        [org.clojure/core.memoize "0.5.6"]
            [org.clojure/core.cache "0.6.3"]
                [org.clojure/data.priority-map "0.0.2"]
        [org.clojure/tools.analyzer "0.6.4"]
        [org.ow2.asm/asm-all "4.2"]

and on clj-rethinkdb:

[rethinkdb "0.9.40"]
    [org.clojure/core.async "0.1.346.0-17112a-alpha"]
    [org.flatland/protobuf "0.8.1"]
        [ordered-collections "0.4.0"]
        [org.flatland/io "0.3.0"]
        [org.flatland/schematic "0.1.0"]
        [org.flatland/useful "0.9.0"]
    [rethinkdb-protobuf "0.3.0"]

It's odd... not sure what the problem is there.

from clj-rethinkdb.

belucid avatar belucid commented on September 16, 2024

Verified it with the bare project:

(defproject bare "0.1.0-SNAPSHOT"
  :description "FIXME: write description"
  :url "http://example.com/FIXME"
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}
  :dependencies [
    [org.clojure/clojure "1.6.0"]
    [org.clojure/core.match "0.3.0-alpha4"]
    [rethinkdb "0.9.40"]
  ])

On 1.6 results in:

user=> (require '[rethinkdb.query :as r])

CompilerException java.lang.RuntimeException: Unable to resolve symbol: loop_9368 in this context, compiling:(rethinkdb/net.clj:63:19)

On 1.7 results in:

user=> (require '[rethinkdb.query :as r])

CompilerException java.lang.ClassNotFoundException: rethinkdb.net, compiling:(rethinkdb/net.clj:63:19)

from clj-rethinkdb.

belucid avatar belucid commented on September 16, 2024

[org.clojure/core.match "0.2.2"] doesn't cause an issue.

from clj-rethinkdb.

belucid avatar belucid commented on September 16, 2024

I'm unstuck at the moment with core.match 0.2.2. I'll pull core.match into a cloned repo of clj-rethinkdb and debug what the issue is later on when I have a little more time. Thanks for all the help thus far.

from clj-rethinkdb.

danielytics avatar danielytics commented on September 16, 2024

That's odd, but at least it works for now. Will take some digging to determine what the cause is, I guess...

from clj-rethinkdb.

danielcompton avatar danielcompton commented on September 16, 2024

It may possibly be related to #24. Also, I've removed the dependency on flatland/protobuf in apa512/rethinkdb-protobuf#4 so that may resolve it.

from clj-rethinkdb.

danielcompton avatar danielcompton commented on September 16, 2024

I can't reproduce this on master. I suspect this may have been fixed by handling our protobufs differently and importing them in the ns form. I've pushed 0.11.0-SNAPSHOT to clojars, @belucid are you able to check if this is still an issue for you with this snapshot?

from clj-rethinkdb.

belucid avatar belucid commented on September 16, 2024

@danielcompton the problem has changed, but I still get no luck with 0.11.0-SNAPSHOT.

If I use 0.11.0-SNAPSHOT with core.match 0.2.2, all is well. If I switch core.match to 0.3.0-alpha4 this is what I get when starting a REPL:

[local 08/05/15 06:51:59 ~/source/open-company/open-company-api (master)] lein repl
#error {
 :cause rethinkdb.net
 :via
 [{:type clojure.lang.Compiler$CompilerException
   :message java.lang.ClassNotFoundException: rethinkdb.net, compiling:(rethinkdb/net.clj:63:19)
   :at [clojure.lang.Compiler analyze Compiler.java 6707]}
  {:type java.lang.ClassNotFoundException
   :message rethinkdb.net
   :at [java.net.URLClassLoader$1 run URLClassLoader.java 366]}]
 :trace
 [[java.net.URLClassLoader$1 run URLClassLoader.java 366]
  [java.net.URLClassLoader$1 run URLClassLoader.java 355]
... reams of stack traces eluded by @danielcompton
  [clojure.lang.AFn applyToHelper AFn.java 156]
  [clojure.lang.Var applyTo Var.java 700]
  [clojure.main main main.java 37]]}
nREPL server started on port 56014 on host 127.0.0.1 - nrepl://127.0.0.1:56014
REPL-y 0.3.5, nREPL 0.2.6
Clojure 1.8.0-alpha4
Java HotSpot(TM) 64-Bit Server VM 1.7.0_80-b15
    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

open-company.app=>

Trying to then (require '[rethinkdb.query :as r]) sends the REPL into an infinite loop and I have to kill it.

I'm running Clojure 1.8 alpha4 on Java 8. Let me know if you need any other details.

from clj-rethinkdb.

danielytics avatar danielytics commented on September 16, 2024

Is it working with Clojure 1.7?

from clj-rethinkdb.

belucid avatar belucid commented on September 16, 2024

@danielcompton no, same thing on Clojure 1.7.0.

from clj-rethinkdb.

belucid avatar belucid commented on September 16, 2024

@danielcompton If you want to easily recreate it yourself, you can clone this repo: https://github.com/open-company/open-company-api.git

Then just update the project.clj to Clojure 1.7.0, core.match 0.3.0-alpha4 and rethinkdb to 0.11.0-SNAPSHOT and run lein repl.

from clj-rethinkdb.

danielcompton avatar danielcompton commented on September 16, 2024

I can recreate the issue. It seems pretty likely that the issue is the version of tools.analyzer.jvm being used, or at least a conflict between core.async and t.jvm as the line:column that the error is thrown on is the start of a go block. The most current released version of core.async uses t.a.jvm 0.1.0-beta12. core.match uses 0.6.5. This seems like a recipe for disaster.

I'm not really sure where to go with this bug report. There's two libraries with massive macros that may be interacting badly. Perhaps testing it with core.async from master?

from clj-rethinkdb.

danielcompton avatar danielcompton commented on September 16, 2024

@belucid I tried installing the latest version of core.async and got another bizarre error. I'm not really sure what's going on and I'm not familiar with core.match at all. Looking at JIRA, there are a number of reported issues with this interaction, e.g. http://dev.clojure.org/jira/browse/MATCH-87 http://dev.clojure.org/jira/browse/MATCH-85 http://dev.clojure.org/jira/browse/MATCH-96.

I'm happy to take a pull request that fixes the issues you're having, but as far as I can see the clj-rethinkdb library is just using normal core.async code and it's not really our fault. I'm going to close this for now, but feel free to reopen it if you discover the root cause or have further insight to add here.

from clj-rethinkdb.

belucid avatar belucid commented on September 16, 2024

@danielcompton I agree, you've traced it down to a bad interaction between core.async and the newer core.match. It surfaces as a problem with rethinkdb, but that's just because it's the core.async consumer.

Alex Miller replied to your mailing list question that he's going to work on a new core.async release soon:

https://groups.google.com/forum/#!topic/clojure/agLeEUCCckA

Hopefully that'll resolve this. I'm fine with leaving this closed for now, but I may ask for it to be opened back up to move rethinkdb to using the new core.async once it's released.

from clj-rethinkdb.

danielcompton avatar danielcompton commented on September 16, 2024

No problem. Just an FYI, I tried RethinkDB with the version of core.async currently on master I got another strange error when compiling the go blocks so I'm not sure upgrading alone will be enough. If you were keen to get this issue resolved, I'd recommend creating a minimal failing case and opening a bug with the core.match project. You could also do a git bisect on this minimal case with core.match as a checkout dependency to find the commit that introduced the issue between 0.2.0 and 0.3.0-alpha4.

from clj-rethinkdb.

belucid avatar belucid commented on September 16, 2024

Just a note @danielcompton , core.async got a new version, core.async-0.2.371, and that resolved the conflict.

from clj-rethinkdb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.