java.lang.IllegalStateException: More than one non-void public method detected with single argument.

Spring JIRA | Veit Hoffmann | 4 years ago
  1. 0

    If BackToBackPatternClassifier has a delegate that inherits from "org.springframework.classify.Classifier" rather than using annotation "org.springframework.classify.annotation.Classifier" the context creation fails with the Exception in the bottom of this description. The reason seems to be a problem in ClassifierAdapter which is called on setRouterDelegate. The behavior can be reproduced with the test case attached. Exception stack trace: java.lang.IllegalStateException: More than one non-void public method detected with single argument. at org.springframework.util.Assert.state(Assert.java:384) at org.springframework.classify.util.MethodInvokerUtils$3.doWith(MethodInvokerUtils.java:202) at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:473) at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:481) at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:451) at org.springframework.classify.util.MethodInvokerUtils.getMethodInvokerForSingleArgument(MethodInvokerUtils.java:194) at org.springframework.classify.ClassifierAdapter.setDelegate(ClassifierAdapter.java:84) at org.springframework.classify.ClassifierAdapter.<init>(ClassifierAdapter.java:48) at org.springframework.classify.BackToBackPatternClassifier.setRouterDelegate(BackToBackPatternClassifier.java:72) at com.generali.appl.referenz.batch.multipleoutput.BackToBackPatternClassifierTests.testSetRouterDelegate(BackToBackPatternClassifierTests.java:48) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.lang.reflect.Method.invoke(Method.java:611) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

    Spring JIRA | 4 years ago | Veit Hoffmann
    java.lang.IllegalStateException: More than one non-void public method detected with single argument.
  2. 0

    If BackToBackPatternClassifier has a delegate that inherits from "org.springframework.classify.Classifier" rather than using annotation "org.springframework.classify.annotation.Classifier" the context creation fails with the Exception in the bottom of this description. The reason seems to be a problem in ClassifierAdapter which is called on setRouterDelegate. The behavior can be reproduced with the test case attached. Exception stack trace: java.lang.IllegalStateException: More than one non-void public method detected with single argument. at org.springframework.util.Assert.state(Assert.java:384) at org.springframework.classify.util.MethodInvokerUtils$3.doWith(MethodInvokerUtils.java:202) at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:473) at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:481) at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:451) at org.springframework.classify.util.MethodInvokerUtils.getMethodInvokerForSingleArgument(MethodInvokerUtils.java:194) at org.springframework.classify.ClassifierAdapter.setDelegate(ClassifierAdapter.java:84) at org.springframework.classify.ClassifierAdapter.<init>(ClassifierAdapter.java:48) at org.springframework.classify.BackToBackPatternClassifier.setRouterDelegate(BackToBackPatternClassifier.java:72) at com.generali.appl.referenz.batch.multipleoutput.BackToBackPatternClassifierTests.testSetRouterDelegate(BackToBackPatternClassifierTests.java:48) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.lang.reflect.Method.invoke(Method.java:611) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

    Spring JIRA | 4 years ago | Veit Hoffmann
    java.lang.IllegalStateException: More than one non-void public method detected with single argument.
  3. 0

    Error while Implementing HATEOAS in Spring

    Stack Overflow | 3 years ago | Sunil Ks
    java.lang.IllegalStateException: Could not find current request via RequestContextHolder
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Using g.applyLayout in controller breaks unit test

    Stack Overflow | 3 years ago | BillGoneMad
    java.lang.IllegalStateException: Cannot return Sitemesh factory it has not been set!
  6. 0

    Rearding spring error : Resource must exist: [class path resource [X:/Content/E/data/FIXED.dat]

    Stack Overflow | 4 years ago | Kosuri Naresh
    java.lang.IllegalStateException: Resource must exist: [class path resource [X:/Content/E/data/FIXED.dat**]]

  1. tvrmsmith 2 times, last 3 weeks ago
  2. tvrmsmith 4 times, last 2 months ago
  3. schoetty 8 times, last 7 months ago
  4. Александр Пастухов 1 times, last 7 months ago
48 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.IllegalStateException

    More than one non-void public method detected with single argument.

    at org.springframework.util.Assert.state()
  2. Spring Core
    Assert.state
    1. org.springframework.util.Assert.state(Assert.java:384)
    1 frame
  3. Spring Retry
    MethodInvokerUtils$3.doWith
    1. org.springframework.classify.util.MethodInvokerUtils$3.doWith(MethodInvokerUtils.java:202)
    1 frame
  4. Spring Core
    ReflectionUtils.doWithMethods
    1. org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:473)
    2. org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:481)
    3. org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:451)
    3 frames
  5. Spring Retry
    BackToBackPatternClassifier.setRouterDelegate
    1. org.springframework.classify.util.MethodInvokerUtils.getMethodInvokerForSingleArgument(MethodInvokerUtils.java:194)
    2. org.springframework.classify.ClassifierAdapter.setDelegate(ClassifierAdapter.java:84)
    3. org.springframework.classify.ClassifierAdapter.<init>(ClassifierAdapter.java:48)
    4. org.springframework.classify.BackToBackPatternClassifier.setRouterDelegate(BackToBackPatternClassifier.java:72)
    4 frames
  6. com.generali.appl
    BackToBackPatternClassifierTests.testSetRouterDelegate
    1. com.generali.appl.referenz.batch.multipleoutput.BackToBackPatternClassifierTests.testSetRouterDelegate(BackToBackPatternClassifierTests.java:48)
    1 frame
  7. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. java.lang.reflect.Method.invoke(Method.java:611)
    2 frames
  8. JUnit4 Runner
    JUnit4TestReference.run
    1. org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
    1 frame
  9. JUnit3 Runner
    RemoteTestRunner.main
    1. org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    2. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
    3. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
    4. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
    5. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
    5 frames