Uploaded image for project: 'TorqueBox'
  1. TorqueBox
  2. TORQUE-1083

java.lang.ArrayIndexOutOfBoundsException: -1 stops job from executing

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.3.0
    • Fix Version/s: None
    • Component/s: Jobs
    • Labels:
      None

      Description

      Didn't see this problem in 2.0.3, but after a period of time (few days) a job I have schedule to run every 5 minutes stopped running due to the following error:

      23:30:00,001 ERROR [org.torquebox.core.runtime] (JobScheduler$spider-knob.yml_Worker-1) Error during evaluation: begin; require %q(torquebox-messaging); true; rescue LoadError; $stderr.puts 'ERROR: torquebox-messagi
      ng gem not loaded - skipping destination injection'; false; end: java.lang.ArrayIndexOutOfBoundsException: -1
      at org.jruby.runtime.ThreadContext.getCurrentScope(ThreadContext.java:243) [jruby.jar:]
      at org.jruby.Ruby.evalScriptlet(Ruby.java:396) [jruby.jar:]
      at org.torquebox.core.util.RuntimeHelper$6.call(RuntimeHelper.java:176) [torquebox-core.jar:2.3.0]
      at org.torquebox.core.util.RuntimeHelper$6.call(RuntimeHelper.java:173) [torquebox-core.jar:2.3.0]
      at org.torquebox.core.util.RuntimeHelper.withinContext(RuntimeHelper.java:249) [torquebox-core.jar:2.3.0]
      at org.torquebox.core.util.RuntimeHelper.evalScriptlet(RuntimeHelper.java:173) [torquebox-core.jar:2.3.0]
      at org.torquebox.core.util.RuntimeHelper.evalScriptlet(RuntimeHelper.java:169) [torquebox-core.jar:2.3.0]
      at org.torquebox.messaging.injection.LiveDestination.convert(LiveDestination.java:47) [torquebox-messaging.jar:2.3.0]
      at org.torquebox.core.component.InjectionRegistry.convert(InjectionRegistry.java:76) [torquebox-core.jar:2.3.0]
      at org.torquebox.core.component.InjectionRegistry.getConvertedRegistry(InjectionRegistry.java:64) [torquebox-core.jar:2.3.0]
      at org.torquebox.core.component.InjectionRegistry.merge(InjectionRegistry.java:56) [torquebox-core.jar:2.3.0]
      at org.torquebox.core.component.ComponentResolver.prepareInjections(ComponentResolver.java:77) [torquebox-core.jar:2.3.0]
      at org.torquebox.core.component.ComponentResolver.createComponent(ComponentResolver.java:67) [torquebox-core.jar:2.3.0]
      at org.torquebox.core.component.ComponentResolver.resolve(ComponentResolver.java:54) [torquebox-core.jar:2.3.0]
      at org.torquebox.jobs.RubyJobProxy.execute(RubyJobProxy.java:56)
      at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
      at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557)

      23:30:00,002 INFO [org.quartz.core.JobRunShell] (JobScheduler$spider-knob.yml_Worker-1) Job spider-knob.yml.publishinmontargets threw a JobExecutionException: : org.quartz.JobExecutionException: java.lang.ArrayInde
      xOutOfBoundsException: -1 [See nested exception: java.lang.ArrayIndexOutOfBoundsException: -1]
      at org.torquebox.jobs.RubyJobProxy.execute(RubyJobProxy.java:67) [torquebox-jobs.jar:2.3.0]
      at org.quartz.core.JobRunShell.run(JobRunShell.java:213) [quartz.jar:]
      at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557) [quartz.jar:]
      Caused by: java.lang.ArrayIndexOutOfBoundsException: -1
      at org.jruby.runtime.ThreadContext.getCurrentScope(ThreadContext.java:243) [jruby.jar:]
      at org.jruby.Ruby.evalScriptlet(Ruby.java:396) [jruby.jar:]
      at org.torquebox.core.util.RuntimeHelper$6.call(RuntimeHelper.java:176) [torquebox-core.jar:2.3.0]
      at org.torquebox.core.util.RuntimeHelper$6.call(RuntimeHelper.java:173) [torquebox-core.jar:2.3.0]
      at org.torquebox.core.util.RuntimeHelper.withinContext(RuntimeHelper.java:249) [torquebox-core.jar:2.3.0]
      at org.torquebox.core.util.RuntimeHelper.evalScriptlet(RuntimeHelper.java:173) [torquebox-core.jar:2.3.0]
      at org.torquebox.core.util.RuntimeHelper.evalScriptlet(RuntimeHelper.java:169) [torquebox-core.jar:2.3.0]
      at org.torquebox.messaging.injection.LiveDestination.convert(LiveDestination.java:47)
      at org.torquebox.core.component.InjectionRegistry.convert(InjectionRegistry.java:76) [torquebox-core.jar:2.3.0]
      at org.torquebox.core.component.InjectionRegistry.getConvertedRegistry(InjectionRegistry.java:64) [torquebox-core.jar:2.3.0]
      at org.torquebox.core.component.InjectionRegistry.merge(InjectionRegistry.java:56) [torquebox-core.jar:2.3.0]
      at org.torquebox.core.component.ComponentResolver.prepareInjections(ComponentResolver.java:77) [torquebox-core.jar:2.3.0]
      at org.torquebox.core.component.ComponentResolver.createComponent(ComponentResolver.java:67) [torquebox-core.jar:2.3.0]
      at org.torquebox.core.component.ComponentResolver.resolve(ComponentResolver.java:54) [torquebox-core.jar:2.3.0]
      at org.torquebox.jobs.RubyJobProxy.execute(RubyJobProxy.java:56) [torquebox-jobs.jar:2.3.0]
      ... 2 more

      Job will start working again after redeploying application. Note, I actually have two jobs running every 5 minutes (publishtargets and publishinmontargets). From the errors I've seen, both are effected and it probably explains why there are two sets of backtraces. I'm going to disable one of the jobs since the results of that job is currently not used by the rest of my code. I will update this ticket if I see this issue again with only one job scheduled.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                synfinatic Aaron Turner
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: