java.lang.UnsupportedOperationException

Terracotta Project Issue Tracker | Giuseppe Santoro | 6 years ago
  1. 0

    The addJobListener method on ListenerManager if called with only listener instance parameter and without any matcher thrown an UnsupportedOperationException by AbstractList. Stacktrace: java.lang.UnsupportedOperationException at java.util.AbstractList.add(AbstractList.java:131) at java.util.AbstractList.add(AbstractList.java:91) at org.quartz.core.ListenerManagerImpl.addJobListener(ListenerManagerImpl.java:47) at org.quartz.core.ListenerManagerImpl.addJobListener(ListenerManagerImpl.java:33) at tyche.scheduler.quartz.StartDrawingEventScheduler.start(StartDrawingEventScheduler.java:49) at tyche.scheduler.StartDrawingEventSchedulerStressTest.scheduler_stress_test(StartDrawingEventSchedulerStressTest.java:113) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28) at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74) at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:82) at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:240) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184) at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61) at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70) at org.junit.runners.ParentRunner.run(ParentRunner.java:236) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:180) at org.junit.runners.Suite.runChild(Suite.java:128) at org.junit.runners.Suite.runChild(Suite.java:24) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184) at org.junit.runners.ParentRunner.run(ParentRunner.java:236) at org.junit.runner.JUnitCore.run(JUnitCore.java:157) at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:65) this is the source code, you cannot use the Arrays.asList that return "a fixed-size list backed by the specified array" public void addJobListener(JobListener jobListener, Matcher<JobKey> ... matchers) { addJobListener(jobListener, Arrays.asList(matchers)); } public void addJobListener(JobListener jobListener, List<Matcher<JobKey>> matchers) { if (jobListener.getName() == null || jobListener.getName().length() == 0) { throw new IllegalArgumentException( "JobListener name cannot be empty."); } synchronized (globalJobListeners) { globalJobListeners.put(jobListener.getName(), jobListener); if(matchers == null) matchers = new LinkedList<Matcher<JobKey>>(); if(matchers.size() == 0) matchers.add(EverythingMatcher.allJobs()); globalJobListenersMatchers.put(jobListener.getName(), matchers); } }

    Terracotta Project Issue Tracker | 6 years ago | Giuseppe Santoro
    java.lang.UnsupportedOperationException
  2. 0

    The addJobListener method on ListenerManager if called with only listener instance parameter and without any matcher thrown an UnsupportedOperationException by AbstractList. Stacktrace: java.lang.UnsupportedOperationException at java.util.AbstractList.add(AbstractList.java:131) at java.util.AbstractList.add(AbstractList.java:91) at org.quartz.core.ListenerManagerImpl.addJobListener(ListenerManagerImpl.java:47) at org.quartz.core.ListenerManagerImpl.addJobListener(ListenerManagerImpl.java:33) at tyche.scheduler.quartz.StartDrawingEventScheduler.start(StartDrawingEventScheduler.java:49) at tyche.scheduler.StartDrawingEventSchedulerStressTest.scheduler_stress_test(StartDrawingEventSchedulerStressTest.java:113) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28) at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74) at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:82) at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:240) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184) at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61) at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70) at org.junit.runners.ParentRunner.run(ParentRunner.java:236) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:180) at org.junit.runners.Suite.runChild(Suite.java:128) at org.junit.runners.Suite.runChild(Suite.java:24) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184) at org.junit.runners.ParentRunner.run(ParentRunner.java:236) at org.junit.runner.JUnitCore.run(JUnitCore.java:157) at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:65) this is the source code, you cannot use the Arrays.asList that return "a fixed-size list backed by the specified array" public void addJobListener(JobListener jobListener, Matcher<JobKey> ... matchers) { addJobListener(jobListener, Arrays.asList(matchers)); } public void addJobListener(JobListener jobListener, List<Matcher<JobKey>> matchers) { if (jobListener.getName() == null || jobListener.getName().length() == 0) { throw new IllegalArgumentException( "JobListener name cannot be empty."); } synchronized (globalJobListeners) { globalJobListeners.put(jobListener.getName(), jobListener); if(matchers == null) matchers = new LinkedList<Matcher<JobKey>>(); if(matchers.size() == 0) matchers.add(EverythingMatcher.allJobs()); globalJobListenersMatchers.put(jobListener.getName(), matchers); } }

    Terracotta Project Issue Tracker | 6 years ago | Giuseppe Santoro
    java.lang.UnsupportedOperationException
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    Cannot add null to ArrayList - UnsupportedOperationException

    Google Groups | 6 years ago | Ratnadeep Rakshit
    java.lang.UnsupportedOperationException
  5. 0

    Adding jar archive to classpath with javac - Java Programming - KnowCoding.com

    knowcoding.com | 1 year ago
    java.lang.UnsupportedOperationException

  1. tvrmsmith 1 times, last 1 week ago
  2. sriharshakiran 1 times, last 7 months ago
  3. Dragos 5 times, last 8 months ago
  4. poroszd 1 times, last 8 months ago
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.UnsupportedOperationException

    No message provided

    at java.util.AbstractList.add()
  2. Java RT
    AbstractList.add
    1. java.util.AbstractList.add(AbstractList.java:131)
    2. java.util.AbstractList.add(AbstractList.java:91)
    2 frames
  3. quartz
    ListenerManagerImpl.addJobListener
    1. org.quartz.core.ListenerManagerImpl.addJobListener(ListenerManagerImpl.java:47)
    2. org.quartz.core.ListenerManagerImpl.addJobListener(ListenerManagerImpl.java:33)
    2 frames
  4. tyche.scheduler.quartz
    StartDrawingEventScheduler.start
    1. tyche.scheduler.quartz.StartDrawingEventScheduler.start(StartDrawingEventScheduler.java:49)
    1 frame
  5. tyche.scheduler
    StartDrawingEventSchedulerStressTest.scheduler_stress_test
    1. tyche.scheduler.StartDrawingEventSchedulerStressTest.scheduler_stress_test(StartDrawingEventSchedulerStressTest.java:113)
    1 frame
  6. Java RT
    DelegatingMethodAccessorImpl.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    3 frames
  7. JUnit
    RunBefores.evaluate
    1. org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
    2. org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
    3. org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
    4. org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
    5. org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
    5 frames
  8. Spring TestContext
    SpringJUnit4ClassRunner.runChild
    1. org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74)
    2. org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:82)
    3. org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72)
    4. org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:240)
    4 frames
  9. JUnit
    ParentRunner$2.evaluate
    1. org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
    2. org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
    3. org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
    4. org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
    5. org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
    6. org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
    6 frames
  10. Spring TestContext
    RunAfterTestClassCallbacks.evaluate
    1. org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
    2. org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
    2 frames
  11. JUnit
    ParentRunner.run
    1. org.junit.runners.ParentRunner.run(ParentRunner.java:236)
    1 frame
  12. Spring TestContext
    SpringJUnit4ClassRunner.run
    1. org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:180)
    1 frame
  13. JUnit
    JUnitCore.run
    1. org.junit.runners.Suite.runChild(Suite.java:128)
    2. org.junit.runners.Suite.runChild(Suite.java:24)
    3. org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
    4. org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
    5. org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
    6. org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
    7. org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
    8. org.junit.runners.ParentRunner.run(ParentRunner.java:236)
    9. org.junit.runner.JUnitCore.run(JUnitCore.java:157)
    9 frames
  14. IDEA
    JUnitStarter.main
    1. com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:65)
    1 frame