ClassCastException for same class on slim3 for Google App Engine

Bug: A class cast exception like the following is thrown – class x.y.z.MyClass cannot be cast to class x.y.z.MyClass

Reason: The class loaders for both these class instances are different. One of the classloader is the usual one used by AppEngine JVM, while other one is used by the hot reloader.

Solution: Remove the Filter and Filter-Mapping for HotReloadingFilter from web.xml.

Kj
Kj [/.] Sreekumar programs computers as a hobby and profession. Into programming from his school days, Sree uses Codemarvels to key in facts and fixes he finds interesting while working on different projects. Some of the articles here give away a few shades of his philosophical leanings too.

Leave a Comment

Your email address will not be published. Required fields are marked *