hi
i made the BMP bean. after compliation in deloy time when i when i say
tools -> verifier in
j2ee 1.3.1 it will give me following faliure
1.
For [ EmpEntityBean ]
For EJB Class [ EmpEntityBean ] Finder method [ ejbFindByPrimaryKey ]
Error: A [ ejbFindByPrimaryKey ] method was found, but [ ejbFindByPrimaryKey ] return type must be the enterprise beans primary key type.
2.
For [ EmpEntityBean ]
Error: Transaction attributes must be specified for the methods defined in the home interface [ EmpEntityHome ]. Method [ create ] has no transaction attribute defined within this bean [ EmpEntityBean ].
3.
For [ EmpEntityBean ]
For Home interface [ EmpEntityHome ]
Error: No single arg findByPrimaryKey(PrimaryKeyClass) method was found in home interface class [ EmpEntityHome ].
follwowing are my home interface and component interface
public interface EmpEntityHome extends EJBHome
{
public EmpEntity create(int employeeid,
String first,String last) throws CreateException,RemoteException;
public EmpEntity findByPrimaryKey(EntityPK key) throws FinderException,RemoteException;
public Collection findByFirstName(String firstname) throws FinderException,RemoteException;
public Collection findByLastName(String lastname) throws FinderException,RemoteException;
public Collection findByEmpEmployeeId(int id) throws FinderException,RemoteException;
}
public interface EmpEntity extends EJBObject
{
public String getEmpFirstName() throws RemoteException;
public void setEmpFirstName(String FirstName) throws RemoteException;
public String getEmpLastName() throws RemoteException;
public void setEmpLastName(String LastName) throws RemoteException;
public int getEmpEmployeeId() throws RemoteException;
public void setEmpEmployeeId(int EmpId) throws RemoteException;
}
this is my bean find by primary key method
public EntityPK ejbFindByPrimaryKey(EntityPK pk) throws FinderException
{
PreparedStatement pstmt = null;
Connection conn = null;
Vector v = new Vector();
try
{
DSManager.getConnection();
System.out.println("ejbFindByPrimaryKey(" + pk + ") called");
pstmt = conn.prepareStatement("SELECT EMPID FROM EMPLOYEE WHERE EMPID = ?");
int id=Integer.parseInt(pk.toString());
pstmt.setInt(1,id);
ResultSet rs = pstmt.executeQuery();
rs.next();
return pk;
}
catch (Exception e)
{
throw new FinderException(e.toString());
}
finally
{
try { if (pstmt != null) pstmt.close(); }
catch (Exception e) {}
try { if (conn != null) conn.close(); }
catch (Exception e) {}
}
}
plz help me out how i solve this problem
regards
amit grover