WebSphere Components - RecordFormat inherited Class : The problem on Intialization : Help me , please !!!!!!

This is Interesting: Free IT Magazines  
Home > Archive > WebSphere Components > January 2004 > RecordFormat inherited Class : The problem on Intialization : Help me , please !!!!!!





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 RecordFormat inherited Class : The problem on Intialization : Help me , please !!!!!!
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);




}








Erwin Vervaet

2004-01-19, 10:34 am

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




Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com