6.4.5 upgrade: "Error creating bean with name"

48 views
Skip to first unread message

Pablo Vidaurri

unread,
Feb 28, 2022, 11:04:07 AM2/28/22
to CAS Community
I'm using JPA with CAS 6.3.7.4. All is fine.

Upgrading to 6.4.5 causes a runtime exception:

2022-02-25 16:39:08,083 WARN [org.apereo.cas.web.CasWebApplicationContext] - <Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'scopedTarget.myTableService': Unsatisfied dependency expressed through field 'myTableRepository'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.xxx.cas.repository.MyTableRepository' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}>

CAS 6.4.5 is using 
springBootVersion=2.5.4

and CAS 6.3.7.x is using
springBootVersion=2.3.7.RELEASE

Does something need to change in springboot 2.5.4 to make this work again?

I have my DbConfiguration defined as:
@Configuration("MyDbConfiguration")
@EnableConfigurationProperties(CustomConfigurationProperties.class)
@EnableJpaRepositories(
                entityManagerFactoryRef = "myEntityManagerFactory",
                basePackages = {"com.xxx.cas.repository"}  //repository classes in here
                )
@Slf4j
public class MyDbConfiguration  {
// all of my service beans
}

I also my MyDbConfiguration in spring.factorories.

-psv
Reply all
Reply to author
Forward
0 new messages