ClassCastException (java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer) thrown while deserializing an RV message. p { margin-bottom: 0.1in; direction: ltr; color: rgb(0, 0, 10); line-height: 120%; text-align: left; widows: 2;

ClassCastException (java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer) thrown while deserializing an RV message. p { margin-bottom: 0.1in; direction: ltr; color: rgb(0, 0, 10); line-height: 120%; text-align: left; widows: 2;

book

Article ID: KB0089520

calendar_today

Updated On:

Products Versions
TIBCO BusinessEvents Enterprise Edition -
Not Applicable -

Description

Description:
p { margin-bottom: 0.1in; direction: ltr; color: rgb(0, 0, 10); line-height: 120%; text-align: left; widows: 2; orphans: 2; }p.western { font-family: "Calibri",serif; font-size: 11pt; }p.cjk { font-family: "AR PL UKai CN"; font-size: 11pt; }p.ctl { font-size: 11pt; }p { margin-bottom: 0.1in; direction: ltr; color: rgb(0, 0, 10); line-height: 120%; text-align: left; widows: 2; orphans: 2; }p.western { font-family: "Calibri",serif; font-size: 11pt; }p.cjk { font-family: "AR PL UKai CN"; font-size: 11pt; }p.ctl { font-size: 11pt; }
ClassCastException (java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer) thrown while deserializing an RV message.

Symptoms:
p { margin-bottom: 0.1in; direction: ltr; color: rgb(0, 0, 10); line-height: 120%; text-align: left; widows: 2; orphans: 2; }p.western { font-family: "Calibri",serif; font-size: 11pt; }p.cjk { font-family: "AR PL UKai CN"; font-size: 11pt; }p.ctl { font-size: 11pt; }

Error [$default.be.mt$.Thread.6] - [runtime.scheduler] java.lang.Long cannot be cast to java.lang.Integer

java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer

at be.gen.Events.ASTReserveResponse.setProperty(ASTReserveResponse.java:91)

at com.tibco.cep.driver.tibrv.serializer.TibRvMsgSerializer.deserialize(SourceFile:92)

at com.tibco.cep.runtime.service.cluster.ClusterTaskController.executeTask(ClusterTaskController.java:57)

at com.tibco.cep.runtime.scheduler.impl.WorkerBasedControllerV2$WorkerTask.run(WorkerBasedControllerV2.java:395)

at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

at com.tibco.cep.runtime.util.CustomBEManagedThread.run(CustomBEManagedThread.java:23)


Cause:
p { margin-bottom: 0.1in; direction: ltr; color: rgb(0, 0, 10); line-height: 120%; text-align: left; widows: 2; orphans: 2; }p.western { font-family: "Calibri",serif; font-size: 11pt; }p.cjk { font-family: "AR PL UKai CN"; font-size: 11pt; }p.ctl { font-size: 11pt; }

Wrong set of property types.

Issue/Introduction

ClassCastException (java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer) thrown while deserializing an RV message. p { margin-bottom: 0.1in; direction: ltr; color: rgb(0, 0, 10); line-height: 120%; text-align: left; widows: 2; orphans: 2; }p.western { font-family: "Calibri",serif; font-size: 11pt; }p.cjk { font-family: "AR PL UKai CN"; font-size: 11pt; }p.ctl { font-size: 11pt; }

Resolution

p { margin-bottom: 0.1in; direction: ltr; color: rgb(0, 0, 10); line-height: 120%; text-align: left; widows: 2; orphans: 2; }p.western { font-family: "Calibri",serif; font-size: 11pt; }p.cjk { font-family: "AR PL UKai CN"; font-size: 11pt; }p.ctl { font-size: 11pt; }

When receiving u32 datatypes from RV, use long datatypes in event properties as RV returns long if you get a field using the TibrvMsg.get() method. This is documented on the RV side (See Reference section below). When you add/update a field in the RV message using the TibrvMsg.updateU32() method on the sender and at the listener, try to get the field using the TibrvMsg.get() method. It will return a long value.

Additional Information

p { margin-bottom: 0.1in; direction: ltr; color: rgb(0, 0, 10); line-height: 120%; text-align: left; widows: 2; orphans: 2; }p.western { font-family: "Calibri",serif; font-size: 11pt; }p.cjk { font-family: "AR PL UKai CN"; font-size: 11pt; }p.ctl { font-size: 11pt; }

Refer to the RV documentation (tib_rv_java_reference, the figure detailing "Wire Format to Java Datatype Conversion Matrix") for the TibrvMsg.get() API.