GeeCON Prague 2014*
The moose likes Servlets and the fly likes Policy problem? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Servlets
Bookmark "Policy problem?" Watch "Policy problem?" New topic
Author

Policy problem?

Andreas Bystrom
Ranch Hand

Joined: Mar 05, 2003
Posts: 32
When I try to use RMI from a servlet I get this exception:
java.net.SocketException: Software caused connection abort: socket write error

I think that it can have somethign to do with policys. I have 2 jar files that my application uses that in turn uses two jar files that does stuff over RMI. These jar-files are located in {catalina.home}/common/lib/. This jar files also has a properties file that it uses. This file is located in myapp/WEB-INF/classes/file.conf

Do I need to set any policys for this application? I use tomcat 5.0.25 on an XP machine.

I use a network sniffer "ethereal" to look at what is really sent. What I can see is a exception that looks something like this:
"access denied to classloader ... java.security.AccessControlException ... access denied java.io.FilePermission /C:/java/jakarta-tomcat-5.0.25/webapps/myapp//WEB-INF/classes/- read". This exception is sent from the RMI server to the application computer.

Anyone have an ide of what I have missed?

// Andreas
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12792
    
    5
Sure looks to me like you have to set a policy for that application.
Be aware that at least one version of Tomcat 5 had a really strange bug related to application of a policy to an application using RMI - I finally dropped back to Tomcat 4.
Bill
 
GeeCON Prague 2014
 
subject: Policy problem?