This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes ejb3.proxy erro Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "ejb3.proxy erro" Watch "ejb3.proxy erro" New topic
Author

ejb3.proxy erro

nitin pokhriyal
Ranch Hand

Joined: May 19, 2005
Posts: 263
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)
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 9953
    
161

Do you have jbossall-client.jar in the classpath of your client application which is doing the lookup? You can find that jar in %JBOSS_HOME%\client folder.


[My Blog] [JavaRanch Journal]
nitin pokhriyal
Ranch Hand

Joined: May 19, 2005
Posts: 263
Yes. i do have that file in my classpath.
nitin pokhriyal
Ranch Hand

Joined: May 19, 2005
Posts: 263
I am able to resolve this issue. I am not sure how but i tried almost same code in my laptp and it worked. It looks a like some jar file issue of jbossall-client.
 
 
subject: ejb3.proxy erro
 
Similar Threads
Failed to create EJB home interface when accessing from JMX
JMX in JBoss
Getting javax.naming.CommunicationException Using Jboss 4.0.5
javax.naming.NameNotFoundException
unable to call bean from jboss server!!! HELP NEEDED!!