• 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 ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

problem with ORACLE port when using with RMI

Ranch Hand
Posts: 220
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
WE are trying to invoke an application from ORACLE 9i using RMI we get an exception as

ERROR: java.security.AccessControlException: the Permission

(java.net.SocketPermission connect,resolve) has not been

granted to WEBX

The port 38766 is not being used by our application nor the RMI.RMI is using the port 1099. once permission is granted to this 38766 port,the application is working fine.
The same application,again if invoked some time later,it again comes up with a different Port and again throws the exception.

Could any one please help me out with this? why is that the oracle is randomly coming up with ports?? IS it some firewall problem? or is it that
oracle is creating random ports by itself as a security measure? if so how to overcome this port problem.

Its really urgent.thank you for your time.

Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Actually, port 38766 *is* being used by your application, and specifically the RMI portion. But I guess you gathered that already... the only question is why.

Port 1099 is only the port used by the RMI *Naming Server*. Your RMI server is assigned a different port to listen on.

In the default RMI implementation the port assigned to your server is basically a random port above 1024 which is available. You can get around this by either specifying a port number in the super() constructor in your server's constructor if you extend UnicastRemoteObject. if you don't extend UnicastRemoteObject and use the UnicastRemoteObject.export() method, use the one that specifies a port. Or you can build your own RmiSocketFactory and handle port assignment however you see fit - always assign specific ports to specific apps, use your own range of ports, etc.
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic