How to avoid java.lang.IllegalAccessError

Hi All,

I am getting java.lang.IllegalAccessError while calling a bean class constructor which is in anothe package. Please help me how to avoid this. Here is the peice of code,

private BankOB bank_ob;

public int createAcct(){

try{

bmphome = lookUpHome();

this.bank_ob = new BankOB(acct_no,name,age,accttype,balance,min_balance);

bmpremote = bmphome.create(this.bank_ob);// Getting error here

System.out.println("leaving createAcct method");

return 1;

}catch(Exception e){

System.out.println("Inside createAcct exception is "+ e);

e.printStackTrace();

return -1;

}

}

[674 byte] By [seenu_206a] at [2007-11-27 8:33:46]
# 1
The method bmphome.create() is not accessible from your class. This means that is protected, private, or has the default visibility.What is the type of bmphome?
java_knighta at 2007-7-12 20:29:52 > top of Java-index,Desktop,Core GUI APIs...