Hi Guys,
Trying to deploy a simple "Hello WOrld EJB".
The error websphere is giving is
++++++++++++++++++++
Begin statelessSession DemoClient1...
java.lang.NoClassDefFoundError: com/ibm/rmi/iiop/GIOPVersionException
at com.ibm.CORBA.iiop.ConnectionTable.createConnection(ConnectionTable.java:142)
at com.ibm.CORBA.iiop.ConnectionTable.get(ConnectionTable.java:527)
at com.ibm.CORBA.iiop.ConnectionTable.get(ConnectionTable.java:413)
at com.ibm.CORBA.iiop.GIOPImpl.createRequest(GIOPImpl.java:152)
at com.ibm.CORBA.iiop.GIOPImpl.createRequest(GIOPImpl.java:133)
at com.ibm.CORBA.iiop.ClientDelegate.createRequest(ClientDelegate.java:1080)
at com.ibm.CORBA.iiop.InitialNamingClient.resolve(InitialNamingClient.java:372)
at com.ibm.CORBA.iiop.InitialNamingClient.resolve_initial_references(InitialNamingClient.java:551)
at com.ibm.CORBA.iiop.ORB.resolve_initial_references_remote(ORB.java:1926)
at com.ibm.ws.naming.util.WsnInitCtxFactory.mergeWsnNSProperties(WsnInitCtxFactory.java:592)
at com.ibm.ws.naming.util.WsnInitCtxFactory.getRootJndiContext(WsnInitCtxFactory.java:352)
at com.ibm.ws.naming.util.WsnInitCtxFactory.getInitialContextInternal(WsnInitCtxFactory.java:227)
at com.ibm.ws.naming.util.WsnInitCtx.getContext(WsnInitCtx.java:98)
at com.ibm.ws.naming.util.WsnInitCtx.<init>(WsnInitCtx.java:79)
at com.ibm.ws.naming.util.WsnInitCtxFactory.getInitialContext(WsnInitCtxFactory.java:135)
at com.ibm.websphere.naming.WsnInitialContextFactory.getInitialContext(WsnInitialContextFactory.java:80)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:669)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.InitialContext.<init>(InitialContext.java:199)
at com.ibm.DemoClient1.main(DemoClient1.java:29)
Exception in
thread "P=746378
=0:CT" ++++++++++++++++
Clent Code Is:
++++++++++++++++++++
package com.ibm;
import javax.rmi.*;
import javax.naming.*;
import java.util.*;
public class DemoClient1 {
public static void main(
String[] args) {
System.out.println("\nBegin statelessSession DemoClient1...\n");
try {
Properties p = new Properties();
//The JNDI properties you set depend
//on which server you are using.
//These properties are for the Remote Server.
p.setProperty(
"java.naming.factory.initial",
"com.ibm.websphere.naming.WsnInitialContextFactory");
p.setProperty("java.naming.provider.url", "IIOP://129.245.124.204:954");
//p.setProperty("java.naming.security.principal", "myuser");
//p.setProperty("java.naming.security.credentials", "mypass");
//props.setProperty("java.naming.factory.initial","com.ibm.websphere.naming.WsnInitialContextFactory");
//props.setProperty("java.naming.provider.url",TEST_URL);
//Now use those properties to create
//a JNDI InitialContext with the server.
javax.naming.InitialContext ctx = new javax.naming.InitialContext(p);
//Lookup the bean using it's deployment id
Demo1Home dhome = (Demo1Home) ctx.lookup("ejb/com/ibm/Demo1Home");
//Be good and use RMI remote object narrowing
//as required by the
EJB specification.
//Demo1Home ejbHome = (Demo1Home) PortableRemoteObject.narrow(obj, Demo1.class);
Demo1 ejbObject = dhome.create();
// Demo demo = dhome.create();
//The part we've all been wainting for...
String message = ejbObject.demoSelect();
//A drum roll please.
System.out.println(message);
} catch (Exception e) {
e.printStackTrace();
}
}
}
++++++++++++++++++++
Please Help.
Thanks,
Navi
[ August 05, 2003: Message edited by: Navi Navi ]
[ August 05, 2003: Message edited by: Navi Navi ]
[ August 05, 2003: Message edited by: Navi Navi ]