I'm not sure what is wrong exactly. might help to understand which two classloaders are involved (I expect there are two separate definitions of the app class causing the CCE).