wood burning stoves 2.0*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Problem at run time see code?????? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Problem at run time see code??????" Watch "Problem at run time see code??????" New topic
Author

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

Lisa Foster
Ranch Hand

Joined: Feb 28, 2001
Posts: 116
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

Joined: Feb 16, 2001
Posts: 40
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.)


--glenn
Lisa Foster
Ranch Hand

Joined: Feb 28, 2001
Posts: 116
thanks Sir I tried same error great guess..
Thanks Lisa
Glenn Opdycke-Hansen
Ranch Hand

Joined: Feb 16, 2001
Posts: 40
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

Joined: Feb 28, 2001
Posts: 116
Thanks for your response glen and others I have gooten rid of the previous error see my new post for new error.
Thanks Lisa
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Problem at run time see code??????
 
Similar Threads
OO Design issue with Data and RMI instance??
Trying to instantiate my middle tier class??see code
Error compiling DataClientLocal
creating an Adapter for my interface??
Naming.Lookup and Rebind