• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Sowjanya Venkiteela
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • 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

 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • 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
  • 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:..
 
Rene Larsen
Ranch Hand
Posts: 1179
Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • 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
  • 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
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic