• 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

Look up problem in WAS5.0

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
author
Posts: 3892
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
First question: Are you using the LaunchClient program to start your program?
My guess is that you are not. If so, the solution is to ONLY and ALWAYS use the launchclient.bat program to launch standalone J2EE clients. If you are already doing that, then this is probably a classpath error -- for instance, you could be including too much in your EAR file.
Kyle
[ January 31, 2003: Message edited by: Kyle Brown ]
 
Ranch Hand
Posts: 365
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Were you able to get a successful lookup using your test environment (Right click on the ejb module and select run on server: In the browser select the jndi properties/explorer tabs to work with the ejb)?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic