Buggy code:
@ Repository ( "pheidippidesDao" ) @ Transactional ( readOnly = true ) @ Scope ( BeanDefinition . SCOPE_SINGLETON ) public class PheidippidesDaoImpl extends GenericDaoImpl implements PheidippidesDao { public Event getEvent ( Long eventID ) { } public Event getEvent ( String name ) { } public List < Event > getEvents ( ) { } @ Transactional ( readOnly = false ) public Event storeEvent ( Long eventID , String name , String description , String localizedKey , String reportSign , List < Charity > charities ) { } @ Transactional ( readOnly = false ) public boolean removeEvent ( Long eventID ) { } public Distance getDistance ( Long distanceID ) { } public Distance getDistance ( String name ) { } public List < Distance > getDistances ( ) { } @ Transactional ( readOnly = false ) public Distance storeDistance ( Long distanceID , String name , String description , String localizedKey , String reportSign ) { } @ Transactional ( readOnly = false ) public boolean removeDistance ( Long distanceID ) { } public Race getRace ( Long raceID ) { } public List < Race > getRaces ( Event event , Integer year ) { } @ Transactional ( readOnly = false ) public Race storeRace ( Long raceID , int year , Event event , Distance distance , int minimumAge , int maximumAge , Date openRegistrationDate , Date closeRegistrationDate , boolean familyDiscount , int relayLegs ) { } @ Transactional ( readOnly = false ) public boolean removeRace ( Long raceID ) { } public List < Participant > getParticipants ( Event event , int year ) { } public Participant getParticipant ( String uuid ) { } public ShirtSize getShirtSize ( Long shirtSizeID ) { } public List < ShirtSize > getShirtSizes ( ) { } @ Transactional ( readOnly = false ) public ShirtSize storeShirtSize ( Long shirtSizeID , ShirtSizeSizes size , ShirtSizeGender gender , String localizedKey , String reportSign ) { } @ Transactional ( readOnly = false ) public boolean removeShirtSize ( Long shirtSizeID ) { } public RacePrice getRacePrice ( Long racePriceID ) { } public List < RacePrice > getRacePrices ( Race race ) { } public RacePrice getCurrentRacePrice ( Race race , Currency currency ) { <START_BUG> return getSingleResult ( "racePrice.findByRaceAndDate" , RacePrice . class , new com . idega . core . persistence . Param ( "race" , race ) , new com . idega . core . persistence . Param ( "date" , IWTimestamp . getTimestampRightNow ( ) ) ) ; <END_BUG> } @ Transactional ( readOnly = false ) public RacePrice storeRacePrice ( Long racePriceID , Race race , Date validFrom , Date validTo , int price , int priceKids , int familyDiscount , int shirtPrice , Currency currency ) { } @ Transactional ( readOnly = false ) public boolean removeRacePrice ( Long racePriceID ) { } @ Transactional ( readOnly = false ) public Race increaseRaceParticipantNumber ( Long raceID ) { } public RegistrationHeader getRegistrationHeader ( Long registrationHeaderID ) { } @ Transactional ( readOnly = false ) public RegistrationHeader storeRegistrationHeader ( Long registrationHeaderID , RegistrationHeaderStatus status , String registrantUUID , String paymentGroup ) { } public Registration getRegistration ( Long registrationID ) { } public List < Registration > getRegistrations ( Race race , RegistrationStatus status ) { } @ Transactional ( readOnly = false ) public Registration storeRegistration ( Long registrationID , RegistrationHeader header , RegistrationStatus status , Race race , ShirtSize shirtSize , Team team , String leg , int amount , Charity charity , String nationality , String userUUID , int discount ) { } public RaceShirtSize getRaceShirtSize ( Long raceShirtSizePK ) { } public List < RaceShirtSize > getRaceShirtSizes ( Race race ) { } @ Transactional ( readOnly = false ) public RaceShirtSize storeRaceShirtSize ( Long raceShirtSizePK , Race race , ShirtSize shirtSize , String localizedKey , int orderNumber ) { } @ Transactional ( readOnly = false ) public boolean removeRaceShirtSize ( Long raceShirtSizePK ) { } public Charity getCharity ( Long charityPK ) { } public List < Charity > getCharities ( ) { } @ Transactional ( readOnly = false ) public Charity storeCharity ( Long charityPK , String name , String personalID , String description ) { } @ Transactional ( readOnly = false ) public boolean removeCharity ( Long charityPK ) { } @ Transactional ( readOnly = false ) public BankReference storeBankReference ( RegistrationHeader header ) { } public BankReference findBankReference ( RegistrationHeader header ) { } No newline ; at end ; of file ; }

Fix:
return getSingleResult ( "racePrice.findByRaceAndDate" , RacePrice . class , new com . idega . core . persistence . Param ( "race" , race ) , new com . idega . core . persistence . Param ( "date" , IWTimestamp . getTimestampRightNow ( ) ) , new com . idega . core . persistence . Param ( "currency" , currency ) ) ;