RecordFormat inherited Class : The problem on Intialization : Help me , please !!!!!!
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > WebSphere > WebSphere Components > RecordFormat inherited Class : The problem on Intialization : Help me , please !!!!!!




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    RecordFormat inherited Class : The problem on Intialization : Help me , please !!!!!!  
Marat Matosov


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-19-04 03:34 PM

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);




}













[ Post a follow-up to this message ]



    Re: RecordFormat inherited Class : The problem on Intialization : Help me , please !!  
Erwin Vervaet


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-19-04 03:34 PM

VerifyError means according to the JavaDoc:
Thrown when the "verifier" detects that a class file, though well formed,
contains some sort of internal inconsistency or security problem.

The problem seems to be with the default constructor of your class ("method:
<init> signature: ()"). Anyway, this is indeed a strange problem. I suggest
you just de a clean recompile of all your code to see if that helps.

--
Erwin Vervaet
erwin@ervacon.com

"Marat Matosov" <maratm@bezeqint.net> wrote in message
news:b30n3a$3hee$1@news.boulder.ibm.com...
quote:
> Hello Dear Sir/Madam ! > > > I have some problem , which occurs at run time during some instantiation
of
quote:
> 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
quote:
> 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
quote:
> 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); > > > > > } > > > > > > > >




[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 06:45 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register