java.lang.reflect.InvocationTargetException

This exception has no message.

Samebug tips1

You could me missing na annotation (@Service or @Component) or a definition in the xml. Also, look if the class where your implementation is located is properly scanned.

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web23840

  • via Terracotta by johannr, 11 months ago
    This exception has no message.
  • via Terracotta by pgovindraj, 11 months ago
    This exception has no message.
  • via Terracotta by bradleyw, 11 months ago
    This exception has no message.
  • Stack trace

    • java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58) Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [tests.controller.MainCtrl] is defined: expected single bean but found 0: at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:271) at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1101) at tests.controller.MainCtrl.main(MainCtrl.java:23) ... 5 more

    Write tip

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

    Users with the same issue

    Once, 1 week ago
    Once, 1 month ago
    Unknown user
    Once, 1 month ago
    4 times, 9 months ago
    6 times, 9 months ago
    26 more bugmates