posted 19 years ago
I am using WSAD 5.1. I am trying to connect to WAS 4.x. Following is the error :
***************************
javax.naming.NamingException: Error during resolve. Root exception is org.omg.CORBA.NO_IMPLEMENT: minor code: 0 completed: No
at com.ibm.ws.Transaction.JTS.CurrentImpl.suspend(CurrentImpl.java:394)
at com.ibm.ws.naming.jndicos.CNContextImpl.suspendTransaction(CNContextImpl.java:4070)
at com.ibm.ws.naming.jndicos.CNContextImpl.cosResolve(CNContextImpl.java:3521)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1565)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1525)
at com.ibm.ws.naming.jndicos.CNContextImpl.lookup(CNContextImpl.java:1225)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:132)
at javax.naming.InitialContext.lookup(InitialContext.java:359)
at odsclient.go(odsclient.java:44)
at odsclient.main(odsclient.java:24)
HERE IS MY CODE
***************************
***************************
public void go() {
try {
Properties props=new Properties();
props.put(Context.INITIAL_CONTEXT_FACTORY,"com.ibm.websphere.naming.WsnInitialContextFactory");
props.put(Context.PROVIDER_URL,"iiop://sgqas02:9002");
props.put("org.omg.CORBA.ORBClass","com.ibm.rmi.iiop.ORB");
props.put("org.omg.CORBA.ORBSingletonClass","com.ibm.rmi.corba.ORBSingleton");
props.put("javax.rmi.CORBA.UtilClass","com.ibm.rmi.javax.rmi.CORBA.Util");
props.put("javax.rmi.CORBA.StubClass","com.ibm.rmi.javax.rmi.CORBA.StubDelegateImpl");
props.put("javax.rmi.CORBA.PortableRemoteObjectClass","com.ibm.rmi.javax.rmi.PortableRemoteObject");
props.put("java.naming.factory.url.pkgs","com.ibm.ws.naming");
Context ctx=new InitialContext(props);
System.out.println("10");
Object o = ctx.lookup("ejb/com/starwood/services/spg/ejb/SPGLookupSvcHome");
System.out.println("12");
SPGLookupSvcHome spgLookupSvcHome = (SPGLookupSvcHome) javax.rmi.PortableRemoteObject.narrow(o, SPGLookupSvcHome.class);
System.out.println("13");
SPGProfileSvc spgProfileSvc = (SPGProfileSvc) spgLookupSvcHome.create();
if (spgProfileSvc != null)
System.out.println("Connected successfully");
else
System.out.println("Failed to connect to ODS");
}
catch (Exception e) {
e.printStackTrace();
}
}
***************************
***************************
ANY HELP APPRECIATED
THANKS