From: Clint H. <cli...@ya...> - 2007-02-21 20:36:27
|
Oops--I neglected to include another part of the exception that might be he= lpful in solving the problem:=0A=0A...=0ACaused by: net.sf.ehcache.CacheExc= eption: Cache org.ddsteps.dataset.CachingDataSetLoader cannot be retrieved.= Please check ehcache.xml=0A at net.sf.ehcache.constructs.blocking.B= lockingCache.<init>(BlockingCache.java:146)=0A at net.sf.ehcache.con= structs.blocking.SelfPopulatingCache.<init>(SelfPopulatingCache.java:101)= =0A at org.ddsteps.dataset.CachingDataSetLoader.<init>(CachingDataSe= tLoader.java:161)=0A...=0A=0A----- Original Message ----=0AFrom: Clint Harr= is <cli...@ya...>=0ATo: dds...@li...=0ASent= : Wednesday, February 21, 2007 3:12:35 PM=0ASubject: Fw: Request for Help: = Can't Instantiate CachingExcelDataLoader=0A=0AHi All,=0A=0AI'm trying to us= e DDStepsSpringTestCase and am receving the following compilation error:=0A= =0A...=0ACaused by: org.springframework.beans.BeanInstantiationException: C= ould not instantiate bean class [org.ddsteps.data.excel.CachingExcelDataLoa= der]: Constructor threw exception; nested exception is org.ddsteps.DDStepsE= xception: Could not create cache for DataSet:s.=0A=0ACaused by: org.ddsteps= .DDStepsException: Could not create cache for DataSet:s.=0A at org.d= dsteps.dataset.CachingDataSetLoader.<init>(CachingDataSetLoader.java:163)= =0A at org.ddsteps.dataset.support.DataSetLoaderFactory.getCachingPr= opertyPlaceholderExcelDataSetLoader(DataSetLoaderFactory.java:103)=0A = at=0A org.ddsteps.data.support.DataLoaderFactory.getCachingExcelDataLoade= r(DataLoaderFactory.java:49)=0A at=0A org.ddsteps.data.excel.Caching= ExcelDataLoader.getInstance(CachingExcelDataLoader.java:61)=0A at or= g.ddsteps.data.excel.CachingExcelDataLoader.<init>(CachingExcelDataLoader.j= ava:50)=0A at sun.reflect.NativeConstructorAccessorImpl.newInstance0= (Native Method)=0A...=0A=0AThe CachingDataSetLoader constructor is as follo= ws:=0A=0A public CachingDataSetLoader(DataSetLoader dataSetLoader) {=0A = =0A super();=0A=0A Validate.notNull(dataSetLoader, "Argument l= oader must not be null");=0A=0A // Data set loader=0A this.da= taSetLoader =3D dataSetLoader;=0A=0A // This will look up a singleto= n cache by name,=0A // on only the SelfPopulatingCache object is our= s.=0A try {=0A cache =3D new SelfPopulatingCache(CACHE_NA= ME, new DataSetFactory());=0A } catch (CacheException e) {=0A = throw new DDStepsException("Could not create cache for DataSet:s.", e)= ;=0A }=0A=0A }=0A =0AI have confirmed that I have the correct = versions of ehcache.jar and ehcache-constructs.jar (i.e., the right version= of SelfPopulatingCache).=0A=0AAlso, my ddsteps-context.xml file is as foll= ows:=0A=0A <bean id=3D"propertyConfigurer"=0A class=3D"org.spring= framework.beans.factory.config.PropertyPlaceholderConfigurer">=0A <p= roperty name=3D"location" value=3D"classpath:/ddsteps-context.properties" /= >=0A </bean>=0A=0A <!-- Data=0A Loader / Excel -->=0A=0A <bean id= =3D"dataLoader" class=3D"org.ddsteps.data.excel.CachingExcelDataLoader" />= =0A=0A <bean id=3D"fixtureLoader" class=3D"org.ddsteps.fixture.dbunit.Ex= celDbUnitFixtureLoader">=0A <constructor-arg ref=3D"dbUnitConnection= Factory"></constructor-arg>=0A <property name=3D"tableNames">=0A = <value>USERS</value>=0A </property>=0A </bean>=0A=0A <= bean id=3D"dbUnitConnectionFactory"=0A class=3D"org.ddsteps.dbunit.Standard= ConnectionFactory">=0A <constructor-arg ref=3D"dataSource" />=0A = </bean>=0A=0A <bean id=3D"dataSource" class=3D"org.springframework.jdbc.= datasource.SingleConnectionDataSource">=0A <property name=3D"driverC= lassName" value=3D"${jdbc.driverClassName}"=0A />=0A <property name= =3D"url" value=3D"${jdbc.url}" />=0A <property name=3D"username" val= ue=3D"${jdbc.username}" />=0A <property name=3D"password" value=3D"$= {jdbc.password}" />=0A <property name=3D"suppressClose" value=3D"tru= e" />=0A </bean>=0A=0ADoes anyone have any ideas?=0A=0AMany thanks for y= our help!=0A=0A-clint=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A |