• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

urgent

 
AmitCdac Grover
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi..

i make an CMP bean. i create bean,home,and component interface

bean= EmpEntityBean
home= EmpEntityHome
EjbObject or component= EmpEnity

bean and comoponent complied successfully.when i tried to run home .it will give error ( can not resolve symbole
class: EmpEntity
location: interface ejb.entity.EmpEntityHome
)

how can i solve this problem

regards

amit grover
 
Sanju Thomas
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can you run the home ? since it is an interface ? If you are talking about compilation, then I dont think you need the component interface in the home code.
[ April 06, 2005: Message edited by: -Sanju Thomas- ]
 
AmitCdac Grover
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
EJB Object is also an interface ? how come it will not give any error after complation ?
 
AmitCdac Grover
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
here is my code

EJBObject

package com.cdac.emp.ejb.entity;
import javax.ejb.*;
import java.rmi.RemoteException;

public interface EmpEntity extends EJBObject
{
public String getEmpFirstName() throws RemoteException;
public void setEmpFirstName(String first) throws RemoteException;

public String getEmpLastName() throws RemoteException;
public void setEmpLastName(String last) throws RemoteException;

public int getEmpEmployeeId() throws RemoteException;
public void setEmpEmployeeId(int id) throws RemoteException;

}

EJBHome


package com.cdac.emp.ejb.entity;
import javax.ejb.*;
import java.rmi.RemoteException;
import java.util.Collection;

public interface EmpEntityHome extends EJBHome
{
public EmpEntity create(String first,String last) throws CreateException,RemoteException; //error is here in EmpEntity

public EmpEntity findByPrimaryKey(String key) throws FinderException,RemoteException; //error is here in EmpEntity

public Collection findByFirstName(String firstname) throws FinderException,RemoteException;

public Collection findByLastName(String lastname) throws FinderException,RemoteException;

public Collection findByEmpEmployeeId(int id) throws FinderException,RemoteException;

}
 
Sanju Thomas
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when i tried to run home .it will give error ( can not resolve symbole
class: EmpEntity
location: interface ejb.entity.EmpEntityHome
)


You were talking about running the home not compiling!
 
Sanju Thomas
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Now the problem is, Your component interface is not in the class path.
 
AmitCdac Grover
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am takling about the compilation.

i did not understand component is not in class path.
 
Sanju Thomas
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please compile the whole java using "javac -d *.java".
 
AmitCdac Grover
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks now the problem is solved
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic