Thank you for the reply....Actually
I am doing this project where i am using spring with JDBC. I have imported most of the jars from common logging, commons-pool, dbcp also but its still giving me this error:
Apr 11, 2011 1:48:33 PM org.springframework.context.support.AbstractApplic ationContext prepareRefresh
INFO: Refreshing org.springframework.context.support.ClassPathXmlAp plicationContext@133f1d7: startup date [Mon Apr 11 13:48:33 IST 2011]; root of context hierarchy
Apr 11, 2011 1:48:33 PM org.springframework.beans.factory.xml.XmlBeanDefin itionReader loadBeanDefinitions
INFO: Loading XML bean definitions from class path resource [personconfig.xml]
Apr 11, 2011 1:48:33 PM org.springframework.beans.factory.support.DefaultL istableBeanFactory preInstantiateSingletons
INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultL istableBeanFactory@15212bc: defining beans [dataSource,jdbcTemplate,personDAO]; root of factory hierarchy
Apr 11, 2011 1:48:33 PM org.springframework.beans.factory.support.DefaultS ingletonBeanRegistry destroySingletons
INFO: Destroying singletons in org.springframework.beans.factory.support.DefaultL istableBeanFactory@15212bc: defining beans [dataSource,jdbcTemplate,personDAO]; root of factory hierarchy
Exception in
thread "main" org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'dataSource' defined in class path resource [personconfig.xml]: Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: org/apache/commons/pool/impl/GenericObjectPool
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.instantiateBean(Abstrac tAutowireCapableBeanFactory.java:965)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBeanInstance(Abst ractAutowireCapableBeanFactory.java:911)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.doCreateBean(AbstractAu towireCapableBeanFactory.java:485)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.Abstract BeanFactory$1.getObject(AbstractBeanFactory.java:2 95)
at org.springframework.beans.factory.support.DefaultS ingletonBeanRegistry.getSingleton(DefaultSingleton BeanRegistry.java:222)
at org.springframework.beans.factory.support.Abstract BeanFactory.doGetBean(AbstractBeanFactory.java:292 )
at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:194)
at org.springframework.beans.factory.support.DefaultL istableBeanFactory.preInstantiateSingletons(Defaul tListableBeanFactory.java:580)
at org.springframework.context.support.AbstractApplic ationContext.finishBeanFactoryInitialization(Abstr actApplicationContext.java:900)
at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:455)
at org.springframework.context.support.ClassPathXmlAp plicationContext.<init>(ClassPathXmlApplicationCon text.java:139)
at org.springframework.context.support.ClassPathXmlAp plicationContext.<init>(ClassPathXmlApplicationCon text.java:83)
at com.springtry.MyMainClass.main(MyMainClass.java:9)
Caused by: java.lang.NoClassDefFoundError: org/apache/commons/pool/impl/GenericObjectPool
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Unk nown Source)
at java.lang.Class.getConstructor0(Unknown Source)
at java.lang.Class.getDeclaredConstructor(Unknown Source)
at org.springframework.beans.factory.support.SimpleIn stantiationStrategy.instantiate(SimpleInstantiatio nStrategy.java:65)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.instantiateBean(Abstrac tAutowireCapableBeanFactory.java:958)
... 13 more
what is this error can any body help here?
I am on
java 1.6 and the other related jars for JDBC that are there are :
mysql-connector-java-3.1.6-bin.jar
com.springsource.org.apache.commons.dbcp-sources-1.2.2.osgi.jar
com.springsource.org.apache.commons.pool-sources-1.5.3.jar
commons-dbcp.jar
Please let me know if you need additional details
Thank you in advance.
Mike