• 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

Error: uncaught exception: [Exception... "Access to restricted URI denied" code: "1012" nsresult: "

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We have created reports through Jasper Reports and created a file called x.html file.

In local sytem if I specify the file system path like D:\example\...

It is working fine.But,when it deploy it in server it is not taking the path of that file which is automatically created.

Giving some exception like
Error: uncaught exception: [Exception... "Access to restricted URI denied" code: "1012" nsresult: "0x805303f4 (NS_ERROR_DOM_BAD_URI)"

Thanks in Advance,
Sowjanya.V.R

 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't know anything about Jasper Reports, but I do know that accessing files (via http) outside of the web app's directory is not allowed.

In local sytem if I specify the file system path like D:\example\...

It is working fine.But,when it deploy it in server it is not taking the path of that file which is automatically created.


Huh? I don't understand this at all. The text is too vague, please be more specific: exactly where is the file located, and exactly what path/URL was used to access it.
 
Sowjanya Venkiteela
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In local sytem if I specify the file system path like D:\example\... -->in the system where I am working in eclipse it is fine

But when I place the file in server machine(remote machine) it is not taking that path.it is giving below exception.

Exception... "Access to restricted URI denied" code: "1012" nsresult:..
 
Ranch Hand
Posts: 1179
Mac OS X Eclipse IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does drive D:\ exist on the server ??

Maybe there is a file security policy on the server ??

Why do you need to hard code the path ?? (it is not allowed to have hard coded file paths in a JavaEE Application - you need to refer to files relative to your Application)
 
Sowjanya Venkiteela
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes,we are trying to do the same.Referring to files relative to your Application.

For this,In servlets we can do this from servletContext.geResource()

But,it is failing in portlets(JSR 168)

our issue how to do this in portlets.

Thanks in Advance,
Sowjanya.
 
Peter Johnson
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Wonderful. I ask for "exactly where is the file located, and exactly what path/URL was used to access it." and you repeat that the file is in d:\example\...
A lot of good that does! Do you want help or not? Once you provide the information requested I will consider helping you. It is impossible for me to help someone when I do not have all of the facts. Until you supply the facts the most I can tell you is to fix your code and it will work.

TellTheDetails
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic