On upgrading to the latest version of objectdb I get the following exception on object retrieval:
rbccm.felix.framework.ApplicationException: Error taking message from ObjectDB queue at rbccm.felix.objectdb.messaging.ObjectDbMessagePipe.take(Unknown Source) at rbccm.felix.objectdb.messaging.ObjectDbMessagePipe.take(Unknown Source) at rbccm.felix.framework.service.ServiceRunner.run(Unknown Source) at java.lang.Thread.run(Thread.java:662) Caused by: com.objectdb.o.InternalException: Unexpected internal exception at com.objectdb.o.JPE.h(JPE.java:163) at com.objectdb.o.ERR.f(ERR.java:69) at com.objectdb.o.OBC.onObjectDBError(OBC.java:1487) at com.objectdb.jpa.EMImpl.find(EMImpl.java:559) at com.objectdb.jpa.EMImpl.find(EMImpl.java:474) at rbccm.felix.objectdb.messaging.ObjectDbMessagePipe.getMessage(Unknown Source) at rbccm.felix.objectdb.messaging.ObjectDbMessagePipe.takeWithRetry(Unknown Source) ... 4 more Caused by: java.lang.ClassCastException: [B cannot be cast to [Ljava.lang.Object; at com.objectdb.o.AFT.a(AFT.java:71) at com.objectdb.o.LDR.C(LDR.java:776) at com.objectdb.o.LDR.F(LDR.java:911) at com.objectdb.o.LDR.Vt(LDR.java:846) at com.objectdb.o.FTP.d(FTP.java:109) at com.objectdb.o.PFT.a(PFT.java:111) at com.objectdb.o.LDR.C(LDR.java:795) at com.objectdb.o.LDR.y(LDR.java:489) at com.objectdb.o.LDR.x(LDR.java:448) at com.objectdb.o.LDR.UV(LDR.java:669) at com.objectdb.o.RTT.F(RTT.java:263) at com.objectdb.o.RTT.E(RTT.java:235) at com.objectdb.o.RRT.B(RRT.java:288) at com.objectdb.o.RTT.l(RTT.java:134) at com.objectdb.o.RRT.l(RRT.java:32) at com.objectdb.o.RTT.C(RTT.java:179) at com.objectdb.o.RRT.A(RRT.java:125) at com.objectdb.o.RTT.l(RTT.java:132) at com.objectdb.o.RRT.l(RRT.java:32) at com.objectdb.o.RTT.C(RTT.java:179) at com.objectdb.o.RRT.A(RRT.java:125) at com.objectdb.o.RTT.l(RTT.java:132) at com.objectdb.o.RRT.l(RRT.java:32) at com.objectdb.o.TSK.i(TSK.java:146) at com.objectdb.o.TSK.f(TSK.java:95) at com.objectdb.o.MST.aV(MST.java:668) at com.objectdb.o.MST.aS(MST.java:461) at com.objectdb.o.MST.U2(MST.java:427) at com.objectdb.o.WRA.U2(WRA.java:248) at com.objectdb.o.LDR.w(LDR.java:355) at com.objectdb.o.LDR.v(LDR.java:293) at com.objectdb.o.LDR.s(LDR.java:211) at com.objectdb.o.OBC.aM(OBC.java:1058) at com.objectdb.o.OBC.aK(OBC.java:971) at com.objectdb.jpa.EMImpl.find(EMImpl.java:551) ... 7 more
The class in question is defined as follows:
@Entity public class ObjectDbMessagePayload { @Id String id; @OneToOne(orphanRemoval=true, cascade=CascadeType.ALL, fetch=FetchType.EAGER) private Object payload; @OneToOne(orphanRemoval=true, cascade=CascadeType.ALL, fetch=FetchType.EAGER) private Map<String, Object> metadata; ...
In this case the "payload" field is a byte[]. This worked ok in 2.3.3_06.