• 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

CommunicationException when I do JNDI lookup

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, I'm using rmi-iiop, I did two jar and in one of them I put all the classes relationated with the client (Bean_Stub + BeanInterface) and in the other with the server stuff.
At the begining I used the ORB default that J2SE provides, and I had not problems with that... Start the ORB, Start the server(binding my bean) and on the client I did lookup and I got the Bean_Stup object. Basically a happy story...

But...
When I tried to use de Java Naming Service of JBoss I've gotten the sad exception "javax.naming.CommunicationException [Root exception is java.lang.ClassNotFoundException: adss.iiop.RemoteTestAgent (no security manager: RMI class loader disabled)]" with this Context configuration:

-Djava.naming.factory.initial=org.jnp.interfaces.NamingContextFactory -Djava.naming.provider.url=jnp://10.0.0.40:1099

Ok I said, is a problem with the security, so I tried with that:

-Djava.naming.factory.initial=org.jnp.interfaces.NamingContextFactory -Djava.naming.provider.url=jnp://10.0.0.40:1099
-Djava.security.manager
-Djava.security.policy="server.policy"

Uff another exception but in this case:
javax.naming.CommunicationException: Could not obtain connection to any of these urls: 10.0.0.40:1099 and discovery failed with error: java.security.AccessControlException: access denied (java.net.SocketPermission 230.0.0.4 connect,accept,resolve) [Root exception is javax.naming.CommunicationException: Failed to connect to server 10.0.0.40:1099 [Root exception is java.security.AccessControlException: access denied (java.net.SocketPermission 10.0.0.40:1099 connect,resolve)]]

Any idea?
 
reply
    Bookmark Topic Watch Topic
  • New Topic