Fork me on GitHub
#xtdb
<
2023-02-15
>
flefik11:02:41

Is there a bug in the lucene plugin? I can’t even get a minimal example of it working. Following the instructions here: https://docs.xtdb.com/extensions/1.23.0/full-text-search/ SOLVED

flefik11:02:50

This is the exception:

1. Caused by java.io.FileNotFoundException
   Could not locate xtdb__init.class, xtdb.clj or xtdb.cljc on classpath.

                   RT.java:  466  clojure.lang.RT/load
                   RT.java:  428  clojure.lang.RT/load
                  core.clj: 6126  clojure.core/load/fn
                  core.clj: 6125  clojure.core/load
                  core.clj: 6109  clojure.core/load
               RestFn.java:  408  clojure.lang.RestFn/invoke
                  core.clj: 5908  clojure.core/load-one
                  core.clj: 5903  clojure.core/load-one
                  core.clj: 5948  clojure.core/load-lib/fn
                  core.clj: 5947  clojure.core/load-lib
                  core.clj: 5928  clojure.core/load-lib
               RestFn.java:  142  clojure.lang.RestFn/applyTo
                  core.clj:  667  clojure.core/apply
                  core.clj: 5985  clojure.core/load-libs
                  core.clj: 5969  clojure.core/load-libs
               RestFn.java:  137  clojure.lang.RestFn/applyTo
                  core.clj:  667  clojure.core/apply
                  core.clj: 6007  clojure.core/require
                  core.clj: 6007  clojure.core/require
               RestFn.java:  137  clojure.lang.RestFn/applyTo
                  core.clj:  665  clojure.core/apply
                  core.clj: 6079  clojure.core/serialized-require
                  core.clj: 6088  clojure.core/requiring-resolve
                  core.clj: 6082  clojure.core/requiring-resolve
                system.clj:  107  xtdb.system.ModuleRef/fn
                system.clj:  106  xtdb.system.ModuleRef/prepare_dep
                system.clj:  134  xtdb.system/opts-reducer/f
     PersistentVector.java:  343  clojure.lang.PersistentVector/reduce
                  core.clj: 6827  clojure.core/reduce
                  core.clj: 6810  clojure.core/reduce
                system.clj:  156  xtdb.system/prep-system
                system.clj:  141  xtdb.system/prep-system
                system.clj:  142  xtdb.system/prep-system
                system.clj:  141  xtdb.system/prep-system
                   api.clj:  297  xtdb.api/start-node
                   api.clj:  284  xtdb.api/start-node

flefik11:02:13

deps.edn:

com.xtdb/xtdb-core        {:mvn/version "1.23.0"}
        com.xtdb/xtdb-jdbc        {:mvn/version "1.23.0"}
        com.xtdb/xtdb-rocksdb     {:mvn/version "1.23.0"}
        com.xtdb/xtdb-http-server {:mvn/version "1.23.0"}
        com.xtdb/xtdb-lucene      {:mvn/version "1.23.0"}

flefik11:02:36

And the offending code:

(xtdb/start-node
          {:xtdb.jdbc/connection-pool {:dialect {:xtdb/module 'xtdb.jdbc.psql/->dialect}
                                       :db-spec (:db (config))}
           :xtdb/tx-log               {:xtdb/module     'xtdb.jdbc/->tx-log
                                       :connection-pool :xtdb.jdbc/connection-pool}
           :xtdb/document-store       {:xtdb/module     'xtdb.jdbc/->document-store
                                       :connection-pool :xtdb.jdbc/connection-pool}
           :xtdb/index-store {:kv-store {:xtdb/module 'xtdb.rocksdb/->kv-store
                                         :db-dir (io/file "/tmp/rocksdb/db")}}
           :xtdb/lucene-store {:db-dir "lucene-dir"}
           })

flefik11:02:05

If I comment :xtdb/lucene-store {:db-dir "lucene-dir"} it no longer throws. I’ve also tried omitting :db-dir

flefik11:02:06

{:xtdb.error/error-type :illegal-argument, :xtdb.error/error-key :error-locating-module, :xtdb.error/message \"Error locating module\", :module xtdb/->lucene-store}

flefik11:02:57

Solved it, really silly mistake, should be: :xtdb.lucene/lucene-store

refset13:02:56

ah, I've been there 🙂 thanks for following-up with the resolution!

👍 2