Apr 18th, 2011, 10:38 AM
Can't get rid of "No unique bean found" OR "StackOverflowError"
I have a standard Java EE Setup with Hibernate and Spring. I want to accomplish normal inheritance, one parent 2 children. The problem is that at lesat the parent has to be a spring bean. If all 3 are beans (@Service("csv...Service")) and I extend the parent in the children I get a "No unique bean found"-exception when Initializing the Spring root WebApplicationContext. If I only declare the parent as a bean, (@Service("csv...Service")), and create the 2 children as normal class instances, I get a StackOverflowError. It's calling the constructor hundreds of times for one of the children.