Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2006
    Posts
    2

    Unanswered: Cannot instanciate com.ibm.websphere.naming.WsnInitialContextFactory

    Hi all,

    I would like to connect remotely to the DB2 in linux machine using the JNDI lookup.

    In websphere development 5.1, this portion of code is working in 5.1 env :

    /////////////////////////////////////////////////////////////////////////
    Context MyCtx = null;
    DataSource MyDS = null;
    Hashtable parms = new Hashtable();
    Connection conn = null;

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

    MyCtx = new InitialContext(parms);
    MyDS = (DataSource) MyCtx.lookup("jdbc/Employee");
    conn = MyDS.getConnection();

    /////////////////////////////////////////////////////////////////////////

    But after i recompile in websphere rational 6.0, the code is not working anymore. It said :

    => Cannot instanciate com.ibm.websphere.naming.WsnInitialContextFactory. .

    I have imported the db2jcc.jar, db2jcc_license_cu.jar, can anyone giv me some clue what is happening? Thanks alot.

  2. #2
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    I think this question will better belong to a java or a websphere group


    Sathyaram
    Visit the new-look IDUG Website , register to gain access to the excellent content.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •