How to call remote server with truststore from stand alone java program

Posted on 2009-04-30
Last Modified: 2013-11-23

I am trying to call the EJB in WAS container from outside machine using stand alone java program. Error I am getting is
Exception in thread  javax.ejb.CreateException: JNDI lookup failed for "ejb name, javax.naming.ServiceUnavailableException: A communication failure occurred while attempting to obtain an initial context with the provider URL: "iiop://hostname:port".  Make sure that any bootstrap address information in the URL is correct and that the target name server is running.  A bootstrap address with no port specification defaults to port 2809.  Possible causes other than an incorrect bootstrap address or unavailable name server include the network environment and workstation network configuration. [Root exception is org.omg.CORBA.TRANSIENT: connect: Address is invalid on local machine, or port is not valid on remote machine:host=hostname,port=0  vmcid: IBM  minor code: E02  completed: No]

In provider URL I have iiop://hostname:port. Also WAS container is secured and I guess I need to pass truststore and or keystore.

Can anybody tell me how to set truststore and keystore in stand alone java program so that I can call remote server to access ejb.

Question by:don_uta
    1 Comment
    LVL 92

    Accepted Solution


    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    Join & Write a Comment

    Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
    Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
    The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
    The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now