Newsletter sign-up
View all newsletters

Enterprise Java Newsletter
Stay up to date on the latest tutorials and Java community news posted on JavaWorld

JavaWorld Daily Brew

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)");
}

}