users@jersey.java.net

[Jersey] Re: java.lang.ClassCastException on container reload using 2.17

From: Simon Temple <simon.temple_at_amalto.com>
Date: Mon, 20 Apr 2015 10:12:10 +0100

I found the problem!

It was a classloader issue. The thread that triggered the reload had the
org.glassfish.jersey.internal.spi.AutoDiscoverable on it's path but loaded by a
different webapp classloader!

Once I ensured the same classloader was used for all reloads the problem went away.