For Programmers: Free Programming Magazines  


Home > Archive > Java Help > March 2006 > IncompatibleClassChangeError part 2









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author IncompatibleClassChangeError part 2
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
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com