"Failed to load ApplicationContext" when using repository data access layer
Hi,
I'm trying to build up a small app using roo. Here is the roo script:
Code:
// Spring Roo 1.2.0.RELEASE [rev 39eb957] log opened at 2012-01-06 13:22:07
project --topLevelPackage de.mygasoline
jpa setup --provider HIBERNATE --database HYPERSONIC_IN_MEMORY
entity jpa --class ~.domain.Fuel --abstract --activeRecord false
field string --fieldName Name --sizeMin 3 --sizeMax 50
entity jpa --class ~.domain.Gasoline --extends ~.domain.Fuel --activeRecord false --testAutomatically
field number --type int --fieldName oktan --min 0 --max 100
entity jpa --class ~.domain.Diesel --extends ~.domain.Fuel --activeRecord false --testAutomatically
field number --type int --min 0 --max 100 --fieldName cetan
entity jpa --class ~.domain.Address --activeRecord false
field string --fieldName street --sizeMax 50 --sizeMin 3 --notNull
field string --fieldName city --sizeMax 50 --sizeMin 3 --notNull
field string --fieldName country --sizeMax 50 --sizeMin 3 --notNull
field string --fieldName department --sizeMax 50 --sizeMin 3 --notNull
field string --fieldName zip --sizeMax 10 --sizeMin 3 --notNull
entity jpa --class ~.domain.AbstractPetrolStation --abstract --activeRecord false
field other --type ~.domain.Address --fieldName address --notNull
entity jpa --class ~.domain.FreePetrolStation --extends ~.domain.AbstractPetrolStation --activeRecord false --testAutomatically
entity jpa --class ~.domain.PetrolCompany --activeRecord false --testAutomatically
field string --fieldName name --sizeMin 3 --sizeMax 50
entity jpa --class ~.domain.PetrolStation --activeRecord false --testAutomatically
field reference --type ~.domain.PetrolCompany --fieldName company --notNull
entity jpa --class ~.domain.Price --activeRecord false --testAutomatically
field number --fieldName amount --type float --min 0
field other --fieldName currency --type java.util.Currency --notNull
entity jpa --class ~.domain.FuelEntry --activeRecord false --testAutomatically
field date --fieldName lastUpdate --type java.util.Date --notNull
field reference --type ~.domain.Price --fieldName price --notNull
field reference --fieldName fuel --type ~.domain.Fuel --notNull
repository jpa --interface ~.repository.GasolineRepository --entity ~.domain.Gasoline
repository jpa --interface ~.repository.DieselRepository --entity ~.domain.Diesel
repository jpa --interface ~.repository.FuelEntryRepository --entity ~.domain.FuelEntry
repository jpa --interface ~.repository.FreePetrolStationRepository --entity ~.domain.FreePetrolStation
repository jpa --interface ~.repository.PetrolCompanyRepository --entity ~.domain.PetrolCompany
repository jpa --interface ~.repository.PetrolStationRepository --entity ~.domain.PetrolStation
perform eclipse
When I imported the project to eclipse I ran into problems: roo (1.2.0.RELEASE [rev 39eb957]) generated an incompartible applicationContext-jpa.xml. It seems that spring-data-jpa-1.0.2 is not compartible to spring-core-3.1.0. Eclipse will show you some strange XSD validation errors. So I modified my pom.xml to use Spring 3.0.0 and everything seemed to work fine. But when I run perform tests on my project nothing seems to work and I do not have a clue why. I'm getting "Failed to laod ApplicationContext" on 54 of 55 tests.
I checked the AspectJ test configuration and it configures the applicationContext correctly:
Code:
@ContextConfiguration(locations = "classpath:/META-INF/spring/applicationContext*.xml");
Does anybody have an idea what I am missing?
Regards
Benedikt