1

I want to ask, whats wrong with this error? I already check with other entity, they're doing good. But, can you guys help me for this trouble? Thankyouu

Error creating bean with name 'masterVersionServiceImpl' defined in file
Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'masterVersionRepository': Invocation of init method failed; nested exception is org.springframework.data.mapping.PropertyReferenceException: No property name found for type MasterVersion!

Here my code

    import java.sql.Connection;
    import java.sql.DriverManager;

    import org.springframework.beans.factory.annotation.Autowired;
    import org.springframework.security.crypto.password.PasswordEncoder;
    import org.springframework.stereotype.Component;
    import org.springframework.stereotype.Service;

    @Service
    public class MasterVersionServiceImpl extends CrudServiceImpl<MasterVersion, Long> implements MasterVersionService{

        @Autowired
        private PasswordEncoder passwordEncoder;

        private MasterVersionRepository masterVersionRepo;

        @Autowired
        public MasterVersionServiceImpl(MasterVersionRepository jpaRepository) {
            super(jpaRepository);
            this.masterVersionRepo = jpaRepository;
        }

        public void setMasterVersionRepo(MasterVersionRepository masterVersionRepo) {
            this.masterVersionRepo = masterVersionRepo;
        } 

    //and other function


//the repository interface
import org.springframework.stereotype.Repository;

@Repository
public interface MasterVersionRepository extends BaseRepository<MasterVersion, Long>{
    MasterVersion findById(Long id);
    MasterVersion findByName(String name);
}
Ole
  • 402
  • 5
  • 9
  • have you googled the underlying error? looks a lot like this one https://stackoverflow.com/questions/39620903/spring-data-jpa-custom-method-causing-propertyreferenceexception – Ole Feb 22 '18 at 20:17
  • thankyou i already know the problem is on my repo.. thanks for sharing that link – M Lukmanul Hakim Feb 23 '18 at 03:14

0 Answers0