java.lang.RuntimeException: Unable to resolve symbol: nrepl-service in this context, compiling:(puppetlabs/trapperkeeper/services/nrepl/nrepl_service.clj:48: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: nrepl-service in this context, compiling:(puppetlabs/trapperkeeper/services/nrepl/nrepl_service.clj:48: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: nrepl-service in this context, compiling:(puppetlabs/trapperkeeper/services/nrepl/nrepl_service.clj:48:1)
  3. 0

    Loading nrepl service with AOT compiled executable throws exception.

    GitHub | 2 years ago | timclemons
    java.lang.RuntimeException: Unable to resolve symbol: nrepl-service in this context, compiling:(puppetlabs/trapperkeeper/services/nrepl/nrepl_service.clj:48:1)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    No such var: clojure.core/clojurewerkz.neocons.rest.relationships

    GitHub | 3 years ago | prayagupd
    java.lang.RuntimeException: No such var: clojure.core/clojurewerkz.neocons.rest.relationships, compiling:(nepleaks_engine/services/neo4jService.clj:6:1)
  6. 0

    InvocationTargetException

    GitHub | 4 years ago | AshtonKem
    java.lang.RuntimeException: java.io.FileNotFoundException: Could not locate clojure/instant__init.class or clojure/instant.clj on classpath:

    2 unregistered visitors
    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: nrepl-service in this context, compiling:(puppetlabs/trapperkeeper/services/nrepl/nrepl_service.clj:48:1)

      at clojure.lang.Compiler.analyze()
    2. Clojure
      RestFn.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.eval(Compiler.java:6707)
      8. clojure.lang.Compiler.load(Compiler.java:7130)
      9. clojure.lang.RT.loadResourceScript(RT.java:370)
      10. clojure.lang.RT.loadResourceScript(RT.java:361)
      11. clojure.lang.RT.load(RT.java:440)
      12. clojure.lang.RT.load(RT.java:411)
      13. clojure.core$load$fn__5066.invoke(core.clj:5641)
      14. clojure.core$load.doInvoke(core.clj:5640)
      15. clojure.lang.RestFn.invoke(RestFn.java:408)
      16. clojure.core$load_one.invoke(core.clj:5446)
      17. clojure.core$load_lib$fn__5015.invoke(core.clj:5486)
      18. clojure.core$load_lib.doInvoke(core.clj:5485)
      19. clojure.lang.RestFn.applyTo(RestFn.java:142)
      20. clojure.core$apply.invoke(core.clj:626)
      21. clojure.core$load_libs.doInvoke(core.clj:5524)
      22. clojure.lang.RestFn.applyTo(RestFn.java:137)
      23. clojure.core$apply.invoke(core.clj:626)
      24. clojure.core$require.doInvoke(core.clj:5607)
      25. clojure.lang.RestFn.invoke(RestFn.java:408)
      25 frames
    3. puppetlabs.trapperkeeper
      bootstrap$parse_bootstrap_config_BANG_$iter__8529__8533$fn__8534.invoke
      1. puppetlabs.trapperkeeper.bootstrap$resolve_service_BANG_$fn__8506.invoke(bootstrap.clj:44)
      2. puppetlabs.trapperkeeper.bootstrap$resolve_service_BANG_.invoke(bootstrap.clj:44)
      3. puppetlabs.trapperkeeper.bootstrap$parse_bootstrap_config_BANG_$iter__8529__8533$fn__8534.invoke(bootstrap.clj:157)
      3 frames
    4. Clojure
      core$every_QMARK_.invoke
      1. clojure.lang.LazySeq.sval(LazySeq.java:40)
      2. clojure.lang.LazySeq.seq(LazySeq.java:49)
      3. clojure.lang.Cons.next(Cons.java:39)
      4. clojure.lang.RT.next(RT.java:598)
      5. clojure.core$next.invoke(core.clj:64)
      6. clojure.core$every_QMARK_.invoke(core.clj:2495)
      6 frames
    5. puppetlabs.trapperkeeper
      core$main.doInvoke
      1. puppetlabs.trapperkeeper.bootstrap$parse_bootstrap_config_BANG_.invoke(bootstrap.clj:151)
      2. puppetlabs.trapperkeeper.core$boot_with_cli_data.invoke(core.clj:114)
      3. puppetlabs.trapperkeeper.core$run.invoke(core.clj:145)
      4. puppetlabs.trapperkeeper.core$main.doInvoke(core.clj:160)
      4 frames
    6. Clojure
      core$apply.invoke
      1. clojure.lang.RestFn.invoke(RestFn.java:421)
      2. clojure.lang.Var.invoke(Var.java:383)
      3. clojure.lang.AFn.applyToHelper(AFn.java:156)
      4. clojure.lang.Var.applyTo(Var.java:700)
      5. clojure.core$apply.invoke(core.clj:624)
      5 frames
    7. puppetlabs.trapperkeeper
      main$_main.doInvoke
      1. puppetlabs.trapperkeeper.main$_main.doInvoke(main.clj:7)
      1 frame
    8. Clojure
      Var.invoke
      1. clojure.lang.RestFn.invoke(RestFn.java:421)
      2. clojure.lang.Var.invoke(Var.java:383)
      2 frames
    9. Unknown
      user$eval5.invoke
      1. user$eval5.invoke(form-init2155226568292534607.clj:1)
      1 frame
    10. 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