how to solve bean exception in spring framework? :    

    package test;
    
    import org.springframework.context.ApplicationContext;
    
    import org.springframework.context.support.ClassPathXmlApplicationContext;
    
    import beans.Test;
    
    public class Client 
    {
    
    
    public static void main(String args[])
    
    {
    
    ApplicationContext ap=new ClassPathXmlApplicationContext("res/spring.xml");
    
    Test t=(Test)ap.getBean("t");
    
    t.printData();
    
    }
    }

———————————————————————————————————

    package beans;
    
    public class Test {
    
    private String name;
    
    private int age;
    
    public Test(String name) {
    
    this.name=name;
    
    }
    
    public Test(int age)
     
    {
    
    this.age=age;
    
    }
    
    public void printData()
    
    {
    
    System.out.println("age="+age);
    
    System.out.println("name="+name);
    }
    }

———————————————————————————————————-
**Jun 28, 2016 4:01:06 PM org.springframework.context.support.ClassPathXmlApplicationContext prepareRefresh
INFO: Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@138eb89: startup date [Tue Jun 28 16:01:06 IST 2016]; root of context hierarchy
Jun 28, 2016 4:01:06 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from class path resource [res/spring.xml]
Jun 28, 2016 4:01:06 PM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@616ca2: defining beans [t]; root of factory hierarchy
Jun 28, 2016 4:01:06 PM org.springframework.beans.factory.support.DefaultListableBeanFactory destroySingletons
INFO: Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@616ca2: defining beans [t]; root of factory hierarchy
Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 't' defined in class path resource [res/spring.xml]: Could not resolve matching constructor (hint: specify index/type/name arguments for simple parameters to avoid type ambiguities)**

———————————————————————————————————

    <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN"
    
    "http://www.springframework.org/dtd/spring-beans-2.0.dtd 
    
    (http://www.springframework.org/dtd/spring-beans-2.0.dtd)">
    
    <beans>
    
    <bean id="t" class="beans.Test">
    
    <constructor-arg value="vikram" type="java.Lang.String" index="0"/>
    
    <constructor-arg value="123" type="int" index="1"/>
    
    </bean>
    
    </beans>

