Hi

Seems like when we remove '*cas-server-support-rest-x509-*.jar*', the 
startup is fine. 

Also noticed that with the jar added, X509 bean is trying to get registered 
twice and failing during the second iteration.

Additional stacktrace:

2022-04-08 09:24:34,460 TRACE 
[org.apereo.cas.rest.config.CasCoreRestConfiguration] - <building REST 
credential factory from 
[[org.apereo.cas.rest.config.CasCoreRestConfiguration$$Lambda$1446/0x0000
000100cdc040@1983a4e4, 
*org.apereo.cas.support.x509.rest.config.X509RestConfiguration$$Lambda$1447/0x0000000100cdc440@27d5eb00,
 
org.apereo.cas.support.x509.rest.config.X509RestConfiguration$$Lambda$1447/0x0000000100cdc440@27d5eb00*
]]>
2022-04-08 09:24:34,461 TRACE 
[org.apereo.cas.rest.config.CasCoreRestConfiguration] - <Configuring 
credential factory: 
[org.apereo.cas.rest.config.CasCoreRestConfiguration$$Lambda$1446/0x0000000100c
dc040@1983a4e4]>
2022-04-08 09:24:34,462 TRACE 
[org.apereo.cas.rest.config.CasCoreRestConfiguration] - <Configuring 
credential factory: 
[org.apereo.cas.support.x509.rest.config.X509RestConfiguration$$Lambda$1447/0x0
000000100cdc440@27d5eb00]>
2022-04-08 09:24:34,466 WARN [org.apereo.cas.web.CasWebApplicationContext] 
- <Exception encountered during context initialization - cancelling refresh 
attempt: org.springframework.beans.factory.Bean
CreationException: Error creating bean with name 'serviceTicketResource' 
defined in class path resource 
[org/apereo/cas/config/CasRestConfiguration.class]: Bean instantiation via 
factory method fail
ed; nested exception is 
org.springframework.beans.BeanInstantiationException: Failed to instantiate 
[org.apereo.cas.support.rest.resources.ServiceTicketResource]: Factory 
method 'serviceTicketResour
ce' threw exception; nested exception is 
org.springframework.beans.factory.BeanCreationException: Error creating 
bean with name 'restHttpRequestCredentialFactory' defined in class path 
resource [org
/apereo/cas/rest/config/CasCoreRestConfiguration.class]: Bean instantiation 
via factory method failed; nested exception is 
org.springframework.beans.BeanInstantiationException: Failed to instantiate
 [org.apereo.cas.rest.factory.RestHttpRequestCredentialFactory]: Factory 
method 'restHttpRequestCredentialFactory' threw exception; nested exception 
is java.lang.NoSuchMethodError: 'boolean org.aper
eo.cas.configuration.model.core.rest.RestProperties.isHeaderAuth()'>


On Thursday, 7 April 2022 at 21:47:08 UTC+5:30 Dhanesh Kumar wrote:

> Hi
>
> Have been using CAS 6.4.6 version with cas-server-core-rest*.jar and have 
> been successfully using all the required functionalities without any issues.
>
> Due to recent Spring vulnerability CVE-2022-22965, had updated the version 
> to 6.4.6.2 which had the Spring version update and started hitting startup 
> issues during startup related to bean initialisation.
>
> Can you give some pointers on how to fix the same?
>
> Stacktrace:
>
> 2022-04-07 09:59:37,525 WARN [org.apereo.cas.web.CasWebApplicationContext] 
> - <Exception encountered during context initialization - cancelling refresh 
> attempt: org.springframework.beans.factory.BeanCreationException: 
> Error creating bean with name 'serviceTicketResource' defined in class 
> path resource [org/apereo/cas/config/CasRestConfiguration.class]: 
> Bean instantiation via factory method failed; 
> nested exception is org.springframework.beans.BeanInstantiationException: 
> Failed to instantiate 
> [org.apereo.cas.support.rest.resources.ServiceTicketResource]: 
> Factory method 'serviceTicketResource' threw exception; 
> nested exception is 
> org.springframework.beans.factory.BeanCreationException: 
> Error creating bean with name 'restHttpRequestCredentialFactory' defined 
> in class path resource 
> [org/apereo/cas/rest/config/CasCoreRestConfiguration.class]: 
> Bean instantiation via factory method failed; nested exception is 
> org.springframework.beans.BeanInstantiationException: Failed to instantiate 
> [org.apereo.cas.rest.factory.RestHttpRequestCredentialFactory]: 
> Factory method 'restHttpRequestCredentialFactory' threw exception; nested 
> exception is java.lang.ClassCastException: class com.sun.proxy.$Proxy282 
> cannot be cast to class 
> org.apereo.cas.rest.plan.RestHttpRequestCredentialFactoryConfigurer 
> (com.sun.proxy.$Proxy282 and 
> org.apereo.cas.rest.plan.RestHttpRequestCredentialFactoryConfigurer are in 
> unnamed module of loader 
> org.springframework.boot.loader.LaunchedURLClassLoader @3cbbc1e0)>
>

-- 
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
--- 
You received this message because you are subscribed to the Google Groups "CAS 
Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/593e5257-a8c0-47f9-836f-0d1d3a86ac63n%40apereo.org.

Reply via email to