• 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

RMI problem when using Tomcat

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all!

I have a pice of java code that works fine when I'm just using it standalone. This application uses a RMI connection to another computer.

The problem comes when I add this code into a servlet and run it with tomcat (5.0.25). Now I get this exception when I try to send data to the remote computer.

java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.lang.ClassNotFoundException: access denied to class loader
Caused by: java.lang.ClassNotFoundException: access denied to class loader
Caused by: java.security.AccessControlException: access denied (java.io.FilePermission /C:/java/jaka
rta-tomcat-5.0.25/webapps/energis/WEB-INF/classes/- read)

Anyone have an idea of what I done wrong?

Regards,
// Andreas
 
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
I don't know if this is related but I had security policy problems when trying to get a servlet to talk to a JavaSpace with Tomcat 5.0.19 - backed up to Tomcat 4.1.30 and it worked.
Bill
 
Ranch Hand
Posts: 209
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Andreas,

William already mentioned that it has to do with the security policy your application uses. It looks like your web app has restricted permissions (eg, cannot access certain files)

Security policy is defined in the .policy files and can be passed as a parameter to the JVM at the start-up time (this is applicable to the standalone applications).

The default security policy used in the Tomcat is defined in the catalina.policy file that you will find in <tomcat_home>\conf folder. I suggest that you look into this file as it explains how to define security policy for a particular web application.

Hope it helps.
 
reply
    Bookmark Topic Watch Topic
  • New Topic