• 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

Security Exception After Moving RMI Server Jar

 
Ranch Hand
Posts: 99
Postgres Database Flex Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am hoping someone can help me figure out how to get my RMI objects running again.

We have a current production system that uses ColdFusion as a controller with RMI serving up objects. The RMI sever Jar was deployed under %java%/jre6/lib/ext directory. When deployed there (with a security file) the RMI server started up and served objects for many months with no complaints.

Now we are migrating away from CF and to Tomcat with no RMI but the same jar files. We were getting exceptions in the code as the Tomcat implementation will not look at the war file for the jar in question. The reason is that the jar file in question was in the ext directory and Java loads those classes first. So, when Tomcat goes looking for classes, it finds the ext classes. That's not right.

I have to have both implementations running. The old one using RMI is in production today. The new one using Tomcat and no RMI is what we hope to replace the production system with once we're done testing. So, to solve this, I moved the jar file for the production system from ext to a new directory I created "deployed_rmi_apps". I modified the security files, start RMI and then start the server. But, when I start the server, I get access errors. Here is how I am starting:



For the security file, it looks like this:



But, when I execute the java commands, the system throws an error once the server gets to "registry.rebind(name,stub)" where name is my server name and stub is UnicastRemoteObject. This was not a problem - everything ran fine - when the jar was in the ext directory. Now all the sudden it does not care what my policy file says. It simply denies me with the following:


FaceBookServer line 789 is the rebind call.

Does anyone know how to solve this? I've tried many things in the policy file and in the startup commands, all to no avail.

Best,
Al
 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
For what it's worth, here's the security policy file for the RMI server running where I work:
 
Al Johnston
Ranch Hand
Posts: 99
Postgres Database Flex Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yep. That did it. Just took out the codebase path and it fired right up. Thanks!
reply
    Bookmark Topic Watch Topic
  • New Topic