Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: access denied (java.io.FilePermission "report.jrxml" read)

  1. #1
    Junior Member
    Join Date
    Jul 2011
    Posts
    29
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Default access denied (java.io.FilePermission "report.jrxml" read)

    I am having trouple opening a report developed in iReport. I have done some searching on this and havent found anything that has helped. I get the following error message when I try to run the report.

    "java.security.AccessControlException: access denied (java.io.FilePermission C:\Users\banny7\sched\Report.jrxml read)
    at java.security.AccessControlContext.checkPermission (AccessControlContext.java:374)
    at java.security.AccessController.checkPermission(Acc essController.java:546)"

    The wired thing is that when the application is on the dev server it works but when I move it over to the production server. I get the error message. Both servers are using Tomcat 7.0. The second line of code below is what trigers java to read the .jrxml file. The file is not a read-only file and is in a directory that is create by the application at start up.


     
    JasperDesign jasperDesign = JRXmlLoader.load("C:\Users\banny7\sched\Report.jrxml");
     
    JasperReport jasperReport = JasperCompileManager.compileReport(jasperDesign);

    Any help would be appreciated


  2. #2
    Super Moderator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,235
    Thanks
    176
    Thanked 817 Times in 760 Posts
    Blog Entries
    5

    Default Re: access denied (java.io.FilePermission "report.jrxml" read)

    Does the application trying to read the report have permission to read files within that directory? Is the directory structure and user permission set up the same on the test and production server?

  3. #3
    Junior Member
    Join Date
    Jul 2011
    Posts
    29
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Default Re: access denied (java.io.FilePermission "report.jrxml" read)

    Yes they are set up the same. But I discovered later it has to do with the permissions on my computer and one other users computer. Other users can view the report. We think it has to do with the iText jar that goes with iReports.

Similar Threads

  1. Replies: 7
    Last Post: August 13th, 2011, 01:22 AM
  2. JFileChooser save dialog box "access is denied" error
    By byrdman in forum What's Wrong With My Code?
    Replies: 7
    Last Post: August 2nd, 2011, 01:45 PM
  3. Replies: 6
    Last Post: November 12th, 2010, 03:40 AM
  4. Java says:"Hello World". I say:"It works!"
    By Davidovic in forum Member Introductions
    Replies: 4
    Last Post: June 29th, 2010, 07:13 AM
  5. "java.lang.NoSuchMethodError: main" and "fatal exception occured."
    By joachim89 in forum What's Wrong With My Code?
    Replies: 2
    Last Post: January 10th, 2010, 07:35 AM