CAS 7.0.4 cannot start ; ...actuate.autoconfigure.sbom.SbomEndpointAutoConfiguration caused by ClassNotFoundException

74 views
Skip to first unread message

jehan procaccia

unread,
Jun 3, 2024, 5:45:17 AMJun 3
to CAS Community
Hello
 I did build correclty cas 7.0.4 + ldap auth, unfortunaltly after putting the cas.war into the tomcat webapps folder , the webapp fails on "org.springframework.boot.actuate.autoconfigure.sbom.SbomEndpointAutoConfiguration  caused by ClassNotFoundException" [1]

can you help me tracing this pb ? did I forgot to declare a propertie  ?  , there was no cas.properties sample file from git clone, I took one from 6.x and adapted ... cf [2], perhaps a pb there ?

Thanks

[1] Logs details;

<Validated CAS property sources and configuration successfully.>
CAS Version: 7.0.4
CAS Branch: 7.0.x
CAS Commit Id: d41ac9d5e157605fc43d97a77582c2062e864874
CAS Build Date/Time: 2024-04-26T07:43:16.528866Z
Spring Boot Version: 3.2.1
Spring Version: 6.1.2
Java Home: /usr/lib/jvm/java-21-openjdk-21.0.3.0.9-1.el9.alma.1.x86_64
Java Vendor: Red Hat, Inc.
Java Version: 21.0.3
Servlet Version: 6.0
JVM Free Memory: 236 MB
JVM Maximum Memory: 1 GB
JVM Total Memory: 811 MB
Apache Tomcat Version: Apache Tomcat/10.1.20

 <Configuration files found at [/etc/cas/config] are [[file [/etc/cas/config/cas.properties]]] under profile(s) [[standalone]]>

2024-06-03 10:00:06,968 WARN [org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext] - <Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanDefinitionStoreException: Failed to process import candidates for configuration class [org.apereo.cas.web.CasWebApplication]: Error processing condition on org.springframework.boot.actuate.autoconfigure.sbom.SbomEndpointAutoConfiguration>

03-Jun-2024 10:00:07.002 SEVERE [main] org.apache.catalina.startup.HostConfig.deployWAR Error deploying web application archive [/opt/tomcat/webapps/cas.war]
...
Caused by: java.lang.ClassNotFoundException: org.springframework.boot.actuate.sbom.SbomEndpoint

rror creating bean due to: Failed to process import candidates for configuration class [org.apereo.cas.web.CasWebApplication]: Error processing condition on org.springframework.boot.actuate.autoconfigure.sbom.SbomEndpointAutoConfiguration  caused by ClassNotFoundException: org.springframework.boot.actuate.sbom.SbomEndpoint


[2] /etc/cas/config/cas.properties
cas.server.name=https://cas7.domain.fr:443
cas.server.prefix=${cas.server.name}/cas

logging.config=file:/etc/cas/config/log4j2.xml

cas.authn.accept.users=
### Connexion LDAP
##cas.authn.ldap\[0\].providerClass=org.ldaptive.provider.unboundid.UnboundIDProvider
cas.authn.ldap\[0\].type=AUTHENTICATED
#cas.authn.ldap\[0\].use-start-tls=true
cas.authn.ldap\[0\].ldapUrl=ldaps://ldapserver.domain.fr
cas.authn.ldap\[0\].baseDn= dc=domain,dc=fr
cas.authn.ldap\[0\].subtreeSearch=true
#cas.authn.ldap\[0\].searchFilter=uid=\{user\}
cas.authn.ldap\[0\].searchFilter=(&(uid=\{user\})(supannRessourceEtat={COMPTE}A:*))
cas.authn.ldap\[0\].principalAttributeList=cn,sn,givenName,displayName,mail,uid

### Credential to connect to LDAP
cas.authn.ldap\[0\].bindDn=CN=binduser,dc=domain,dc=fr
cas.authn.ldap\[0\].bindCredential=!SECRET!

### Registering Applications
cas.serviceRegistry.json.location: file:/etc/cas/services

#tunning
cas.ticket.tgt.primary.max-time-to-live-in-seconds: 36000
cas.ticket.tgt.primary.time-to-kill-in-seconds: 14400
cas.authn.authentication-attribute-release.enabled: true

Ray Bon

