Quantcast

javax.jms.JMSException: java.lang.ClassCastException: java.util.SimpleTimeZone cannot be cast to sun.util.calendar.ZoneInfo

classic Classic list List threaded Threaded
4 messages Options
pyl
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

javax.jms.JMSException: java.lang.ClassCastException: java.util.SimpleTimeZone cannot be cast to sun.util.calendar.ZoneInfo

pyl
I encountered the exception below when trying to receive a message from a queue:

javax.jms.JMSException: java.lang.ClassCastException: java.util.SimpleTimeZone cannot be cast to sun.util.calendar.ZoneInfo
                at com.swiftmq.jms.ObjectMessageImpl.getObject(Unknown Source)
                at com.swiftmq.jms.ObjectMessageImpl.getObject(Unknown Source)
                ......

I am using SwiftMQ 7.6.0 and running both server & client applications in Java 1.6.0_24.

Any idea?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: javax.jms.JMSException: java.lang.ClassCastException: java.util.SimpleTimeZone cannot be cast to sun.util.calendar.ZoneInfo

IIT Software
Administrator
Seems like an application problem to me. You send an object of type sun.util.calendar.ZoneInfo within an ObjectMessage and you try to cast that object to java.util.SimpleTimeZone on getObject(). Or you have an object which wraps this internally and this occurs during deserialization in getObject. Nothing SwiftMQ-related but has to do with the object you send in your ObjectMessage.
pyl
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: javax.jms.JMSException: java.lang.ClassCastException: java.util.SimpleTimeZone cannot be cast to sun.util.calendar.ZoneInfo

pyl
In the application code, there is no reference to sun.util.calendar.ZoneInfo nor java.util.SimpleTimeZone. What is in the ObjectMessage that can be related to this that I can think of is only GregorianCalendar.

Also, this only happens intermittently, although all ObjectMessages sent/received have similar content.

This problem does not occur when running with Java 1.5.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: javax.jms.JMSException: java.lang.ClassCastException: java.util.SimpleTimeZone cannot be cast to sun.util.calendar.ZoneInfo

IIT Software
Administrator
Then you serialize GregorianCalendar etc. I don't know. It's an app problem, no a SwiftMQ one.
Loading...