• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem at run time see code??????

 
Lisa Foster
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
here is my code:
package suncertify.db;
import java.io.*;
import java.util.*;
import suncertify.db.Data;
import java.rmi.*;
import java.rmi.server.UnicastRemoteObject;
public class DataClientLocal extends UnicastRemoteObject implements DataClient
{
Data Instance = null;
public DataClientLocal(String dbName)throws RemoteException
{
super();
try
{
Instance = new Data(dbName);
}
catch(IOException ex)
{
System.out.println("Error Creating Instance in DataClientLocal");
}

}
public FieldInfo [] getFieldInfo()throws RemoteException
{
FieldInfo[] info = null;
try
{
info = Instance.getFieldInfo();
}
catch(Exception e)
{

}
return info;
}
public DataInfo getRecord(int recNum)throws RemoteException
{
DataInfo myInfo = null;
try
{
myInfo = Instance.getRecord(recNum);
}
catch(Exception e)
{
}
return myInfo;
}
public DataInfo find(String toMatch)throws RemoteException
{
DataInfo rec = null;
try
{
rec = Instance.find(toMatch);
}
catch(DatabaseException e)
{

}
return rec;
}
public DataInfo[] criteriaFind(String criteria) throws RemoteException
{
DataInfo[] mySearch = null;
try
{
mySearch = Instance.criteriaFind(criteria);
}
catch(DatabaseException e)
{
}
return mySearch;

}

public String[] getComboValues(int fieldNum) throws RemoteException
{
String[] myString = null;
try
{
myString = Instance.getComboValues(fieldNum);
}
catch(DatabaseException eex)
{
}
return myString;
}
public void add(String [] newData)throws RemoteException
{

try
{
Instance.add(newData);
}
catch(Exception eex)
{

}
}
public void modify(DataInfo newData)throws RemoteException
{
try
{
Instance.modify(newData);
}
catch(Exception exx)
{

}
}
public void delete(DataInfo toDelete)throws RemoteException
{
try
{
Instance.delete(toDelete);
}
catch(Exception exx)
{

}
}
public void close() throws RemoteException
{
try
{
Instance.close();
}
catch(Exception exx)
{

}
}
public void lock(int record)throws IOException, RemoteException
{
try
{
Instance.lock(record);
}

catch(Exception exx)
{

}
}
public void unlock(int record)throws RemoteException
{
try
{
Instance.unlock(record);
}
catch(Exception exx)
{

}

}


}
//from the client I call this class as such:::
DataClient instanceget = null;
try{
instanceget = new DataClientLocal("db.db");
}
.......etc etc

Here is the error:::::
Exception in thread "main" java.lang.VerifyError: (class: suncertify/db/FlyTable
Model, method: <init> signature: ([[Ljava/lang/Object;Lsuncertify/db/DataClientL
ocal V) Bad type in putfield/putstatic
at fbn.main(fbn.java:992)
thanks Lisa in my DataClient that is my Interface which is public and in the same package
I just declare all the Data Class methods and extends Remote
Thanks Lisa
 
Glenn Opdycke-Hansen
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What if you changed the code
//from the client I call this class as such:::
DataClient instanceget = null;
try{
instanceget = new DataClientLocal("db.db");
}
to the following:
//from the client I call this class as such:::
DataClientLocal instanceget = null;
try{
instanceget = new DataClientLocal("db.db");
}
(I am guessing that the error occurred on the assignment of the new DataClientLocal object ref to the DataClient reference.)
 
Lisa Foster
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks Sir I tried same error great guess..
Thanks Lisa
 
Glenn Opdycke-Hansen
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry, I took a guess based on the information at hand.
Is there additional information in the stack trace from the exception? I have a debug mode where lots of printlns are written for such situations.
--glenn
 
Lisa Foster
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your response glen and others I have gooten rid of the previous error see my new post for new error.
Thanks Lisa
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic