WebSphere Components - The problem with Initialization , when NESTED CLASS EXIST <-- How to solve ?

This is Interesting: Free IT Magazines  
Home > Archive > WebSphere Components > January 2004 > The problem with Initialization , when NESTED CLASS EXIST <-- How to solve ?





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 The problem with Initialization , when NESTED CLASS EXIST <-- How to solve ?
Marat Matosov

2004-01-19, 10:34 am

Hello Dear Sir/Madam !


I have some problem , which occurs at run time during some instantiation of
format Class .. I think so ...

The run time Error is (I copied it from the pannel):

/*

java.lang.VerifyError: (class: composer/aca/formats/MyFormat,
method: <init> signature: ()V) Incompatible object argument for method call
Exception in thread "main"


*/


Please , help me ..... I dont know what is going on there ....


I have the following design of my code :


public class MyFormat extends RecordFormat

{

................

public MyFormat()
{
super();
parser = new org.apache.xerces.parsers.SAXParser(); // I need it for my
class
curParser = new PS10FormaterParser(); // inner
private class of MyFormat class
}

public MyFormat(String arg0) throws IOException
{
super(arg0);
parser = new org.apache.xerces.parsers.SAXParser(); // I need it for
my class
curParser = new PS10FormaterParser(); // inner
private class of MyFormat class

}

public String formatContext(Context aContext)
{
.................
// works pretty well , checked !!!!!
}

public DataElement unformatContext(String aString,Context aContext)
{
.................
// works pretty well , checked !!!!!

}

// I overrided the initializeFrom method in following fashion way :

public Object initializeFrom(Tag tag) throws IOException {


for(Enumeration enumeration = tag.getAttrList().elements();
enumeration.hasMoreElements();)
{
TagAttribute tagattribute =
(TagAttribute)enumeration.nextElement();

if(tagattribute.getName().equals("txnName"))
setTxnName((String)tagattribute.getValue());
}


Tag nextSubTag = null;
int nTags = tag.getSubTags().size();
for (int i = 0; i<nTags ; i++)
{
nextSubTag = (Tag)(tag.getSubTags().elementAt(i));

if (nextSubTag!=null)
{
FormatElement formatElement =
(FormatElement)
getExternalizer().convertTagToObject(nextSubTag);
add(formatElement);
}
}
return
((FormatExternalizer)getExternalizer()).linkToDecorators((FormatElement)
this,tag);




}









Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com