|
Hi, I am new to EJB, and I am trying to run my
first HelloWorld stateless session bean, without following a tutorial. I am
using deploytool from sun, j2ee and cloudscape. I succeeded deploying the
HelloApp, HelloBean, interfaces but I am having trouble compiling the
HelloClient.
I am getting:
C:\>cd jserverside\examples
C:\JServerSide\examples>javac
helloclient.java
helloclient.java:7: cannot resolve symbol symbol: class Hello import Hello; ^ helloclient.java:8: cannot resolve symbol symbol: class HelloHome import HelloHome; ^ helloclient.java:17: cannot resolve symbol symbol : class HelloHome location: class HelloClient HelloHome home = (HelloHome) ^ helloclient.java:17: cannot resolve symbol symbol : class HelloHome location: class HelloClient HelloHome home = (HelloHome) ^ helloclient.java:19: cannot resolve symbol symbol : class HelloHome location: class HelloClient ctx.lookup("HelloHome"), HelloHome.class); ^ helloclient.java:22: cannot resolve symbol symbol : class Hello location: class HelloClient Hello hello = home.create(); ^ 6 errors C:\JServerSide\examples>
HelloClient.java is:
import javax.ejb.*;
import java.rmi.*; import javax.naming.Context; import javax.naming.InitialContext; import java.util.Properties; import Hello;
import HelloHome; public class HelloClient
{ public static void main(String[] args) throws Exception { Context ctx = new InitialContext(System.getProperties()); HelloHome home = (HelloHome) javax.rmi.PortableRemoteObject.narrow( ctx.lookup("HelloHome"), HelloHome.class); Hello hello = home.create(); System.out.println(hello.hello()); hello.remove(); } } CLASSPATH is:
C:\j2sdkee1.3\lib;C:\j2sdkee1.3\lib\j2ee.jar;C:\JServerSide\examples
HelloApp.ear is at:
C:\JServerSide\examples\
Thanks a lot.
Luis. |
- Basic question Nittle Gupta
- Re: Basic question Rickard �berg
- Re: Basic question Nittle Gupta
- Re: Basic question Rickard �berg
- Re: Basic question Nittle Gupta
- Re: Basic question Rickard �berg
- AW: Basic question Hermann Schmitt
- basic question saisuraj chengalvala
- Re: basic question guo_yonglin
- Luis A
