Topic
1 reply Latest Post - ‏2013-01-05T07:06:39Z by SystemAdmin
SystemAdmin
SystemAdmin
30899 Posts
ACCEPTED ANSWER

Pinned topic WebSphereV8.5.0 JMS Standalone Client

‏2013-01-05T05:31:26Z |
I try to get Queue Connection Factory from standalone client (was 8.5.0 /win7).
The client code is :

import java.io.IOException;
import java.net.UnknownHostException;
import java.util.Hashtable;

import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;

public class Test {

public static void main(String[] args) throws NamingException, UnknownHostException, IOException {
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY,
"com.ibm.websphere.naming.WsnInitialContextFactory");
env.put(Context.PROVIDER_URL, "iiop://localhost:2809");
env.put(Context.SECURITY_PRINCIPAL, "devzzm");
env.put(Context.SECURITY_CREDENTIALS, "123456");

InitialContext ctx = new InitialContext(env);
System.out.println(ctx.getNameInNamespace());
ctx.lookup("abc");
}
}
//-------Code end

And I add these jars to eclipse build path:

com.ibm.ws.ejb.thinclient_8.5.0.jar
com.ibm.ws.orb_8.5.0.jar
com.ibm.ws.sib.client_ExpeditorDRE_8.5.0.jar
com.ibm.ws.orb_8.5.0.jar
But I got the error message :

Caused by: org.omg.CORBA.TRANSIENT: initial and forwarded IOR inaccessible vmcid: IBM minor code: E07 completed: No
Caused by: java.net.ConnectException: connect: Address is invalid on local machine, or port is not valid on remote machine

Corba debug files attached for more detail:

And the same program can work well under (WAS 7.0/suse linux ).

Advice/guidance would be much appreciated!

Attachments

Updated on 2013-01-05T07:06:39Z at 2013-01-05T07:06:39Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    30899 Posts
    ACCEPTED ANSWER

    Re: WebSphereV8.5.0 JMS Standalone Client

    ‏2013-01-05T07:06:39Z  in response to SystemAdmin
    Find the reason, WAS8 RMI&IIOP required SSL by default.

    So must add VM arguments list below :

    -Dcom.ibm.CORBA.Debug=true
    -Dcom.ibm.CORBA.CommTrace=true
    -Dcom.ibm.CORBA.Debug.Output=client.log
    -Dcom.ibm.SSL.ConfigURL=file:/$WS_HOME/AppServer/properties/ssl.client.props
    -Dcom.ibm.CORBA.ConfigURL=file:/$WS_HOME/AppServer/properties/sas.client.props
    -Dcom.ibm.CORBA.loginUserid=was
    -Dcom.ibm.CORBA.loginPassword=123456
    -Dcom.ibm.CORBA.loginSource=properties