No replies
2 Posts

Pinned topic JNDI InitialContext Lookup failure in WAS6.0

‏2010-08-12T02:23:52Z |
I created a EAR project and an application Client project using RAD 7.5. Client project has been included as a module in EAR. The client project has (Standalone class).

RAD7.5 has been configured to use local WAS6.0 test environment. JMS resources have been configured in WAS6.0 test environment and SI bus has already been created in WAS. My final goal is to send a message to SI bus queue using class. But I am getting the below exception during InitialContext lookup itself.
Exception in RAD7.5 console is below:
InitialContext starts....
Aug 11, 2010 10:07:46 PM
WARNING: jndiproviderProperties
Aug 11, 2010 10:07:47 PM
WARNING: jndiproviderProperties
Aug 11, 2010 10:07:47 PM
WARNING: noInitCtxFactoryImpl
Exception in thread "main" javax.naming.ConfigurationException: The property is not set. The most likely cause is that the jar which contains the file com/ibm/websphere/naming/ cannot be found by the class loader.
at javax.naming.spi.NamingManager.getInitialContext(
at javax.naming.InitialContext.getDefaultInitCtx(
at javax.naming.InitialContext.init(
at javax.naming.InitialContext.<init>(
at sender.Main.main( class snippet is below:

24 public static void main(String[] args) throws Exception {

25 Hashtable env = new Hashtable();
26 env.put(Context.INITIAL_CONTEXT_FACTORY,"");
27 env.put(Context.PROVIDER_URL, "iiop://localhost:21005");
28 System.out.println("InitialContext starts....");
29 InitialContext initCtx = new InitialContext(env);

I see, Provider URL value as "iiop://localhost:21005/" in Universal Test Client GUI in RAD. RAD uses the default jdk which comes in RAD v7.5. Please help to troubleshoot what is causing this error?. I googled it, but couldn't find the cause. Thanks