Hi all,
I am using WSAD5.0 to develop EJBs. I am having problem while doing lookup from a stand alone program. Here is the code and the runtime exception statcktrace.
Properties props = new Properties();
props.put(InitialContext.INITIAL_CONTEXT_FACTORY, "com.ibm.websphere.naming.WsnInitialContextFactory");
props.put(InitialContext.PROVIDER_URL, "iiop://localhost:2809/");
InitialContext ctx = new InitialContext(props);
System.out.println("***********GOT CONTEXT " + ctx);
Object obj = ctx.lookup("ejb/com/airmantech/ejb/cmp/AirportHome");
Output :::
***********GOT CONTEXT javax.naming.InitialContext@1cd0f2f4
java.lang.IncompatibleClassChangeError: com.ibm.CORBA.iiop.ORB method createObjectURL(Ljava/lang/String
Lcom/ibm/CORBA/iiop/ObjectURL;
at com.ibm.ws.naming.util.WsnInitCtxFactory.parseIiopUrl(WsnInitCtxFactory.java:1668)
at com.ibm.ws.naming.util.WsnInitCtxFactory.parseBootstrapURL(WsnInitCtxFactory.java:1427)
at com.ibm.ws.naming.util.WsnInitCtxFactory.getInitialContextInternal(WsnInitCtxFactory.java:368)
at com.ibm.ws.naming.util.WsnInitCtx.getContext(WsnInitCtx.java:102)
at com.ibm.ws.naming.util.WsnInitCtx.getContextIfNull(WsnInitCtx.java:408)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:131)
at javax.naming.InitialContext.lookup(InitialContext.java:359)
at com.airmantech.ejb.test.EJBTestClient.main(EJBTestClient.java:36)
Exception in
thread "P=427433
=0:CT"
Is my code is wrong ?
Thanks in advance
Regards
Kamal