Spotfire Server with custom authenticator fails to start after upgrade to 12.0 with NoClassDefFoundError error

Spotfire Server with custom authenticator fails to start after upgrade to 12.0 with NoClassDefFoundError error

book

Article ID: KB0070620

calendar_today

Updated On:

Products Versions
Spotfire Analyst 12.0 and higher

Description

After an upgrade to 12.0 or higher, if the Spotfire Server is configured with a custom authenticator then it may fail to start with the following error recorded in server.log:
 
ERROR 2022-11-30T20:00:25,261-0600 [*Initialization*] web.context.ContextLoader: Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authorizationEndpointManager' defined in class path resource [applicationContext-tss.xml]: Cannot resolve reference to bean 'authenticationManager' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'postAuthenticationFilterFactory' defined in class path resource [applicationContext-tss.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: com/spotfire/server/security/AbstractPostAuthenticationFilter

The error is caused by a missing class in Custom Post Authentication Filter code. AbstractPostAuthenticationFilter class that has been deprecated since 10.3, and was removed in version 12.0. See Spotfire Server Release Notes for 12.0 LTS (TSS-31245).

Note: If the Spotfire Server is accessed via a load balancer, proxy, or gateway, when trying to access the Spotfire Server web user interface when the server has failed to start, the general "502 Error: Web server received an invalid response while acting as a gateway or Proxy server"  error may be seen which just indicates the application was not online.

Issue/Introduction

This article explains why a Spotfire Server with custom authenticator fails to start after upgrade to 12.0 with NoClassDefFoundError error and how to resolve it.

Environment

All

Resolution

To resolve, the Custom Post Authentication Filter implementation that extends the AbstractPostAuthenticationFilter needs to be updated. Instead of extending AbstractPostAuthenticationFilter, use the PostAuthenticationFilter class.

See External Authentication in Spotfire and below references for more details and examples.

Additional Information

Interface PostAuthenticationFilter: TIBCO Spotfire Server Release Notes - Software Release 12.0 LTS (TSS-31245): Wiki: External Authentication in Spotfire:  Wiki: TIBCO Spotfire® Server API for Custom Authentication (PostAuthenticationFilter): Wiki: Configure Custom PostAuthentication Filter in Spotfire Server: