java.lang.RuntimeException: Unable to resolve symbol: http-service in this context, compiling:(omf/http/http_service.clj:108:1)

JIRA | Kevin Corcoran | 2 years ago
  1. 0

    From a github issue at https://github.com/puppetlabs/trapperkeeper/issues/150 ... Steps to reproduce: 1. In project.clj set :aot :all. 2. Use puppetlabs.trapperkeeper.core/defservice to define a service that gets loaded by bootstrap.cfg. 3. Attempt to create an uberjar. Result: Following error is thrown during compilation: {noformat} Compiling omf.http.http-service Exception in thread "main" java.lang.RuntimeException: Unable to resolve symbol: http-service in this context, compiling:(omf/http/http_service.clj:108:1) at clojure.lang.Compiler.analyze(Compiler.java:6464) at clojure.lang.Compiler.analyze(Compiler.java:6406) at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3719) at clojure.lang.Compiler.analyzeSeq(Compiler.java:6646) at clojure.lang.Compiler.analyze(Compiler.java:6445) at clojure.lang.Compiler.analyze(Compiler.java:6406) at clojure.lang.Compiler.compile1(Compiler.java:7221) at clojure.lang.Compiler.compile(Compiler.java:7292) at clojure.lang.RT.compile(RT.java:398) at clojure.lang.RT.load(RT.java:438) at clojure.lang.RT.load(RT.java:411) at clojure.core$load$fn__5066.invoke(core.clj:5641) at clojure.core$load.doInvoke(core.clj:5640) at clojure.lang.RestFn.invoke(RestFn.java:408) at clojure.core$load_one.invoke(core.clj:5446) at clojure.core$compile$fn__5071.invoke(core.clj:5652) at clojure.core$compile.invoke(core.clj:5651) at user$eval9.invoke(form-init8589420194764528579.clj:1) at clojure.lang.Compiler.eval(Compiler.java:6703) at clojure.lang.Compiler.eval(Compiler.java:6693) at clojure.lang.Compiler.load(Compiler.java:7130) at clojure.lang.Compiler.loadFile(Compiler.java:7086) at clojure.main$load_script.invoke(main.clj:274) at clojure.main$init_opt.invoke(main.clj:279) at clojure.main$initialize.invoke(main.clj:307) at clojure.main$null_opt.invoke(main.clj:342) at clojure.main$main.doInvoke(main.clj:420) at clojure.lang.RestFn.invoke(RestFn.java:421) at clojure.lang.Var.invoke(Var.java:383) at clojure.lang.AFn.applyToHelper(AFn.java:156) at clojure.lang.Var.applyTo(Var.java:700) at clojure.main.main(main.java:37) {noformat} Workaround: The error does not occur when defservice is directly used from the puppetlabs.trapperkeeper.services namespace. This also seems to affect the nREPL service. From https://github.com/puppetlabs/trapperkeeper/issues/151 ... Steps to reproduce: 1. In project.clj set :aot :all. 2. In bootstrap.cfg add the following line: puppetlabs.trapperkeeper.services.nrepl.nrepl-service/nrepl-service 3. Run lein uberjar. 4. Attempt to start the standalone jar. Result: TrapperKeeper service does not start and the following exception is thrown: {noformat} Exception in thread "main" java.lang.RuntimeException: Unable to resolve symbol: nrepl-service in this context, compiling:(puppetlabs/trapperkeeper/services/nrepl/nrepl_service.clj:48:1) at clojure.lang.Compiler.analyze(Compiler.java:6464) at clojure.lang.Compiler.analyze(Compiler.java:6406) at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3719) at clojure.lang.Compiler.analyzeSeq(Compiler.java:6646) at clojure.lang.Compiler.analyze(Compiler.java:6445) at clojure.lang.Compiler.analyze(Compiler.java:6406) at clojure.lang.Compiler.eval(Compiler.java:6707) at clojure.lang.Compiler.load(Compiler.java:7130) at clojure.lang.RT.loadResourceScript(RT.java:370) at clojure.lang.RT.loadResourceScript(RT.java:361) at clojure.lang.RT.load(RT.java:440) at clojure.lang.RT.load(RT.java:411) at clojure.core$load$fn__5066.invoke(core.clj:5641) at clojure.core$load.doInvoke(core.clj:5640) at clojure.lang.RestFn.invoke(RestFn.java:408) at clojure.core$load_one.invoke(core.clj:5446) at clojure.core$load_lib$fn__5015.invoke(core.clj:5486) at clojure.core$load_lib.doInvoke(core.clj:5485) at clojure.lang.RestFn.applyTo(RestFn.java:142) at clojure.core$apply.invoke(core.clj:626) at clojure.core$load_libs.doInvoke(core.clj:5524) at clojure.lang.RestFn.applyTo(RestFn.java:137) at clojure.core$apply.invoke(core.clj:626) at clojure.core$require.doInvoke(core.clj:5607) at clojure.lang.RestFn.invoke(RestFn.java:408) at puppetlabs.trapperkeeper.bootstrap$resolve_service_BANG_$fn__8506.invoke(bootstrap.clj:44) at puppetlabs.trapperkeeper.bootstrap$resolve_service_BANG_.invoke(bootstrap.clj:44) at puppetlabs.trapperkeeper.bootstrap$parse_bootstrap_config_BANG_$iter__8529__8533$fn__8534.invoke(bootstrap.clj:157) at clojure.lang.LazySeq.sval(LazySeq.java:40) at clojure.lang.LazySeq.seq(LazySeq.java:49) at clojure.lang.Cons.next(Cons.java:39) at clojure.lang.RT.next(RT.java:598) at clojure.core$next.invoke(core.clj:64) at clojure.core$every_QMARK_.invoke(core.clj:2495) at puppetlabs.trapperkeeper.bootstrap$parse_bootstrap_config_BANG_.invoke(bootstrap.clj:151) at puppetlabs.trapperkeeper.core$boot_with_cli_data.invoke(core.clj:114) at puppetlabs.trapperkeeper.core$run.invoke(core.clj:145) at puppetlabs.trapperkeeper.core$main.doInvoke(core.clj:160) at clojure.lang.RestFn.invoke(RestFn.java:421) at clojure.lang.Var.invoke(Var.java:383) at clojure.lang.AFn.applyToHelper(AFn.java:156) at clojure.lang.Var.applyTo(Var.java:700) at clojure.core$apply.invoke(core.clj:624) at puppetlabs.trapperkeeper.main$_main.doInvoke(main.clj:7) at clojure.lang.RestFn.invoke(RestFn.java:421) at clojure.lang.Var.invoke(Var.java:383) at user$eval5.invoke(form-init2155226568292534607.clj:1) at clojure.lang.Compiler.eval(Compiler.java:6703) at clojure.lang.Compiler.eval(Compiler.java:6693) at clojure.lang.Compiler.load(Compiler.java:7130) at clojure.lang.Compiler.loadFile(Compiler.java:7086) at clojure.main$load_script.invoke(main.clj:274) at clojure.main$init_opt.invoke(main.clj:279) at clojure.main$initialize.invoke(main.clj:307) at clojure.main$null_opt.invoke(main.clj:342) at clojure.main$main.doInvoke(main.clj:420) at clojure.lang.RestFn.invoke(RestFn.java:421) at clojure.lang.Var.invoke(Var.java:383) at clojure.lang.AFn.applyToHelper(AFn.java:156) at clojure.lang.Var.applyTo(Var.java:700) at clojure.main.main(main.java:37) {noformat}

    JIRA | 2 years ago | Kevin Corcoran
    java.lang.RuntimeException: Unable to resolve symbol: http-service in this context, compiling:(omf/http/http_service.clj:108:1)
  2. 0

    From a github issue at https://github.com/puppetlabs/trapperkeeper/issues/150 ... Steps to reproduce: 1. In project.clj set :aot :all. 2. Use puppetlabs.trapperkeeper.core/defservice to define a service that gets loaded by bootstrap.cfg. 3. Attempt to create an uberjar. Result: Following error is thrown during compilation: {noformat} Compiling omf.http.http-service Exception in thread "main" java.lang.RuntimeException: Unable to resolve symbol: http-service in this context, compiling:(omf/http/http_service.clj:108:1) at clojure.lang.Compiler.analyze(Compiler.java:6464) at clojure.lang.Compiler.analyze(Compiler.java:6406) at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3719) at clojure.lang.Compiler.analyzeSeq(Compiler.java:6646) at clojure.lang.Compiler.analyze(Compiler.java:6445) at clojure.lang.Compiler.analyze(Compiler.java:6406) at clojure.lang.Compiler.compile1(Compiler.java:7221) at clojure.lang.Compiler.compile(Compiler.java:7292) at clojure.lang.RT.compile(RT.java:398) at clojure.lang.RT.load(RT.java:438) at clojure.lang.RT.load(RT.java:411) at clojure.core$load$fn__5066.invoke(core.clj:5641) at clojure.core$load.doInvoke(core.clj:5640) at clojure.lang.RestFn.invoke(RestFn.java:408) at clojure.core$load_one.invoke(core.clj:5446) at clojure.core$compile$fn__5071.invoke(core.clj:5652) at clojure.core$compile.invoke(core.clj:5651) at user$eval9.invoke(form-init8589420194764528579.clj:1) at clojure.lang.Compiler.eval(Compiler.java:6703) at clojure.lang.Compiler.eval(Compiler.java:6693) at clojure.lang.Compiler.load(Compiler.java:7130) at clojure.lang.Compiler.loadFile(Compiler.java:7086) at clojure.main$load_script.invoke(main.clj:274) at clojure.main$init_opt.invoke(main.clj:279) at clojure.main$initialize.invoke(main.clj:307) at clojure.main$null_opt.invoke(main.clj:342) at clojure.main$main.doInvoke(main.clj:420) at clojure.lang.RestFn.invoke(RestFn.java:421) at clojure.lang.Var.invoke(Var.java:383) at clojure.lang.AFn.applyToHelper(AFn.java:156) at clojure.lang.Var.applyTo(Var.java:700) at clojure.main.main(main.java:37) {noformat} Workaround: The error does not occur when defservice is directly used from the puppetlabs.trapperkeeper.services namespace. This also seems to affect the nREPL service. From https://github.com/puppetlabs/trapperkeeper/issues/151 ... Steps to reproduce: 1. In project.clj set :aot :all. 2. In bootstrap.cfg add the following line: puppetlabs.trapperkeeper.services.nrepl.nrepl-service/nrepl-service 3. Run lein uberjar. 4. Attempt to start the standalone jar. Result: TrapperKeeper service does not start and the following exception is thrown: {noformat} Exception in thread "main" java.lang.RuntimeException: Unable to resolve symbol: nrepl-service in this context, compiling:(puppetlabs/trapperkeeper/services/nrepl/nrepl_service.clj:48:1) at clojure.lang.Compiler.analyze(Compiler.java:6464) at clojure.lang.Compiler.analyze(Compiler.java:6406) at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3719) at clojure.lang.Compiler.analyzeSeq(Compiler.java:6646) at clojure.lang.Compiler.analyze(Compiler.java:6445) at clojure.lang.Compiler.analyze(Compiler.java:6406) at clojure.lang.Compiler.eval(Compiler.java:6707) at clojure.lang.Compiler.load(Compiler.java:7130) at clojure.lang.RT.loadResourceScript(RT.java:370) at clojure.lang.RT.loadResourceScript(RT.java:361) at clojure.lang.RT.load(RT.java:440) at clojure.lang.RT.load(RT.java:411) at clojure.core$load$fn__5066.invoke(core.clj:5641) at clojure.core$load.doInvoke(core.clj:5640) at clojure.lang.RestFn.invoke(RestFn.java:408) at clojure.core$load_one.invoke(core.clj:5446) at clojure.core$load_lib$fn__5015.invoke(core.clj:5486) at clojure.core$load_lib.doInvoke(core.clj:5485) at clojure.lang.RestFn.applyTo(RestFn.java:142) at clojure.core$apply.invoke(core.clj:626) at clojure.core$load_libs.doInvoke(core.clj:5524) at clojure.lang.RestFn.applyTo(RestFn.java:137) at clojure.core$apply.invoke(core.clj:626) at clojure.core$require.doInvoke(core.clj:5607) at clojure.lang.RestFn.invoke(RestFn.java:408) at puppetlabs.trapperkeeper.bootstrap$resolve_service_BANG_$fn__8506.invoke(bootstrap.clj:44) at puppetlabs.trapperkeeper.bootstrap$resolve_service_BANG_.invoke(bootstrap.clj:44) at puppetlabs.trapperkeeper.bootstrap$parse_bootstrap_config_BANG_$iter__8529__8533$fn__8534.invoke(bootstrap.clj:157) at clojure.lang.LazySeq.sval(LazySeq.java:40) at clojure.lang.LazySeq.seq(LazySeq.java:49) at clojure.lang.Cons.next(Cons.java:39) at clojure.lang.RT.next(RT.java:598) at clojure.core$next.invoke(core.clj:64) at clojure.core$every_QMARK_.invoke(core.clj:2495) at puppetlabs.trapperkeeper.bootstrap$parse_bootstrap_config_BANG_.invoke(bootstrap.clj:151) at puppetlabs.trapperkeeper.core$boot_with_cli_data.invoke(core.clj:114) at puppetlabs.trapperkeeper.core$run.invoke(core.clj:145) at puppetlabs.trapperkeeper.core$main.doInvoke(core.clj:160) at clojure.lang.RestFn.invoke(RestFn.java:421) at clojure.lang.Var.invoke(Var.java:383) at clojure.lang.AFn.applyToHelper(AFn.java:156) at clojure.lang.Var.applyTo(Var.java:700) at clojure.core$apply.invoke(core.clj:624) at puppetlabs.trapperkeeper.main$_main.doInvoke(main.clj:7) at clojure.lang.RestFn.invoke(RestFn.java:421) at clojure.lang.Var.invoke(Var.java:383) at user$eval5.invoke(form-init2155226568292534607.clj:1) at clojure.lang.Compiler.eval(Compiler.java:6703) at clojure.lang.Compiler.eval(Compiler.java:6693) at clojure.lang.Compiler.load(Compiler.java:7130) at clojure.lang.Compiler.loadFile(Compiler.java:7086) at clojure.main$load_script.invoke(main.clj:274) at clojure.main$init_opt.invoke(main.clj:279) at clojure.main$initialize.invoke(main.clj:307) at clojure.main$null_opt.invoke(main.clj:342) at clojure.main$main.doInvoke(main.clj:420) at clojure.lang.RestFn.invoke(RestFn.java:421) at clojure.lang.Var.invoke(Var.java:383) at clojure.lang.AFn.applyToHelper(AFn.java:156) at clojure.lang.Var.applyTo(Var.java:700) at clojure.main.main(main.java:37) {noformat}

    JIRA | 2 years ago | Kevin Corcoran
    java.lang.RuntimeException: Unable to resolve symbol: http-service in this context, compiling:(omf/http/http_service.clj:108:1)
  3. 0

    Services defined via `puppetlabs.trapperkeeper.core/defservice` cannot be resolved in a AOT compiled executable.

    GitHub | 2 years ago | timclemons
    java.lang.RuntimeException: Unable to resolve symbol: http-service in this context, compiling:(omf/http/http_service.clj:108:1)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    "Web development with Clojure" - compiling error: No such var: sql/create-table

    Stack Overflow | 3 years ago | Pauli
    java.lang.RuntimeException: No such var: sql/create-table, compiling:(tonglindb/models/db.clj:10:3)
  6. 0

    Namespace conflict with Schema

    GitHub | 1 year ago | calumats
    java.lang.RuntimeException: Unable to resolve symbol: missing-required-key in this context, compiling:(server/api.clj:23:17)

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.RuntimeException

      Unable to resolve symbol: http-service in this context, compiling:(omf/http/http_service.clj:108:1)

      at clojure.lang.Compiler.analyze()
    2. Clojure
      core$compile.invoke
      1. clojure.lang.Compiler.analyze(Compiler.java:6464)
      2. clojure.lang.Compiler.analyze(Compiler.java:6406)
      3. clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3719)
      4. clojure.lang.Compiler.analyzeSeq(Compiler.java:6646)
      5. clojure.lang.Compiler.analyze(Compiler.java:6445)
      6. clojure.lang.Compiler.analyze(Compiler.java:6406)
      7. clojure.lang.Compiler.compile1(Compiler.java:7221)
      8. clojure.lang.Compiler.compile(Compiler.java:7292)
      9. clojure.lang.RT.compile(RT.java:398)
      10. clojure.lang.RT.load(RT.java:438)
      11. clojure.lang.RT.load(RT.java:411)
      12. clojure.core$load$fn__5066.invoke(core.clj:5641)
      13. clojure.core$load.doInvoke(core.clj:5640)
      14. clojure.lang.RestFn.invoke(RestFn.java:408)
      15. clojure.core$load_one.invoke(core.clj:5446)
      16. clojure.core$compile$fn__5071.invoke(core.clj:5652)
      17. clojure.core$compile.invoke(core.clj:5651)
      17 frames
    3. Unknown
      user$eval9.invoke
      1. user$eval9.invoke(form-init8589420194764528579.clj:1)
      1 frame
    4. Clojure
      main.main
      1. clojure.lang.Compiler.eval(Compiler.java:6703)
      2. clojure.lang.Compiler.eval(Compiler.java:6693)
      3. clojure.lang.Compiler.load(Compiler.java:7130)
      4. clojure.lang.Compiler.loadFile(Compiler.java:7086)
      5. clojure.main$load_script.invoke(main.clj:274)
      6. clojure.main$init_opt.invoke(main.clj:279)
      7. clojure.main$initialize.invoke(main.clj:307)
      8. clojure.main$null_opt.invoke(main.clj:342)
      9. clojure.main$main.doInvoke(main.clj:420)
      10. clojure.lang.RestFn.invoke(RestFn.java:421)
      11. clojure.lang.Var.invoke(Var.java:383)
      12. clojure.lang.AFn.applyToHelper(AFn.java:156)
      13. clojure.lang.Var.applyTo(Var.java:700)
      14. clojure.main.main(main.java:37)
      14 frames