Win a copy of Microservices Testing (Live Project) this week in the Spring forum!
  • 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
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

Help : using RMI with Tomcat

 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
I am using Tomact 4.1.29. My application needs to connect remote machines on which RMI server is running.
I am getting AccessControlException while connecting to remote machine.
Can some guide me what changes I need to do in catalina.policy file and/or any other file ?
Thanks,
Sachin
 
Sachin Joshi
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Sachya Joshi:
Hi
I am using Tomact 4.1.29. My application needs to connect remote machines on which RMI server is running.
I am getting AccessControlException while connecting to remote machine.
Can some guide me what changes I need to do in catalina.policy file and/or any other file ?
Thanks,
Sachin



Hi,
I got my problem solved.
No reply from group this time, anyways...
sachin
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Now you really ought to tell us how you solved the problem so that if somebody else has a similar problem they can find the answer in the archives.
Bill
 
Sachin Joshi
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by William Brogden:
Now you really ought to tell us how you solved the problem so that if somebody else has a similar problem they can find the answer in the archives.
Bill


Hello Bill,
I need to update my catalina.policy file for this and also need to run the tomcat with "-security" option. Now when you run the tomcat with security option, then even you need to specify permissions for your DbDriver classes. Following are the changes -->
Changes Required :
a. add "-security" option to the start tomcat command in "startup.bat" file. Like this,
"call "%EXECUTABLE%" start -security %CMD_LINE_ARGS%"

b.Update "conf/catalina.policy" file for the permissions you want to give for certain classes in contexts. Like this,
b1 >
grant codeBase "file:${catalina.home}/webapps/RmiRprt/WEB-INF/classes/-" {
permission java.security.AllPermission "", "";
};

b2> Also, in this case you have to add CONNECT permission for your Db Server Drivers classes. Like this,
grant codeBase "file:C:/Sachin/OtherJars/classes12.zip" {
permission java.net.SocketPermission "133.197.189.93:1521", "connect";
};

c. Also, modify "catalina.bat" file. Set CATALINA_OPTS variablefor security related logs. Like this,

set CATALINA_OPTS=%CATALINA_OPTS% -Djava.security.debug=access,failure

By the way, My tomcat version is 4.1.29.
I hope this would help anybody with same problem.
Thanks,
Sachin
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic