| Petterson Mikael 2006-03-29, 8:02 am |
| Hi,
The following line in method preperAndPush generates a
IncompatibleClassChangeError ( I added a try-catch on Throwable to find
out).
> this.destination.push((MeasuredData[]) mesDataList.toArray(new MeasuredData[0]),
This is all lines of code:
[color=darkred]
> private void preperAndPush(Collection collection) {
> MessageLog.trace(BoamTraceGroupDef.PMS, getClass(),
> "preperAndPush(), scanner name:" + this.name);
>
> Collection moTypeList = getMoTypeList(collection);
> List mesDataList = new ArrayList();
> Iterator iter = moTypeList.iterator();
>
> while (iter.hasNext()) {
> String moTypeName = (String) iter.next();
> Object[] scannedDataByMoTypeList = getScannedDataByMoType(moTypeName,
> collection);
>
> if (scannedDataByMoTypeList == null) {
> MessageLog.trace(BoamTraceGroupDef.PMS, getClass(),
> "Nothing to push,for MoType:" + moTypeName
> + ", the measured data is empty!,scanner Name:"
> + this.name);
> continue;
> }
>
> String[] cntNames = getObservedObjectNameList(scannedDataByM
oTypeList);
> MeasuredDataUpdatable mesData = new MeasuredDataUpdatable(cntNames,
> this.granularityPeriod);
>
> addDataToMeasuredDataUpdatable(mesData, scannedDataByMoTypeList,
> cntNames);
> mesDataList.add(mesData);
> }
> this.destination.push((MeasuredData[]) mesDataList.toArray(new MeasuredData[0]),
> getSeqNo());
>
>
> }
destination is a DataConsumer class.
This is the definition of push:
The
synchronized public void push(MeasuredData[] data, int dataSeqNo) {
if (!this.locked && (this.seqNo == dataSeqNo)) {
// this.formatter.storeMeasuredData(data);
this.data = data;
} else {
MessageLog.info(this.getClass(), "Pushed measured data
ignored.");
}
}
Any ideas why I get the Error? I don't see the "Pushed measured data
ignored." in my logg so I assume that "this.data = data;" is executed.
cheers,
//mikael
|