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

tip

If you're using boot 1.4.x you need to modify the @springBootTest annotation to @SpringBootTest(classes = DataFlowServerConfiguration.class). 1.3.8 doesn't have this problem as well.

tip

Spring Boot 1.4 changed their annotation system a little. Try using the @SpringBootApplication annotation for better results.


rafael

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

  • 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)
    via by Veit Hoffmann,
  • 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)
    via by Veit Hoffmann,
  • Error while Implementing HATEOAS in Spring
    via Stack Overflow by Sunil Ks
    ,
  • ImageMagick again
    via by Aliaksandr Barysiuk,
  • When Polling for Mail messages (Pop3) the following error is logged repeatedly: {code} 17:51:07.412 ERROR [task-scheduler-1][org.springframework.integration.handler.LoggingHandler] java.lang.IllegalStateException: Pseudo Transactional Message Source returned null resource at org.springframework.util.Assert.state(Assert.java:384) at org.springframework.integration.endpoint.SourcePollingChannelAdapter.doPoll(SourcePollingChannelAdapter.java:111) at org.springframework.integration.endpoint.AbstractPollingEndpoint$1.call(AbstractPollingEndpoint.java:146) at org.springframework.integration.endpoint.AbstractPollingEndpoint$1.call(AbstractPollingEndpoint.java:144) at org.springframework.integration.endpoint.AbstractPollingEndpoint$Poller$1.run(AbstractPollingEndpoint.java:207) at org.springframework.integration.util.ErrorHandlingTaskExecutor$1.run(ErrorHandlingTaskExecutor.java:52) at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:48) at org.springframework.integration.util.ErrorHandlingTaskExecutor.execute(ErrorHandlingTaskExecutor.java:49) at org.springframework.integration.endpoint.AbstractPollingEndpoint$Poller.run(AbstractPollingEndpoint.java:202) at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:53) at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:81) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:680) {code}
    via by Gunnar Hillert,
    • 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)

    Users with the same issue

    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    tvrmsmith
    tvrmsmith2 times, last one,
    Axelo
    Axelo1 times, last one,
    olle.hallin
    olle.hallin2 times, last one,
    62 more bugmates