• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

ejb3.proxy erro

 
Ranch Hand
Posts: 263
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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)
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
nitin pokhriyal
Ranch Hand
Posts: 263
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes. i do have that file in my classpath.
 
nitin pokhriyal
Ranch Hand
Posts: 263
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Look ma! I'm selling my stuff!
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic