• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Help : using RMI with Tomcat

 
Sachin Joshi
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • 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
  • 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
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13071
6
  • Mark post as helpful
  • send pies
  • 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
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic