BeanNotOfRequiredTypeException « Bean « Spring Q&A





1. Fixing BeanNotOfRequiredTypeException on Spring proxy cast on a non-singleton bean?    stackoverflow.com

I'm having an issue with pulling a Spring bean from an application context. When I try;

InnerThread instance = (InnerThread) SpringContextFactory.getApplicationContext().getBean("innerThread", InnerThread.class);
I get;
org.springframework.beans.factory.BeanNotOfRequiredTypeException: Bean named 'innerThread' must be of type [com.generic.InnerThread], but ...

2. Error creating bean throws "BeanNotOfRequiredTypeException"    stackoverflow.com

I am very new to Spring and was trying to execute a test which would wire up the transactional behavior across the test, but when I try to run it, I ...