import java.util.*;
import javax.naming.*;
import javax.naming.NamingException;
public class LotusTest{
public static void main(
String args[]){
try{
Hashtable parms = new Hashtable();
parms.put(Context.INITIAL_CONTEXT_FACTORY,"com.ibm.websphere.naming.WsnInitialContextFactory");
parms.put(Context.PROVIDER_URL, "iiop://192.200.8.224:2809");
//parms.put(Context.PROVIDER_URL, "iiop://192.200.8.224:900");
//This URL will be different if context provider is on another machine, for example "iiop://myserver:900/"
javax.naming.Context Ctx = null;
Ctx = new InitialContext(parms);
javax.sql.DataSource ds = (javax.sql.DataSource)Ctx.lookup("jdbc/DominoDS");
java.sql.Connection conn = ds.getConnection();
}
catch(Exception ee){
ee.printStackTrace();
}
}
}
when i am tring to run the programme written above using launchClient tool in websphere i am getting the following exceptions
WSCL0014I: Invoking the Application Client class LotusTest
com.ibm.websphere.naming.CannotInstantiateObjectException: Exception occurred w
ile the JNDI NamingManager was processing a javax.naming.Reference object. Roo
exception is javax.naming.NamingException: Exception: null
at com.ibm.websphere.advanced.cm.factory.DataSourceFactory$ResourceRefe
enceObjectFactory.getObjectInstance(DataSourceFactory.java:767)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:
13)
at com.ibm.ws.naming.util.Helpers.processSerializedObjectForLookup(Help
rs.java:884)
at com.ibm.ws.naming.jndicos.CNContextImpl.processResolveResults(CNCont
xtImpl.java:1674)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:
537)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:
457)
at com.ibm.ws.naming.jndicos.CNContextImpl.lookup(CNContextImpl.java:11
7)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:132)
at javax.naming.InitialContext.lookup(InitialContext.java:359)
at LotusTest.main(LotusTest.java:22)
at java.lang.reflect.Method.invoke(Native Method)
at com.ibm.websphere.client.applicationclient.launchClient.createContai
erAndLaunchApp(launchClient.java:616)
at com.ibm.websphere.client.applicationclient.launchClient.main(launchC
ient.java:420)
at java.lang.reflect.Method.invoke(Native Method)
at com.ibm.ws.bootstrap.WSLauncher.main(WSLauncher.java:94)
please help me to sort out this issue
regards
(kumar)