• Post Reply Bookmark Topic Watch Topic
  • New Topic

problem in bmp deployment

 
mohan dodderi
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
i am working on BMP entity bean but when i try to deploy a file it is showing the fallowing error .. if any one of u know the reason pls inform me. and also see the home interface code and entity bean code at the end



Method : public abstract BMPRemote ejbFindByPrimaryKey(String) throws FinderException, RemoteException
Section: 12.2.9
Warning: Each home method must match a method defined in the entity bean class.

21:04:13,328 WARN [verifier] EJB spec violation:
Bean : BMP
Method : public abstract Collection FindAll(String) throws FinderException, RemoteException
Section: 12.2.9
Warning: Each home method must match a method defined in the entity bean class.




my home interface code


public interface BMPHome extends javax.ejb.EJBHome{
//public BMPRemote create(String s1,String s) throws CreateException,RemoteException;
BMPRemote ejbFindByPrimaryKey(String str) throws FinderException ,RemoteException;
Collection FindAll(String str)throws FinderException ,RemoteException;

}



MY BMP BEAN CODE




public Collection FindAll(String str)throws FinderException,RemoteException
{

Connection con=null;
PreparedStatement ps=null;
ResultSet result=null;
Vector vt=new Vector();
try
{
con=this.getConnection();
ps=con.prepareStatement("select * from basic_courses");
result=ps.executeQuery();


while(result.next())
{
vt.addElement(result.getObject("id"));
}
System.out.println("%%%%%%%%%%%%%%%%%%%%%% "+vt.size());

}
catch(Exception e){}
return vt;
}


public String ejbFindByPrimaryKey(String str)throws FinderException ,RemoteException
{

Connection con=null;
PreparedStatement ps=null;
ResultSet result=null;
Vector vt=new Vector();
try
{
con=this.getConnection();
ps=con.prepareStatement("select * from basic_courses");
result=ps.executeQuery();


while(result.next())
{
vt.addElement(result.getObject("id"));
}
System.out.println("%%%%%%%%%%%%%%%%%%%%%% "+vt.size());

}
catch(Exception e){}
return str;
}

thanks & regards
Mohandodderi
 
Balazs Borbely
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in the home interface you have to put the finder methods without 'ejb' prefix

in the home interface you will have
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!