spring framework

This is Narasimha Rao, I am new spring framework current i am learning about jdbctemplete i got an exception called "ClassCastException" org.apache.dbcp..... cannot cast to org.springframework.beans.support.BasicDataSource i have'nt remeber . Public class Demojdbc{ public static void main(String ar[]){ ApplicationContext container=new ClasspathXmlApplicationContext("applicationContext.xml"); JdbcTemplet jt=(JdbcTemplete)container.getBean("jd");//here it classcastexception occurs.help me a little jt.update("insert into product values(1,'santoor',23)"); } }

Recommended
Join the discussion
Be the first to comment on this article. Our Commenting Policies
See more