File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB and other Java EE Technologies and the fly likes Failed to initialize the ORB using websphere. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Failed to initialize the ORB using websphere. " Watch "Failed to initialize the ORB using websphere. " New topic

Failed to initialize the ORB using websphere.

Savita Nath

Joined: Aug 12, 2004
Posts: 1
hi all,
i have prob in running client prog. i hve written a message driven bean which is deployed sucessfully on server(Websphere).

when running client prog i get the foll error msg:

Getting InitialContext...
about to retrieve initial context.
url provided..{java.naming.provider.url=iiop:}
Wsn class found..
initial context has been created.javax.naming.InitialContext@4fb549
Looking up for connection factory..
Unable to lookup jndi name..javax.naming.NamingException: Failed to initialize t
he ORB [Root exception is java.lang.reflect.InvocationTargetException]

my client prog is:

package beans.message;

import javax.jms.*;
import javax.naming.*;

import java.util.Properties;

public class SampleMsgClient
public static void main(String args[])
InitialContext ctx=null;
TopicConnectionFactory conFactory=null;
TopicConnection con=null;
Topic topic=null;
TopicSession session=null;
TopicPublisher publisher=null;
TextMessage txtMsg=null;
Properties p = null;

final int NUM_MSGS=3;
System.out.println("Getting InitialContext...");
ctx= getInitialContext();

System.out.println("initial context has been created."+ctx);
p=new Properties();

System.out.println("Looking up for connection factory..");
conFactory=(TopicConnectionFactory) ctx.lookup("jms/MyConnectionFactory");
System.out.println("Lookup sucessfull for Topic Connection Factory..");
topic=(Topic) ctx.lookup("jms/MyTopicname");
System.out.println("Lookup for Topic jndi successfull..");

}catch(NamingException exe)
System.out.println("Unable to lookup jndi name.."+exe);
}catch(Exception mExe)
System.out.println("Exception in main.."+mExe);

con= conFactory.createTopicConnection();
System.out.println("Topic Connection started....");
publisher= session.createPublisher(topic);

txtMsg = session.createTextMessage();

System.out.println("Created Text Message....");

//tm.setText("this is a sample test message"

for(int i=0;i<NUM_MSGS;i++)
txtMsg.setText("This is message...." + (i+1));
System.out.println("Sending message....." + txtMsg.getText());

System.out.println("Publishing Message....");
}catch(Exception exe)
}catch(JMSException jExe)
System.out.println("Unable to close connection.....");


public static InitialContext getInitialContext() throws NamingException
Properties p = new Properties();

System.out.println("about to retrieve initial context.");

p.put(Context.PROVIDER_URL, "iiop:");
System.out.println("url provided.."+p);


System.out.println("Wsn class found..");

return new InitialContext(p);

catch (Exception e)
System.out.println("Exception in getInitialContext.."+e);
return null;




plz help.
Ashok kumar Reddy

Joined: Aug 12, 2004
Posts: 5
make the question short,to get the reply.!
I agree. Here's the link:
subject: Failed to initialize the ORB using websphere.
It's not a secret anymore!