xtdb / xtdb

An immutable SQL database for application development, time-travel reporting and data compliance. Developed by @juxt
https://xtdb.com
Mozilla Public License 2.0
2.53k stars 165 forks source link

Error locating module crux.kv.index-store/->kv-index-store #1524

Closed luposlip closed 3 years ago

luposlip commented 3 years ago

After updating from 1.16.0 to 1.17.0 I get a new error from my unit tests.

Previously I've initialized a "mock" node by just passing an empty configuration map to crux.api/start-node. Which worked fine.

With 1.17.0 I get the following error:

Error locating module
   {:module crux.kv.index-store/->kv-index-store}
                system.clj:  113  crux.system.ModuleRef/prepare_dep
                system.clj:  131  crux.system/opts-reducer/f
     PersistentVector.java:  343  clojure.lang.PersistentVector/reduce
                  core.clj: 6852  clojure.core/reduce
                  core.clj: 6835  clojure.core/reduce
                system.clj:  156  crux.system/prep-system
                system.clj:  141  crux.system/prep-system
                system.clj:  142  crux.system/prep-system
                system.clj:  141  crux.system/prep-system
                   api.clj:  231  crux.api/start-node
                   api.clj:  218  crux.api/start-node
jarohen commented 3 years ago

Hey @luposlip :) I'm a little surprised by this one, we use (crux/start-node {}) in a lot of tests. Couple of quick questions:

Cheers,

James

luposlip commented 3 years ago

Hi @jarohen - yeah, me too. I'm using JDK 11 (AdoptOpenJDK 11.0.11+9 Hotspot).

I've also tried with GraalVM JDK 11.

Both JDK's give same issue.

I can require crux.kv.index-store without issues.

olymk2 commented 3 years ago

I am hitting something similar to this, exception below this is a very basic setup using (crux/start-node {}) it works on my machine but not when run inside docker using image: clojure:tools-deps and launching like so java -jar target/demo.jar

Caused by: clojure.lang.ExceptionInfo: Error starting system {:k [:crux/index-store]}
    at crux.system$start_system$fn__8011.invoke(system.clj:219)
    at clojure.core.protocols$fn__8181.invokeStatic(protocols.clj:168)
    at clojure.core.protocols$fn__8181.invoke(protocols.clj:124)
    at clojure.core.protocols$fn__8136$G__8131__8145.invoke(protocols.clj:19)
    at clojure.core.protocols$seq_reduce.invokeStatic(protocols.clj:31)
    at clojure.core.protocols$fn__8168.invokeStatic(protocols.clj:75)
    at clojure.core.protocols$fn__8168.invoke(protocols.clj:75)
    at clojure.core.protocols$fn__8110$G__8105__8123.invoke(protocols.clj:13)
    at clojure.core$reduce.invokeStatic(core.clj:6830)
    at clojure.core$reduce.invoke(core.clj:6812)
    at crux.system$start_system.invokeStatic(system.clj:203)
    at crux.system$start_system.invoke(system.clj:197)
    at crux.api$start_node.invokeStatic(api.clj:239)
    at crux.api$start_node.invoke(api.clj:218)
    at plants.store__init.load(Unknown Source)
    at plants.store__init.<clinit>(Unknown Source)
    ... 98 more
Caused by: java.lang.NoSuchMethodError: java.nio.ByteBuffer.limit(I)Ljava/nio/ByteBuffer;
    at crux.memory$allocate_buffer.invokeStatic(memory.clj:74)
    at crux.memory$allocate_buffer.invokePrim(memory.clj)
    at crux.kv.index_store$encode_index_version_key_to.invokeStatic(index_store.clj:322)
    at crux.kv.index_store$encode_index_version_key_to.invoke(index_store.clj:321)
    at crux.kv.index_store$check_and_store_index_version.invokeStatic(index_store.clj:349)
    at crux.kv.index_store$check_and_store_index_version.invoke(index_store.clj:340)
    at crux.kv.index_store$__GT_kv_index_store.invokeStatic(index_store.clj:1144)
    at crux.kv.index_store$__GT_kv_index_store.invoke(index_store.clj:1138)
    at crux.system$start_system$fn__8011.invoke(system.clj:211)
    ... 113 more

I am using juxt/crux-core {:mvn/version "RELEASE"} in my deps file.

olymk2 commented 3 years ago

switched to image: clojure:openjdk-11-tools-deps seems to fix it so I guess its an issue with the newer jdk versions

jarohen commented 3 years ago

Fix released as part of "1.18.0-rc1" :rocket:

luposlip commented 3 years ago

👍🏼

ons. 14. jul. 2021 12.51 skrev James Henderson @.***>:

Fix released as part of "1.18.0-rc1" 🚀

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/juxt/crux/issues/1524#issuecomment-879791889, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAF2N23QECXOEJIIZY62CTDTXVT2RANCNFSM454CRPAA .

luposlip commented 3 years ago

For the record - if anyone else experiences this going forward - a simple cleaning (i.e. remove the target folder) might fix this issue.