java.lang.NullPointerException: null

JIRA | Kevin Corcoran | 4 months ago
  1. 0

    I wrote [a new test case in trapperkeeper-filesystem-watcher|https://github.com/KevinCorcoran/trapperkeeper-filesystem-watcher/commit/53f66ce4df19a47c1c51da30d31899cdf4c934e0] which creates 1000 files in a watched directory. This triggers an {{OVERFLOW}} event which returns {{nil}} for {{.context}}. This causes the following error: {code} 2016-07-28 15:21:13,266 ERROR [p.t.s.s.scheduler-core] scheduled job threw error java.lang.NullPointerException: null at sun.nio.fs.UnixPath.toUnixPath(UnixPath.java:198) ~[na:1.8.0_40] at sun.nio.fs.UnixPath.resolve(UnixPath.java:397) ~[na:1.8.0_40] at sun.nio.fs.UnixPath.resolve(UnixPath.java:43) ~[na:1.8.0_40] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_40] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_40] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_40] at java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_40] at clojure.lang.Reflector.invokeMatchingMethod(Reflector.java:93) ~[clojure-1.7.0.jar:na] at clojure.lang.Reflector.invokeInstanceMethod(Reflector.java:28) ~[clojure-1.7.0.jar:na] at puppetlabs.trapperkeeper.services.watcher.filesystem_watch_core$eval21819$clojurize__21824$fn__21825.invoke(filesystem_watch_core.clj:34) ~[na:na] at puppetlabs.trapperkeeper.services.watcher.filesystem_watch_core$eval21819$clojurize__21824.invoke(filesystem_watch_core.clj:29) ~[na:na] at puppetlabs.trapperkeeper.services.watcher.filesystem_watch_core$eval21906$handle_watch_events_BANG___21913$fn__21914$fn__21919.invoke(filesystem_watch_core.clj:130) ~[na:na] at clojure.core$map$fn__4553.invoke(core.clj:2624) ~[clojure-1.7.0.jar:na] at clojure.lang.LazySeq.sval(LazySeq.java:40) ~[clojure-1.7.0.jar:na] at clojure.lang.LazySeq.seq(LazySeq.java:49) ~[clojure-1.7.0.jar:na] at clojure.lang.RT.seq(RT.java:507) ~[clojure-1.7.0.jar:na] at clojure.core$seq__4128.invoke(core.clj:137) ~[clojure-1.7.0.jar:na] at clojure.core$empty_QMARK_.invoke(core.clj:5948) ~[clojure-1.7.0.jar:na] at puppetlabs.trapperkeeper.services.watcher.filesystem_watch_core$eval21906$handle_watch_events_BANG___21913$fn__21914.invoke(filesystem_watch_core.clj:133) ~[na:na] at puppetlabs.trapperkeeper.services.watcher.filesystem_watch_core$eval21906$handle_watch_events_BANG___21913.invoke(filesystem_watch_core.clj:97) ~[na:na] at puppetlabs.trapperkeeper.services.watcher.filesystem_watch_core$handle_events_and_reschedule_BANG_.invoke(filesystem_watch_core.clj:146) ~[na:na] at puppetlabs.trapperkeeper.services.watcher.filesystem_watch_core$handle_events_and_reschedule_BANG_$fn__21960.invoke(filesystem_watch_core.clj:148) ~[na:na] at puppetlabs.trapperkeeper.services.scheduler.scheduler_core$wrap_with_error_logging$fn__7163.invoke(scheduler_core.clj:16) ~[na:na] at clojure.lang.AFn.applyToHelper(AFn.java:152) [clojure-1.7.0.jar:na] at clojure.lang.AFn.applyTo(AFn.java:144) [clojure-1.7.0.jar:na] at clojure.core$apply.invoke(core.clj:630) [clojure-1.7.0.jar:na] at overtone.at_at$wrap_fun_to_remove_itself$fn__7086.doInvoke(at_at.clj:103) [na:na] at clojure.lang.RestFn.invoke(RestFn.java:397) [clojure-1.7.0.jar:na] at clojure.lang.AFn.call(AFn.java:18) [clojure-1.7.0.jar:na] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_40] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [na:1.8.0_40] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [na:1.8.0_40] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_40] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_40] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_40] {code}

    JIRA | 4 months ago | Kevin Corcoran
    java.lang.NullPointerException: null
  2. Speed up your debug routine!

    Automated exception search integrated into your IDE

  3. 0

    RuntimeException: get id on [models.SecurityRole] type[null] threw error.

    GitHub | 3 years ago | fbessadok
    java.lang.RuntimeException: get id on [models.SecurityRole] type[null] threw error.
  4. 0

    Spring Social Facebook Tuturial error

    Stack Overflow | 1 year ago | CESCO
    java.lang.NullPointerException: null
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.NullPointerException

    null

    at sun.nio.fs.UnixPath.toUnixPath()
  2. Java RT
    Method.invoke
    1. sun.nio.fs.UnixPath.toUnixPath(UnixPath.java:198)[na:1.8.0_40]
    2. sun.nio.fs.UnixPath.resolve(UnixPath.java:397)[na:1.8.0_40]
    3. sun.nio.fs.UnixPath.resolve(UnixPath.java:43)[na:1.8.0_40]
    4. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[na:1.8.0_40]
    5. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[na:1.8.0_40]
    6. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[na:1.8.0_40]
    7. java.lang.reflect.Method.invoke(Method.java:497)[na:1.8.0_40]
    7 frames
  3. Clojure
    Reflector.invokeInstanceMethod
    1. clojure.lang.Reflector.invokeMatchingMethod(Reflector.java:93)[clojure-1.7.0.jar:na]
    2. clojure.lang.Reflector.invokeInstanceMethod(Reflector.java:28)[clojure-1.7.0.jar:na]
    2 frames
  4. puppetlabs.trapperkeeper.services
    filesystem_watch_core$eval21906$handle_watch_events_BANG___21913$fn__21914$fn__21919.invoke
    1. puppetlabs.trapperkeeper.services.watcher.filesystem_watch_core$eval21819$clojurize__21824$fn__21825.invoke(filesystem_watch_core.clj:34)[na:na]
    2. puppetlabs.trapperkeeper.services.watcher.filesystem_watch_core$eval21819$clojurize__21824.invoke(filesystem_watch_core.clj:29)[na:na]
    3. puppetlabs.trapperkeeper.services.watcher.filesystem_watch_core$eval21906$handle_watch_events_BANG___21913$fn__21914$fn__21919.invoke(filesystem_watch_core.clj:130)[na:na]
    3 frames
  5. Clojure
    core$empty_QMARK_.invoke
    1. clojure.core$map$fn__4553.invoke(core.clj:2624)[clojure-1.7.0.jar:na]
    2. clojure.lang.LazySeq.sval(LazySeq.java:40)[clojure-1.7.0.jar:na]
    3. clojure.lang.LazySeq.seq(LazySeq.java:49)[clojure-1.7.0.jar:na]
    4. clojure.lang.RT.seq(RT.java:507)[clojure-1.7.0.jar:na]
    5. clojure.core$seq__4128.invoke(core.clj:137)[clojure-1.7.0.jar:na]
    6. clojure.core$empty_QMARK_.invoke(core.clj:5948)[clojure-1.7.0.jar:na]
    6 frames
  6. puppetlabs.trapperkeeper.services
    scheduler_core$wrap_with_error_logging$fn__7163.invoke
    1. puppetlabs.trapperkeeper.services.watcher.filesystem_watch_core$eval21906$handle_watch_events_BANG___21913$fn__21914.invoke(filesystem_watch_core.clj:133)[na:na]
    2. puppetlabs.trapperkeeper.services.watcher.filesystem_watch_core$eval21906$handle_watch_events_BANG___21913.invoke(filesystem_watch_core.clj:97)[na:na]
    3. puppetlabs.trapperkeeper.services.watcher.filesystem_watch_core$handle_events_and_reschedule_BANG_.invoke(filesystem_watch_core.clj:146)[na:na]
    4. puppetlabs.trapperkeeper.services.watcher.filesystem_watch_core$handle_events_and_reschedule_BANG_$fn__21960.invoke(filesystem_watch_core.clj:148)[na:na]
    5. puppetlabs.trapperkeeper.services.scheduler.scheduler_core$wrap_with_error_logging$fn__7163.invoke(scheduler_core.clj:16)[na:na]
    5 frames
  7. Clojure
    core$apply.invoke
    1. clojure.lang.AFn.applyToHelper(AFn.java:152)[clojure-1.7.0.jar:na]
    2. clojure.lang.AFn.applyTo(AFn.java:144)[clojure-1.7.0.jar:na]
    3. clojure.core$apply.invoke(core.clj:630)[clojure-1.7.0.jar:na]
    3 frames
  8. overtone
    at_at$wrap_fun_to_remove_itself$fn__7086.doInvoke
    1. overtone.at_at$wrap_fun_to_remove_itself$fn__7086.doInvoke(at_at.clj:103)[na:na]
    1 frame
  9. Clojure
    AFn.call
    1. clojure.lang.RestFn.invoke(RestFn.java:397)[clojure-1.7.0.jar:na]
    2. clojure.lang.AFn.call(AFn.java:18)[clojure-1.7.0.jar:na]
    2 frames
  10. Java RT
    Thread.run
    1. java.util.concurrent.FutureTask.run(FutureTask.java:266)[na:1.8.0_40]
    2. java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)[na:1.8.0_40]
    3. java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)[na:1.8.0_40]
    4. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[na:1.8.0_40]
    5. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[na:1.8.0_40]
    6. java.lang.Thread.run(Thread.java:745)[na:1.8.0_40]
    6 frames