Looks like you're getting a MessageDigest implementation that's not
cloneable... possibly due to the upgrade.
The code in there cannot handle that case, has been lìke that since 2013
without issues, but I guess something
changed in recent Java 11. We haven't see it happening yet, even with Java
11, I guess it's either a new
behavior in the latest Java 11 releases, or you're facing some "classpath
russian roulette" (multiple libs offering
the same capabilities, being picked up in a different order on different
systems).

I suggest you open a ticket at
https://osgeo-org.atlassian.net/browse/GEOS/summary
and in the meantime switch to a Java version that's working for you

Cheers
Andrea


On Thu, Nov 18, 2021 at 12:21 AM Humphries, Graham <
graham.humphr...@stategrowth.tas.gov.au> wrote:

> I have recently upgraded my Tomcat version to: Apache Tomcat/9.0.53 and
> Java to 11.0.12+7-LTS. Geoserver is version 2.20.0.
>
>
>
> Since then Geoserver throws CloneNotSupportedException when using Basic
> Authentication passed in the request header.
>
>
>
> Does anyone know what causes this and what the solution is?
>
>
>
> The following is the error in the response:
>
> <!doctype html><html lang="en"><head><title>HTTP Status 500 – Internal
> Server Error</title><style type="text/css">body
> {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b
> {color:white;background-color:#525D76;} h1 {font-size:22px;} h2
> {font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a {color:black;}
> .line
> {height:1px;background-color:#525D76;border:none;}</style></head><body><h1>HTTP
> Status 500 – Internal Server Error</h1><hr class="line" /><p><b>Type</b>
> Exception Report</p><p><b>Message</b>
> java.lang.CloneNotSupportedException</p><p><b>Description</b> The server
> encountered an unexpected condition that prevented it from fulfilling the
> request.</p><p><b>Exception</b></p><pre>java.lang.RuntimeException:
> java.lang.CloneNotSupportedException
>
>
> org.geoserver.security.filter.GeoServerBasicAuthenticationFilter.getCacheKey(GeoServerBasicAuthenticationFilter.java:122)
>
>
> org.geoserver.security.filter.GeoServerSecurityFilter.authenticateFromCache(GeoServerSecurityFilter.java:76)
>
>
> org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:47)
>
>
> org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)
>
>
> org.geoserver.security.filter.GeoServerBasicAuthenticationFilter.doFilter(GeoServerBasicAuthenticationFilter.java:81)
>
>
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
>
>
> org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:70)
>
>
> org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105)
>
>
> org.geoserver.security.filter.GeoServerSecurityContextPersistenceFilter$1.doFilter(GeoServerSecurityContextPersistenceFilter.java:52)
>
>
> org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:74)
>
>
> org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)
>
>
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
>
>
> org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:215)
>
>
> org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:178)
>
>
> org.geoserver.security.GeoServerSecurityFilterChainProxy.doFilter(GeoServerSecurityFilterChainProxy.java:142)
>
>
> org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:358)
>
>
> org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:271)
>
>
> org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:101)
>
>
> org.geoserver.filters.XFrameOptionsFilter.doFilter(XFrameOptionsFilter.java:77)
>
>
> org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:47)
>
>
> org.geoserver.filters.SessionDebugFilter.doFilter(SessionDebugFilter.java:46)
>
>
> org.geoserver.filters.FlushSafeFilter.doFilter(FlushSafeFilter.java:42)
>
>
> org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
>
>
> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
>
> </pre><p><b>Root Cause</b></p><pre>java.lang.CloneNotSupportedException
>
>
> java.base&#47;java.security.MessageDigest$Delegate.clone(MessageDigest.java:610)
>
>
> org.geoserver.security.filter.GeoServerBasicAuthenticationFilter.getCacheKey(GeoServerBasicAuthenticationFilter.java:119)
>
>
> org.geoserver.security.filter.GeoServerSecurityFilter.authenticateFromCache(GeoServerSecurityFilter.java:76)
>
>
> org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:47)
>
>
> org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)
>
>
> org.geoserver.security.filter.GeoServerBasicAuthenticationFilter.doFilter(GeoServerBasicAuthenticationFilter.java:81)
>
>
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
>
>
> org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:70)
>
>
> org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105)
>
>
> org.geoserver.security.filter.GeoServerSecurityContextPersistenceFilter$1.doFilter(GeoServerSecurityContextPersistenceFilter.java:52)
>
>
> org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:74)
>
>
> org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)
>
>
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
>
>
> org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:215)
>
>
> org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:178)
>
>
> org.geoserver.security.GeoServerSecurityFilterChainProxy.doFilter(GeoServerSecurityFilterChainProxy.java:142)
>
>
> org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:358)
>
>
> org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:271)
>
>
> org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:101)
>
>
> org.geoserver.filters.XFrameOptionsFilter.doFilter(XFrameOptionsFilter.java:77)
>
>
> org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:47)
>
>
> org.geoserver.filters.SessionDebugFilter.doFilter(SessionDebugFilter.java:46)
>
>
> org.geoserver.filters.FlushSafeFilter.doFilter(FlushSafeFilter.java:42)
>
>
> org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
>
>
> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
>
> ------------------------------
>
> CONFIDENTIALITY NOTICE AND DISCLAIMER
> The information in this transmission may be confidential and/or protected
> by legal professional privilege, and is intended only for the person or
> persons to whom it is addressed. If you are not such a person, you are
> warned that any disclosure, copying or dissemination of the information is
> unauthorised. If you have received the transmission in error, please
> immediately contact this office by telephone, fax or email, to inform us of
> the error and to enable arrangements to be made for the destruction of the
> transmission, or its return at our cost. No liability is accepted for any
> unauthorised use of the information contained in this transmission.
> _______________________________________________
> Geoserver-users mailing list
>
> Please make sure you read the following two resources before posting to
> this list:
> - Earning your support instead of buying it, but Ian Turton:
> http://www.ianturton.com/talks/foss4g.html#/
> - The GeoServer user list posting guidelines:
> http://geoserver.org/comm/userlist-guidelines.html
>
> If you want to request a feature or an improvement, also see this:
> https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer
>
>
> Geoserver-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>


-- 

Regards,

Andrea Aime

==
GeoServer Professional Services from the experts!

Visit http://bit.ly/gs-services-us for more information.
==

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions Group
phone: +39 0584 962313

fax:     +39 0584 1660272

mob:   +39  333 8128928

https://www.geosolutionsgroup.com/

http://twitter.com/geosolutions_it

-------------------------------------------------------

Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE
2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si
precisa che ogni circostanza inerente alla presente email (il suo
contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è
riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il
messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra
operazione è illecita. Le sarei comunque grato se potesse darmene notizia.

This email is intended only for the person or entity to which it is
addressed and may contain information that is privileged, confidential or
otherwise protected from disclosure. We remind that - as provided by
European Regulation 2016/679 “GDPR” - copying, dissemination or use of this
e-mail or the information herein by anyone other than the intended
recipient is prohibited. If you have received this email by mistake, please
notify us immediately by telephone or e-mail
_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this 
list:
- Earning your support instead of buying it, but Ian Turton: 
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: 
http://geoserver.org/comm/userlist-guidelines.html

If you want to request a feature or an improvement, also see this: 
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to