Error deploying .war

119 views
Skip to first unread message

Antonella Leone

unread,
Jun 11, 2021, 9:18:21 AM6/11/21
to CAS Community
On startup I get the following error:

Unable to start web server; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scopedTarget.responseHeadersSecurityFilter' defined in class path resource [org/apereo/cas/config/CasFiltersConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.web.servlet.FilterRegistrationBean]: Factory method 'responseHeadersSecurityFilter' threw exception; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.apereo.cas.authentication.AuthenticationServiceSelectionPlan' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true), @org.springframework.beans.factory.annotation.Qualifier(value="authenticationServiceSelectionPlan")}

I always create the .war using "./gradlew war" or using "./war.sh" but nothing changed.

Any suggestion will be appreciated, thank you in advance.

Antonella

Antonella Leone

unread,
Jun 11, 2021, 9:33:18 AM6/11/21
to CAS Community, Antonella Leone
Cas version 6.4.0.

Antonella Leone

unread,
Jun 15, 2021, 6:31:20 AM6/15/21
to CAS Community, Antonella Leone
errata corrige: cas v6.3.2, creating webapp-6.4.0-SNAPSHOT.war.
update: error occurs only on test env, but not locally.

Ray Bon

unread,
Jun 15, 2021, 1:21:04 PM6/15/21
to cas-...@apereo.org, antonel...@openmindonline.it
Antonella,

Could there be a difference in the config files between local and test (perhaps a file commit was missed)?

Ray

On Tue, 2021-06-15 at 03:31 -0700, Antonella Leone wrote:
Notice: This message was sent from outside the University of Victoria email system. Please be cautious with links and sensitive information.

Antonella Leone

unread,
Jun 16, 2021, 6:17:59 AM6/16/21
to CAS Community, Ray Bon, Antonella Leone
Hi Ray, 

thanks for your feedback! :)
All commits are pushed and repo is aligned. Just checked env properties but there are no differences with local ones except db url which is right to be different.
Just once I had a different error (about my code, not apereo, so I thought it was fixed). Then I tried fixing my code but I had again the "authenticationServiceSelectionPlan" error.
So I reverted that fix and built the war but got same error, no more able to replicate the "fixed situation".
Logs are all about the apereo "authenticationServiceSelectionPlan" and can't understand the point.
Is there anything else I should check?
Thanks for your time.

BR,
Antonella

Antonella Leone

unread,
Jun 16, 2021, 9:33:08 AM6/16/21
to CAS Community, Antonella Leone, Ray Bon
Hi Ray/all,

resolved editing war.sh this way:

cd custom/myproject-webapp-tomcat
../../gradlew clean build --parallel -x test -x check -Dspring.profiles.active=$PROFILE

generated .war has all dependencies ok.

BR,
Antonella
Reply all
Reply to author
Forward
0 new messages