I have included ujc.jar in my classpath and I am using IBM's jdk too..but still i am getting the error
java.lang.ClassCastException: com.ibm.rmi.iiop.CDRInputStream$1
My client code is as follows
.............
try {
System.out.println("1");
Properties properties = new Properties();
System.out.println("2");
properties.put(javax.naming.Context.PROVIDER_URL,"iiop://localhost:900");
properties.put(javax.naming.Context.INITIAL_CONTEXT_FACTORY,"com.ibm.ejs.ns.jndi.CNInitialContextFactory");
System.out.println("3");
System.out.println(properties.get(javax.naming.Context.PROVIDER_URL));
System.out.println(properties.get(javax.naming.Context.INITIAL_CONTEXT_FACTORY));
Context ctx = new InitialContext(properties);
System.out.println("4");
TestEnvHome home = (TestEnvHome)ctx.lookup("TestEnvHome") ;
System.out.println("5");
if (home == null)
{
System.out.println("no Home");
}
else
{
System.out.println("Got Home");
}
System.out.println("6");
TestEnv
test = home.create();
................
The output I get is
1
2
3
iiop://localhost:900 com.ibm.ejs.ns.jndi.CNInitialContextFactory
4
generalExceptionjava.lang.ClassCastException: com.ibm.rmi.iiop.CDRInputStream$1
Any pointers?
[This message has been edited by Jansi (edited June 25, 2001).]
[This message has been edited by Jansi (edited June 25, 2001).]