• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Error connecting from Stand Alone Client to WebSphere

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
you have to run your application as WebSphere Application Client
reply
    Bookmark Topic Watch Topic
  • New Topic