ava.lang.Exception: Stack trace

JIRA | Jeremy Barlow | 3 years ago
  1. 0

    I have noticed one case in which the Trapperkeeper -main function is called twice for one "lein run" invocation. This occurs when I specify an argument for --bootstrap-config and/or --config which refers to a file which cannot be found. I verified the second invocation of -main by putting a println trace statement at the beginning of -main. For several other cases that I've traced, I haven't seen the second invocation of -main, including: - Bad cli arg caught by clj-kitchensink (e.g., add "--bogus" to the end of the "lein run" command line). - Exception thrown in `service` init which triggers normal shutdown processing. - Manually introduced exception thrown inside the body of the "main" function. In conjunction with the case which showed the second invocation, I also dumped the stack to the console. Below are the stacks for the first and second invocation. Note that the second invocation has a number of frames involving reflection code which do not appear in the first invocation: First invocation: java.lang.Exception: Stack trace at java.lang.Thread.dumpStack(Thread.java:1364) at puppetlabs.trapperkeeper.main$_main.doInvoke(main.clj:10) at clojure.lang.RestFn.invoke(RestFn.java:457) at clojure.lang.Var.invoke(Var.java:427) at user$eval536$fn__538.invoke(form-init7654551998651054391.clj:1) at user$eval536.invoke(form-init7654551998651054391.clj:1) at clojure.lang.Compiler.eval(Compiler.java:6619) at clojure.lang.Compiler.eval(Compiler.java:6609) at clojure.lang.Compiler.load(Compiler.java:7064) at clojure.lang.Compiler.loadFile(Compiler.java:7020) at clojure.main$load_script.invoke(main.clj:294) at clojure.main$init_opt.invoke(main.clj:299) at clojure.main$initialize.invoke(main.clj:327) at clojure.main$null_opt.invoke(main.clj:362) at clojure.main$main.doInvoke(main.clj:440) at clojure.lang.RestFn.invoke(RestFn.java:421) at clojure.lang.Var.invoke(Var.java:419) at clojure.lang.AFn.applyToHelper(AFn.java:163) at clojure.lang.Var.applyTo(Var.java:532) at clojure.main.main(main.java:37) Second invocation: ava.lang.Exception: Stack trace at java.lang.Thread.dumpStack(Thread.java:1364) at puppetlabs.trapperkeeper.main$_main.doInvoke(main.clj:10) at clojure.lang.RestFn.applyTo(RestFn.java:137) at puppetlabs.trapperkeeper.main.main(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at clojure.lang.Reflector.invokeMatchingMethod(Reflector.java:93) at clojure.lang.Reflector.invokeStaticMethod(Reflector.java:207) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at clojure.lang.Reflector.invokeMatchingMethod(Reflector.java:93) at clojure.lang.Reflector.invokeStaticMethod(Reflector.java:207) at user$eval536.invoke(form-init7654551998651054391.clj:1) at clojure.lang.Compiler.eval(Compiler.java:6619) at clojure.lang.Compiler.eval(Compiler.java:6609) at clojure.lang.Compiler.load(Compiler.java:7064) at clojure.lang.Compiler.loadFile(Compiler.java:7020) at clojure.main$load_script.invoke(main.clj:294) at clojure.main$init_opt.invoke(main.clj:299) at clojure.main$initialize.invoke(main.clj:327) at clojure.main$null_opt.invoke(main.clj:362) at clojure.main$main.doInvoke(main.clj:440) at clojure.lang.RestFn.invoke(RestFn.java:421) at clojure.lang.Var.invoke(Var.java:419) at clojure.lang.AFn.applyToHelper(AFn.java:163) at clojure.lang.Var.applyTo(Var.java:532) at clojure.main.main(main.java:37) Not sure if this is a problem with something Trapperkeeper is doing or something lein/clojure is doing. Note that for my testing I was using Leiningen 2.3.4 (latest stable at time this ticket was submitted) in conjunction with JDK 7 (1.7.0_51).

    JIRA | 3 years ago | Jeremy Barlow
    ava.lang.Exception: Stack trace
  2. 0

    I have noticed one case in which the Trapperkeeper -main function is called twice for one "lein run" invocation. This occurs when I specify an argument for --bootstrap-config and/or --config which refers to a file which cannot be found. I verified the second invocation of -main by putting a println trace statement at the beginning of -main. For several other cases that I've traced, I haven't seen the second invocation of -main, including: - Bad cli arg caught by clj-kitchensink (e.g., add "--bogus" to the end of the "lein run" command line). - Exception thrown in `service` init which triggers normal shutdown processing. - Manually introduced exception thrown inside the body of the "main" function. In conjunction with the case which showed the second invocation, I also dumped the stack to the console. Below are the stacks for the first and second invocation. Note that the second invocation has a number of frames involving reflection code which do not appear in the first invocation: First invocation: java.lang.Exception: Stack trace at java.lang.Thread.dumpStack(Thread.java:1364) at puppetlabs.trapperkeeper.main$_main.doInvoke(main.clj:10) at clojure.lang.RestFn.invoke(RestFn.java:457) at clojure.lang.Var.invoke(Var.java:427) at user$eval536$fn__538.invoke(form-init7654551998651054391.clj:1) at user$eval536.invoke(form-init7654551998651054391.clj:1) at clojure.lang.Compiler.eval(Compiler.java:6619) at clojure.lang.Compiler.eval(Compiler.java:6609) at clojure.lang.Compiler.load(Compiler.java:7064) at clojure.lang.Compiler.loadFile(Compiler.java:7020) at clojure.main$load_script.invoke(main.clj:294) at clojure.main$init_opt.invoke(main.clj:299) at clojure.main$initialize.invoke(main.clj:327) at clojure.main$null_opt.invoke(main.clj:362) at clojure.main$main.doInvoke(main.clj:440) at clojure.lang.RestFn.invoke(RestFn.java:421) at clojure.lang.Var.invoke(Var.java:419) at clojure.lang.AFn.applyToHelper(AFn.java:163) at clojure.lang.Var.applyTo(Var.java:532) at clojure.main.main(main.java:37) Second invocation: ava.lang.Exception: Stack trace at java.lang.Thread.dumpStack(Thread.java:1364) at puppetlabs.trapperkeeper.main$_main.doInvoke(main.clj:10) at clojure.lang.RestFn.applyTo(RestFn.java:137) at puppetlabs.trapperkeeper.main.main(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at clojure.lang.Reflector.invokeMatchingMethod(Reflector.java:93) at clojure.lang.Reflector.invokeStaticMethod(Reflector.java:207) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at clojure.lang.Reflector.invokeMatchingMethod(Reflector.java:93) at clojure.lang.Reflector.invokeStaticMethod(Reflector.java:207) at user$eval536.invoke(form-init7654551998651054391.clj:1) at clojure.lang.Compiler.eval(Compiler.java:6619) at clojure.lang.Compiler.eval(Compiler.java:6609) at clojure.lang.Compiler.load(Compiler.java:7064) at clojure.lang.Compiler.loadFile(Compiler.java:7020) at clojure.main$load_script.invoke(main.clj:294) at clojure.main$init_opt.invoke(main.clj:299) at clojure.main$initialize.invoke(main.clj:327) at clojure.main$null_opt.invoke(main.clj:362) at clojure.main$main.doInvoke(main.clj:440) at clojure.lang.RestFn.invoke(RestFn.java:421) at clojure.lang.Var.invoke(Var.java:419) at clojure.lang.AFn.applyToHelper(AFn.java:163) at clojure.lang.Var.applyTo(Var.java:532) at clojure.main.main(main.java:37) Not sure if this is a problem with something Trapperkeeper is doing or something lein/clojure is doing. Note that for my testing I was using Leiningen 2.3.4 (latest stable at time this ticket was submitted) in conjunction with JDK 7 (1.7.0_51).

    JIRA | 3 years ago | Jeremy Barlow
    ava.lang.Exception: Stack trace
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    java Exception - 此生的理想 - ITeye技术网站

    iteye.com | 1 year ago
    ava.lang.Exception: DEBUG -- CLOSE BY CLIENT STACK TRACE
  5. 0

    how to check if an attribute exists or not?

    Google Groups | 3 years ago | suman jakkula
    ava.lang.Exception: processing rule: (q__56 ?c)

    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. ava.lang.Exception

      Stack trace

      at java.lang.Thread.dumpStack()
    2. Java RT
      Thread.dumpStack
      1. java.lang.Thread.dumpStack(Thread.java:1364)
      1 frame
    3. puppetlabs.trapperkeeper
      main$_main.doInvoke
      1. puppetlabs.trapperkeeper.main$_main.doInvoke(main.clj:10)
      1 frame
    4. Clojure
      RestFn.applyTo
      1. clojure.lang.RestFn.applyTo(RestFn.java:137)
      1 frame
    5. puppetlabs.trapperkeeper
      main.main
      1. puppetlabs.trapperkeeper.main.main(Unknown Source)
      1 frame
    6. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:606)
      4 frames
    7. Clojure
      Reflector.invokeStaticMethod
      1. clojure.lang.Reflector.invokeMatchingMethod(Reflector.java:93)
      2. clojure.lang.Reflector.invokeStaticMethod(Reflector.java:207)
      2 frames
    8. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:606)
      4 frames
    9. Clojure
      Reflector.invokeStaticMethod
      1. clojure.lang.Reflector.invokeMatchingMethod(Reflector.java:93)
      2. clojure.lang.Reflector.invokeStaticMethod(Reflector.java:207)
      2 frames
    10. Unknown
      user$eval536.invoke
      1. user$eval536.invoke(form-init7654551998651054391.clj:1)
      1 frame
    11. Clojure
      main.main
      1. clojure.lang.Compiler.eval(Compiler.java:6619)
      2. clojure.lang.Compiler.eval(Compiler.java:6609)
      3. clojure.lang.Compiler.load(Compiler.java:7064)
      4. clojure.lang.Compiler.loadFile(Compiler.java:7020)
      5. clojure.main$load_script.invoke(main.clj:294)
      6. clojure.main$init_opt.invoke(main.clj:299)
      7. clojure.main$initialize.invoke(main.clj:327)
      8. clojure.main$null_opt.invoke(main.clj:362)
      9. clojure.main$main.doInvoke(main.clj:440)
      10. clojure.lang.RestFn.invoke(RestFn.java:421)
      11. clojure.lang.Var.invoke(Var.java:419)
      12. clojure.lang.AFn.applyToHelper(AFn.java:163)
      13. clojure.lang.Var.applyTo(Var.java:532)
      14. clojure.main.main(main.java:37)
      14 frames