Do anybody has any idea how to get rid of this issue. i tried couple of things including google too but this problem seems to be forever.. thanks in advance
javax.naming.CommunicationException [Root exception is java.lang.ClassNotFoundException: org.jboss.ejb3.JBossProxy (no security manager: RMI class loader disabled)]
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:786)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
at javax.naming.InitialContext.lookup(Unknown Source)
at com.client.CalculatorClient.main(CalculatorClient.java:31)
Caused by: java.lang.ClassNotFoundException: org.jboss.ejb3.JBossProxy (no security manager: RMI class loader disabled)
at sun.rmi.server.LoaderHandler.loadProxyClass(Unknown Source)
at java.rmi.server.RMIClassLoader$2.loadProxyClass(Unknown Source)
at java.rmi.server.RMIClassLoader.loadProxyClass(Unknown Source)
at sun.rmi.server.MarshalInputStream.resolveProxyClass(Unknown Source)
at java.io.ObjectInputStream.readProxyDesc(Unknown Source)
at java.io.ObjectInputStream.readClassDesc(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.readObject(Unknown Source)
at java.rmi.MarshalledObject.get(Unknown Source)
at org.jnp.interfaces.MarshalledValuePair.get(MarshalledValuePair.java:72)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:710)
... 3 more
-----------------------------------client code-------------------
public static void main(
String[] args) {
try {
Context ctx=getInitialContext();
Object ref = ctx.lookup("Calculator/remote");
//Calculator obj = (Calculator)ref;
//Calculator obj=(Calculator)ctx.lookup(Calculator.class.getSimpleName()+"/remote");
//PortableRemoteObject.narrow(obj, Calculator.class);
//System.out.println(obj.add(1, 1));
} catch (NamingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
public static Context getInitialContext() throws NamingException{
Hashtable env=new Hashtable();
env.put("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory");
env.put("java.naming.factory.url.pkgs","=org.jboss.naming
rg.jnp.interfaces");
env.put("java.naming.provider.url","localhost");
return new InitialContext(env);
}
--------------------------JBOSS JNDI ENTRY-------------------------
+- Calculator (class: org.jnp.interfaces.NamingContext)
| +- remote (proxy: $Proxy63 implements interface com.pokhriyal.CalculatorRemote,interface org.jboss.ejb3.JBossProxy)