JNDI lookup in a java client (WAS 6.0.2) - Websphere

This is a discussion on JNDI lookup in a java client (WAS 6.0.2) - Websphere ; Hi I am trying to do a JNDI look up for JMS resources in the WAS JNDI tree. Hashtable env = new Hashtable(); env.put(Context.INITIAL_CONTEXT_FACTORY, "com.ibm.websphere.naming.WsnInitialContextFactory"); //env.put(Context.PROVIDER_URL, "corbaloc:iiop:localhost:9600"); env.put(Context.PROVIDER_URL, "iiop://localhost:2809"); Context context = new InitialContext(env); But i keep getting class not ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: JNDI lookup in a java client (WAS 6.0.2)

  1. JNDI lookup in a java client (WAS 6.0.2)

    Hi

    I am trying to do a JNDI look up for JMS resources in the WAS JNDI tree.



    Hashtable env = new Hashtable();

    env.put(Context.INITIAL_CONTEXT_FACTORY, "com.ibm.websphere.naming.WsnInitialContextFactory");

    //env.put(Context.PROVIDER_URL, "corbaloc:iiop:localhost:9600");

    env.put(Context.PROVIDER_URL, "iiop://localhost:2809");


    Context context = new InitialContext(env);



    But i keep getting class not found exceptions.

    I have added the following in my classpath :

    server.jar

    naming.jar

    namingclient.jar

    namingserver.jar

    Any pointers would be greatly appreciated.

    Thanks

    Bikash

  2. Re: JNDI lookup in a java client (WAS 6.0.2)

    http://publib.boulder.ibm.com/infoce...velopthin.html

    You should never build your own classpath with direct reference to the
    product jar files. You must always install either the server or client
    product on the machine where you want to run an application client. Pick the
    link from the above IC topic for client or server as appropriate.

    --
    Stephen ****s
    WESB/WPS Administration

    wrote in message
    news:791299840.1209533073174.JavaMail.wassrvr@ltsg was009.sby.ibm.com...
    > Hi
    >
    > I am trying to do a JNDI look up for JMS resources in the WAS JNDI tree.
    >
    >
    >
    > Hashtable env = new Hashtable();
    >
    > env.put(Context.INITIAL_CONTEXT_FACTORY,
    > "com.ibm.websphere.naming.WsnInitialContextFactory");
    >
    > //env.put(Context.PROVIDER_URL, "corbaloc:iiop:localhost:9600");
    >
    > env.put(Context.PROVIDER_URL, "iiop://localhost:2809");
    >
    >
    > Context context = new InitialContext(env);
    >
    >
    >
    > But i keep getting class not found exceptions.
    >
    > I have added the following in my classpath :
    >
    > server.jar
    >
    > naming.jar
    >
    > namingclient.jar
    >
    > namingserver.jar
    >
    > Any pointers would be greatly appreciated.
    >
    > Thanks
    >
    > Bikash




+ Reply to Thread