Hi. guys.
I have a problem to run client. There were not any problem up to compile client.
After i run the client.... i got message below.
--------------------------------------------------------------------------
C:\SCBCD_PRAC\projects\advice>
java -cp %J2EE_JARS%;AdviceAppClient.jar; AdviceClient
ic
look up the Advisor
cast
create
getAdvice
ERROR
java.rmi.RemoteException: CORBA BAD_OPERATION 0 No; nested exception is:
org.omg.CORBA.BAD_OPERATION: vmcid: 0x0 minor code: 0 completed: No
at com.sun.corba.ee.internal.iiop.ShutdownUtilDelegate.mapSystemException(ShutdownUtilDelegate.java:137)
at javax.rmi.CORBA.Util.mapSystemException(Util.java:65)
at headfirst._Advice_Stub.getAdvice(Unknown Source)
at AdviceClient.go(AdviceClient.java:25)
at AdviceClient.main(AdviceClient.java:10)
Caused by: org.omg.CORBA.BAD_OPERATION: vmcid: 0x0 minor code: 0 completed: No
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
at java.lang.Class.newInstance0(Class.java:308)
at java.lang.Class.newInstance(Class.java:261)
at com.sun.corba.ee.internal.iiop.messages.ReplyMessage_1_2.getSystemException(ReplyMessage_1_2.java:93)
at com.sun.corba.ee.internal.iiop.ClientResponseImpl.getSystemException(ClientResponseImpl.java:108)
at com.sun.corba.ee.internal.POA.GenericPOAClientSC.invoke(GenericPOAClientSC.java:132)
at org.omg.CORBA.portable.ObjectImpl._invoke(ObjectImpl.java:457)
at headfirst._Advice_Stub.getAdvice(Unknown Source)
... 2 more
--------------------------------------------------------------------
import javax.naming.*;
import java.rmi.*;
import javax.rmi.*;
import headfirst.*;
import javax.ejb.*;
public class AdviceClient {
public static void main(
String[] arg) {
new AdviceClient().go();
}
public void go(){
try{
System.out.println("ic");
Context ic = new InitialContext();
System.out.println("look up the Advisor");
Object o = ic.lookup("Advisor");
System.out.println("cast");
AdviceHome home = (AdviceHome)PortableRemoteObject.narrow(o, AdviceHome.class);
System.out.println("create");
Advice advisor = home.create();
System.out.println("getAdvice");
System.out.println( advisor.getAdvice() );
}catch(Exception ex){
System.out.println("ERROR");
ex.printStackTrace();
}
}
}
---------------------------------------------------------------------------
i need a help.....