Glassfish Java App Class cast exception
Getting the following exception when casting
fqe.dataHandler.LiveUpdateMessage cannot be cast to fqe.dataHandler.LiveUpdateMessage
Sometimes it happ开发者_高级运维ens, sometimes it doesn't. The object can never be anything other than that class.
If it helps this is when getting the Object from grizzly-comet's CometEvent.message() function on GlassFish 3.
Thanks in advance for any help.
This is usually due in a Servlet Engine when you have two instances of a jar file being loaded by different ClassLoaders. Maybe one in a WAR and another in the classpath of the engine ?
精彩评论