unread,
Jun 3, 2024, 7:49:02 PMJun 3
to cas-...@apereo.org
Jehan,

If you are upgrading, make sure the appropriate changes are in [at least] gradle.properties and build.gradle.
I have these in build.gradle:

implementation enforcedPlatform("org.apereo.cas:cas-server-support-bom:${project.'cas.version'}")
implementation platform(org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES)

You should also verify the names of properties, they can change between releases.

Ray

On Mon, 2024-06-03 at 01:15 -0700, jehan procaccia wrote:
You don't often get email from jehan...@gmail.com. Learn why this is important
Hello
 I did build correclty cas 7.0.4 + ldap auth, unfortunaltly after putting the cas.war into the tomcat webapps folder , the webapp fails on "org.springframework.boot.actuate.autoconfigure.sbom.SbomEndpointAutoConfiguration  caused by ClassNotFoundException" [1]

can you help me tracing this pb ? did I forgot to declare a propertie  ?  , there was nocas.properties sample file from git clone, I took one from 6.x and adapted ... cf [2], perhaps a pb there ?

jehan procaccia

unread,
Jun 4, 2024, 1:01:13 PMJun 4
to CAS Community, Ray Bon
Hi
I am not upgrading, but rebuild from scratch on 7.x (+ alam9 + java 21 + tomcat 10) ,  except that I could find any cas.properties sample file from 7.x (!?)
so I took the one from my production cas-server 6.3.7, but maybe some properties are not anymore compatible ? (watch my cas.properties in 1rst post)

about build.gradle, I did not touch those 2 lines that are commented do Not modify ...

dependencies {
    /**
    * Do NOT modify the lines below or else you will risk breaking dependency management.
    **/

    implementation enforcedPlatform("org.apereo.cas:cas-server-support-bom:${project.'cas.version'}")
    implementation platform(org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES)


but I added below those 2 to enable ldap auth and json service-registry management :

// ADD support-ldap and json jehan
    implementation "org.apereo.cas:cas-server-support-ldap:${project.'cas.version'}"
    implementation "org.apereo.cas:cas-server-support-json-service-registry:${project.'cas.version'}"
// jehan


Still don't know why I have the error : "org.springframework.boot.actuate.autoconfigure.sbom.SbomEndpointAutoConfiguration  caused by ClassNotFoundException" [1]

Any other advices ?

thanks .

Ray Bon

unread,
Jun 4, 2024, 1:01:14 PMJun 4
to jehan...@gmail.com, cas-...@apereo.org
Jehan,

Did you clone the overlay project or use the initializer? 
You could try the one you did not use (but they should be the same result).
To see available properties:
./gradlew exportConfigMetadata

This may be a spring question.

Ray 

On Tue, 2024-06-04 at 09:31 -0700, jehan procaccia wrote:
You don't often get email from jehan...@gmail.com. Learn why this is important
Hi
I am not upgrading, but rebuild from scratch on 7.x (+ alam9 + java 21 + tomcat 10) ,  except that I could find any cas.properties sample file from 7.x (!?)
so I took the one from my production cas-server 6.3.7, but maybe some properties are not anymore compatible ? (watch mycas.properties in 1rst post)
can you help me tracing this pb ? did I forgot to declare a propertie  ?  , there was nocas.propertiessample file from git clone, I took one from 6.x and adapted ... cf [2], perhaps a pb there ?

jehan procaccia

unread,
Jun 5, 2024, 11:31:24 AMJun 5
to CAS Community, Ray Bon, jehan...@gmail.com
Hi

meanwhile, I found a workaround (thanks to Pascal.R) by "downgrading" springBootVersion from 3.3.0 in gradle.properties (git clone defaults)  to 3.2.6
#springBootVersion=3.3.0
springBootVersion=3.2.6

now it starts fine

maybe 3.3.0 was related to the default CAS version=7.1.0-SNAPSHOT , which I changed back to CAS  v 7.0.4  => so the need to downgrade also SpringBootVersion ... . Indeed from https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-autoconfigure/3.3.0 there doesn't seem to be a SbomEndpointAutoConfiguration class .

hence a new question, how can I check the matching correspondance/dependance  between CAS versions and springBootVersion versions ?

Thanks
Reply all
Reply to author
Forward
0 new messages