Got it! Using http://jhades.github.io/ it was quick and easy to find out that the offending class was indeed loaded from two different jar files. After I removed one of them casting worked with no issues. I didn't know jar hell could result in ClassCastException, but you learn something new every day.
Thanks everyone for your help. Olaf I found your suggestion especially helpful. Have a good weekend :-) On Fri, May 8, 2020 at 9:29 PM Olaf Kock <tom...@olafkock.de> wrote: > > On 08.05.20 19:50, Christopher Schultz wrote: > > Olaf, > > > > On 5/8/20 13:19, Olaf Kock wrote: > > > > > You might want to hunt down duplicate classes in the JAR files on > > > your classpath. Worst case: unpack them all in temporary > > > directories and check for occurrences of the filename. Make sure > > > that one doesn't overwrite the other when unzipping. > > > > Or unpack them all and let the unzipper tell you if there are any > > filename collisions. > > > > Someone has probably written a "classpath scanner" that will just > > unzip everything and look for conflicts. > > > I've gotten follow up questions on how to use those tools in the past. > Key is to identify all the jars, less the options of the tool, but since > then I've just reverted to mention the low-tech version, and am not even > ashamed ;) > > That's not to say that I don't trust Jonathan to use a classpath scanner > - it's just a low-tech-preference out of habit. > > Plus, due to this habit, I currently can't come up with a tool's name to > look for :D > > Olaf > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > -- [image: SysAid Technologies] <http://www.sysaid.com/?utm_source=signature&utm_medium=email&utm_campaign=sysaid-logo> Jonathan Yom-Tov Senior Architect jonathan.yom...@sysaid.com Phone (IL): +972 (3) 533-3675 Ext. 932 [image: SysAid Technologies] <https://www.sysaid.com/?utm_source=signature&utm_medium=email&utm_campaign=sysaid-logo-icon> [image: SysAid on Facebook] <https://www.facebook.com/SysAidIT> [image: SysAid on Twitter] <https://twitter.com/sysaid> [image: SysAid on Linked-in] <https://www.linkedin.com/company/sysaid-technologies-ltd> [image: SysAid on YouTube] <https://www.youtube.com/user/SysAidIT> [image: SysAid on Instagram] <https://www.instagram.com/sysaid_technologies/> [image: Banner] <https://www.sysaid.com/sig-link>