From: <kip...@ya...> - 2007-02-21 21:20:19
|
Problem solved. It turns out that another part of my application was includ= ing an ehcache.xml file in the classpath--this was causing problems for som= e reason.=0A=0A----- Original Message ----=0AFrom: Clint Harris <clinthharr= is...@ya...>=0ATo: dds...@li...=0ASent: Wednesday, F= ebruary 21, 2007 3:36:20 PM=0ASubject: [ddsteps-user] Fw: Request for Help:= Can't Instantiate CachingExcelDataLoader=0A=0AOops--I neglected to include= another part of the exception that might be helpful in solving the problem= :=0A=0A...=0ACaused by: net.sf.ehcache.CacheException: Cache org.ddsteps.da= taset.CachingDataSetLoader cannot be retrieved. Please check ehcache.xml=0A= at net.sf.ehcache.constructs.blocking.BlockingCache.<init>(Blocking= Cache.java:146)=0A at net.sf.ehcache.constructs.blocking.SelfPopulat= ingCache.<init>(SelfPopulatingCache.java:101)=0A at=0A org.ddsteps.d= ataset.CachingDataSetLoader.<init>(CachingDataSetLoader.java:161)=0A...=0A= =0A----- Original Message ----=0AFrom: Clint Harris <cli...@ya...= >=0ATo: dds...@li...=0ASent: Wednesday, February 21, = 2007 3:12:35 PM=0ASubject: Fw: Request for Help: Can't Instantiate CachingE= xcelDataLoader=0A=0AHi All,=0A=0AI'm trying to use DDStepsSpringTestCase an= d am receving the following compilation error:=0A=0A...=0ACaused by:=0A org= .springframework.beans.BeanInstantiationException: Could not instantiate be= an class [org.ddsteps.data.excel.CachingExcelDataLoader]: Constructor threw= exception; nested exception is org.ddsteps.DDStepsException: Could not cre= ate cache for DataSet:s.=0A=0ACaused by: org.ddsteps.DDStepsException: Coul= d not create cache for DataSet:s.=0A at org.ddsteps.dataset.CachingD= ataSetLoader.<init>(CachingDataSetLoader.java:163)=0A at=0A org.ddst= eps.dataset.support.DataSetLoaderFactory.getCachingPropertyPlaceholderExcel= DataSetLoader(DataSetLoaderFactory.java:103)=0A at=0A org.ddsteps.da= ta.support.DataLoaderFactory.getCachingExcelDataLoader(DataLoaderFactory.ja= va:49)=0A at=0A org.ddsteps.data.excel.CachingExcelDataLoader.getIns= tance(CachingExcelDataLoader.java:61)=0A at org.ddsteps.data.excel.C= achingExcelDataLoader.<init>(CachingExcelDataLoader.java:50)=0A at s= un.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)=0A...= =0A=0AThe CachingDataSetLoader constructor is as follows:=0A=0A public C= achingDataSetLoader(DataSetLoader dataSetLoader) {=0A =0A super();=0A= =0A Validate.notNull(dataSetLoader, "Argument loader must not be nul= l");=0A=0A // Data set loader=0A this.dataSetLoader =3D dataS= etLoader;=0A=0A // This will look up a singleton cache by name,=0A = // on only the SelfPopulatingCache object is ours.=0A try {=0A= cache =3D new SelfPopulatingCache(CACHE_NAME, new DataSetFactor= y());=0A } catch (CacheException e) {=0A throw new DDStep= sException("Could not create cache for DataSet:s.", e);=0A }=0A=0A = }=0A =0AI have confirmed that I have the correct versions of ehcache.j= ar and ehcache-constructs.jar (i.e., the right version of SelfPopulatingCac= he).=0A=0AAlso, my ddsteps-context.xml file is as follows:=0A=0A <bean i= d=3D"propertyConfigurer"=0A class=3D"org.springframework.beans.facto= ry.config.PropertyPlaceholderConfigurer">=0A <property name=3D"locat= ion" 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.ExcelDbUnitFixtureLoader= ">=0A <constructor-arg ref=3D"dbUnitConnectionFactory"></constructor= -arg>=0A <property name=3D"tableNames">=0A <value>USERS</= value>=0A </property>=0A </bean>=0A=0A <bean id=3D"dbUnitConne= ctionFactory"=0A class=3D"org.ddsteps.dbunit.StandardConnectionFactory">=0A= <constructor-arg ref=3D"dataSource" />=0A </bean>=0A=0A <bean= id=3D"dataSource" class=3D"org.springframework.jdbc.datasource.SingleConne= ctionDataSource">=0A <property name=3D"driverClassName" value=3D"${j= dbc.driverClassName}"=0A />=0A <property name=3D"url" value=3D"${jdb= c.url}" />=0A <property name=3D"username" value=3D"${jdbc.username}"= />=0A <property name=3D"password" value=3D"${jdbc.password}" />=0A = <property name=3D"suppressClose" value=3D"true" />=0A </bean>=0A= =0ADoes anyone have any ideas?=0A=0AMany thanks for your help!=0A=0A-clint= =0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A------------------------------------------= -------------------------------=0ATake Surveys. Earn Cash. Influence the Fu= ture of IT=0AJoin SourceForge.net's Techsay panel and you'll get the chance= to share your=0Aopinions on IT & business topics through brief surveys-and= earn cash=0Ahttp://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourcef= orge&CID=3DDEVDEV=0A_______________________________________________=0Addste= ps-user mailing list=0Ad...@li...=0Ahttps://lists.s= ourceforge.net/lists/listinfo/ddsteps-user=0A=0A=0A=0A=0A |