Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

what is wrong here..Session Bean

Status
Not open for further replies.

patnim17

Programmer
Jun 19, 2005
111
0
0
US
I am building a simple Stateless session bean, so I have 3 files:

1. EJB - xyzEJB.java

package com;
public class xyzEJB implements SessionBean {
//defined all call back methods
public String method1(String x) throws RemoteException{
return x + " SSB";
}
}

2. remote interface - xyz.java

package com;
public interface xyz extends EJBObject {
public String method1(String x) throws RemoteException;
}


3. Home interface: xyzEJBHome.java

package com;
public interface xyzEJBHome extends EJBHome {
public xyz create() throws CreateException,RemoteException;
}

********

All the 3 files are in my c:\com folder.
I could successfully comple the 1st 2 files, ie.. the EJB and remote interface..but when I compile the home interface I get this error:

xyzEJBHome.java:11: cannot resolve symbol
symbol : class xyz
location: interface com.xyzEJBHome
public xyz create() throws CreateException, RemoteException;
^
1 error




 
How are you compiling these? And BTW, the convention in Java is to use a capital letter for the first letter of a class name.

Tim
 
So when you come to compile xyzEJBHome, the other compiled classes should be on the classpath (use the -classpath <path> arguments to the javac command).

If you're gonna be writing lots of classes, I'd at least consider using something like Jakarta Ant to build your project. Doing everything by hand with javac is gonna drive you insane.

Tim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top