Hello Everybody,
I have started to read HF EJB, i am new to this EJB. this is my first example in EJB. I hereby complied the program of AdviceBean from the HF book. I am also using J2EE RI server. I have succesfully deployed & created AdviceAppClient.jar file & complied the AdviceClient.
when i wanted to run this it is throwing an error. i have tried in two ways as follows:-
1)
D:\projects\advice>java -cp "j2ee.jar;AdviceAppClient.jar" AdviceClient
Exception in thread "main" java.lang.NoClassDefFoundError: AdviceClient
2) D:\projects\advice>java AdviceClient
avax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.nami
g.factory.initial
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:640)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:280)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at AdviceClient.go(AdviceClient.java:20)
at AdviceClient.main(AdviceClient.java:12)
Can anybody tell me where i am going wrong & i have been stuck at this error from 2 days.
Thanks in advance.
I have started to read HF EJB, i am new to this EJB. this is my first example in EJB. I hereby complied the program of AdviceBean from the HF book. I am also using J2EE RI server. I have succesfully deployed & created AdviceAppClient.jar file & complied the AdviceClient.
when i wanted to run this it is throwing an error. i have tried in two ways as follows:-
1)
D:\projects\advice>java -cp "j2ee.jar;AdviceAppClient.jar" AdviceClient
Exception in thread "main" java.lang.NoClassDefFoundError: AdviceClient
2) D:\projects\advice>java AdviceClient
avax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.nami
g.factory.initial
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:640)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:280)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at AdviceClient.go(AdviceClient.java:20)
at AdviceClient.main(AdviceClient.java:12)
Can anybody tell me where i am going wrong & i have been stuck at this error from 2 days.
Thanks in advance.