Skip to content

No method in method in multimethod 'init-key' for dispatch value: #102

Description

@margaretjoanmiller

Hi! I'm trying to convert the template project to boot but when I try to build a jar of the main class I get this error on runtime

Exception in thread "main" clojure.lang.ExceptionInfo: Error on key :duct.profile/base when building system {:reason :integrant.core/build-threw-exception, :system {}, :function #object[clojure.lang.MultiFn 0x5972d253 "clojure.lang.MultiFn@5972d253"], :key :duct.profile/base, :value {:duct.core/project-ns redblack-duct, :duct.router/ataraxy {:routes {[:get "/example"] [:redblack-duct.handler/example]}}, :redblack-duct.handler/example {}}}
	at integrant.core$build_exception.invokeStatic(core.cljc:283)
	at integrant.core$build_exception.invoke(core.cljc:282)
	at integrant.core$try_build_action.invokeStatic(core.cljc:294)
	at integrant.core$try_build_action.invoke(core.cljc:291)
	at integrant.core$build_key.invokeStatic(core.cljc:300)
	at integrant.core$build_key.invoke(core.cljc:296)
	at clojure.core$partial$fn__5841.invoke(core.clj:2632)
	at clojure.core.protocols$fn__8159.invokeStatic(protocols.clj:168)
	at clojure.core.protocols$fn__8159.invoke(protocols.clj:124)
	at clojure.core.protocols$fn__8114$G__8109__8123.invoke(protocols.clj:19)
	at clojure.core.protocols$seq_reduce.invokeStatic(protocols.clj:31)
	at clojure.core.protocols$fn__8146.invokeStatic(protocols.clj:75)
	at clojure.core.protocols$fn__8146.invoke(protocols.clj:75)
	at clojure.core.protocols$fn__8088$G__8083__8101.invoke(protocols.clj:13)
	at clojure.core$reduce.invokeStatic(core.clj:6828)
	at clojure.core$reduce.invoke(core.clj:6810)
	at integrant.core$build.invokeStatic(core.cljc:321)
	at integrant.core$build.invoke(core.cljc:303)
	at integrant.core$init.invokeStatic(core.cljc:418)
	at integrant.core$init.invoke(core.cljc:410)
	at duct.core$build_config.invokeStatic(core.clj:182)
	at duct.core$build_config.invoke(core.clj:173)
	at duct.core$prep_config.invokeStatic(core.clj:193)
	at duct.core$prep_config.invoke(core.clj:184)
	at duct.core$exec_config.invokeStatic(core.clj:225)
	at duct.core$exec_config.invoke(core.clj:213)
	at redblack_duct.main$_main.invokeStatic(main.clj:12)
	at redblack_duct.main$_main.doInvoke(main.clj:7)
	at clojure.lang.RestFn.invoke(RestFn.java:397)
	at clojure.lang.AFn.applyToHelper(AFn.java:152)
	at clojure.lang.RestFn.applyTo(RestFn.java:132)
	at redblack_duct.main.main(Unknown Source)
Caused by: java.lang.IllegalArgumentException: No method in multimethod 'init-key' for dispatch value: :duct.profile/base
	at clojure.lang.MultiFn.getFn(MultiFn.java:156)
	at clojure.lang.MultiFn.invoke(MultiFn.java:233)
	at integrant.core$try_build_action.invokeStatic(core.cljc:292)
	... 29 more

I did comment out the db stuff from the config.edn temporarily like so

{:duct.profile/base
 {:duct.core/project-ns redblack-duct

  :duct.router/ataraxy
  {:routes {[:get "/example"] [:redblack-duct.handler/example]}}

  :redblack-duct.handler/example{}
  ;; {:db #ig/ref :duct.database/sql}
  }

 :duct.profile/dev   #duct/include "dev"
 :duct.profile/local #duct/include "local"
 :duct.profile/prod  {}

 :duct.module/logging {}
 :duct.module.web/api
 {}
 :duct.module/cljs
 {:main redblack-duct.client}
 ;; :duct.module/sql
 ;; {}
 :duct.module.web/site
 {}}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions