我将Java EE 6应用程序从GF 3.1.2.2更新到4.1。应用程序大量使用EJB计时器服务并在数据库中保留TimerHandle
个对象。
在DB中访问这些计时器句柄时出现以下异常:
Exception [EclipseLink-66] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.DescriptorException
Exception Description: Could not deserialize object from byte array.
Internal Exception: java.io.InvalidClassException: com.sun.ejb.containers.TimerWrapper$TimerHandleImpl; local class incompatible: stream classdesc serialVersionUID = 8013326429831986199, local class serialVersionUID = -7638766191514989908
Mapping: org.eclipse.persistence.mappings.DirectToFieldMapping[timerHandle-->MESSAGE.TIMERHANDLE]
Descriptor: RelationalDescriptor(com.example.Message --> [DatabaseTable(MESSAGE)])
显然,串行版本ID已从GF 3.1更改为4.1。任何想法如何在GF 4.1中重用那些TimerHandle对象。