Post a Job  |   Ask a Question?   |   Already registered? login or register
Manohar Mullagura
14/04/2016 04:50 PM

Exception in thread "main" org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'semester1' defined in class path resource [com/cdi/common/application-context.xml]: Unsatisfied dependency expressed through constructor argument with index 0 of type [java.util.List]: Ambiguous constructor argument types - did you specify the correct bean references as constructor arguments?

What is the wrong with the code?
Spam    7 Comments

14/04/2016 18:08:27
You should probably remove the name attribute in [<constructor-arg name="subjects"] as you are not using @ConstructorProperties for the constructor. Please remove name attribute from <constructor-arg> and try.

14/04/2016 20:51:22
remove the name attribute in [<constructor-arg name="subjects"] from application-context.xml file and also remove super(); from constructor and try . it will be work properly

14/04/2016 20:53:08
sorry! file

14/04/2016 22:34:38
but it giving error plz anyone can tell me what is the problem

15/04/2016 01:17:41
you must be remove the name attribute of <constructor-arg name="subjects"/> You should write the following code which is given below:--->

21/04/2016 00:17:01
Without changing the code, just write the @ConstructorProperties("subjects") in public Semester(List<String> subjects) will be work..@

29/04/2016 22:55:31
thank you

Languages :