• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Rob Spoor
  • Henry Wong
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh
  • Jj Roberts

problem in bmp deployment

 
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
I have a knack for fixing things like this ... um ... sorry ... here is a consilitory tiny ad:
SKIP - a book about connecting industrious people with elderly land owners
https://coderanch.com/t/skip-book
reply
    Bookmark Topic Watch Topic
  • New Topic