java.lang.IndexOutOfBoundsException: null

GitHub | GreenUtil | 2 months ago
  1. 0

    If a rule in a trapperkeeper-authorization config includes an allow/deny backreference but no corresponding capture group is present in the rule's path, an ugly-looking error message is returned to the caller. For example, I modified the ring-example to include the following rule: {noformat} authorization: { version: 1 rules: [ { match-request: { path: "^/hello/all-allowed$" type: "regex" } allow: "$1" name: "users allowed" sort-order: 500 }, ... ] } {noformat} When making a request to the server which matches the rule, http://localhost:8080/hello/all-allowed, the following error message is returned in the HTTP response to the caller: {noformat} 2015-10-05 14:10:52,851 WARN [o.e.j.s.HttpChannel] /hello/all-allowed java.lang.IndexOutOfBoundsException: null at clojure.lang.PersistentVector.arrayFor( ~[clojure-1.6.0.jar:na] at clojure.lang.PersistentVector.nth( ~[clojure-1.6.0.jar:na] at clojure.lang.RT.nth( ~[clojure-1.6.0.jar:na] at puppetlabs.trapperkeeper.authorization.acl$substitute_backreference$fn__9150.invoke(acl.clj:174) ~[na:na] at clojure.string$replace_by.invoke(string.clj:67) ~[clojure-1.6.0.jar:na] at clojure.string$replace.invoke(string.clj:106) ~[clojure-1.6.0.jar:na] at puppetlabs.trapperkeeper.authorization.acl$substitute_backreference.invoke(acl.clj:174) ~[na:na] at puppetlabs.trapperkeeper.authorization.acl$interpolate_backreference$fn__9154.invoke(acl.clj:180) ~[na:na] {noformat} In this case, there are no capture groups in the regex so the substitution for "$1" fails. The error message should more clearly indicate the actual problem. Ideally, it would also seem better if this could be validated as the rules are first loaded - not just lazily when rules are being evaluated - so that a user can detect the existence of a faulty rule right away.

    JIRA | 1 year ago | Jeremy Barlow
    java.lang.IndexOutOfBoundsException: null
  2. Speed up your debug routine!

    Automated exception search integrated into your IDE

  3. 0

    Issue with reusing widget in Tab Panel

    Google Groups | 10 years ago | zalym
    java.lang.IndexOutOfBoundsException: null
  4. 0

    Issue with reusing widget in Tab Panel

    Google Groups | 10 years ago | zalym
    java.lang.IndexOutOfBoundsException: 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.IndexOutOfBoundsException


      at java.nio.Buffer.checkIndex()
    2. Java RT
      1. java.nio.Buffer.checkIndex([na:1.8.0_91]
      2. java.nio.ByteBufferAsFloatBufferL.get([na:1.8.0_91]
      2 frames
    3. org.bimserver.clashdetection
      1. org.bimserver.clashdetection.Triangle.<init>([na:na]
      2. org.bimserver.clashdetection.ClashDetector.trianglesClash([na:na]
      3. org.bimserver.clashdetection.ClashDetector.findClashes([na:na]
      4. org.bimserver.clashdetection.ClashDetectionServiceBcfPlugin.newRevision([na:na]
      4 frames
    4. org.bimserver.plugins
      1 frame
    5. org.bimserver.notifications
      1. org.bimserver.notifications.InternalServicesManager$3$[classes/:na]
      1 frame