Bug 47738 - access denied error when viewing SVG files
Summary: access denied error when viewing SVG files
Status: NEW
Alias: None
Product: Batik - Now in Jira
Classification: Unclassified
Component: SVG Viewer (show other bugs)
Version: 1.7
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: Batik Developer's Mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-25 23:17 UTC by Andrew Screen
Modified: 2010-02-17 04:28 UTC (History)
0 users



Attachments
SVG Browser Policy (3.51 KB, application/octet-stream)
2009-08-26 16:24 UTC, Andrew Screen
Details
script file that is uesd for running the svg viewer (2.09 KB, application/octet-stream)
2009-08-26 16:26 UTC, Andrew Screen
Details
creation of Home directory (29.50 KB, application/octet-stream)
2010-02-17 04:09 UTC, Andrew Screen
Details
preferences file (324 bytes, text/plain)
2010-02-17 04:28 UTC, Andrew Screen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Screen 2009-08-25 23:17:55 UTC
Since upgrading to XP i'm recieving the following error when utilising the batik libaries.  Previously i was on Windows 2000.  PC has Java 1.6.0_13-b03 installed.  Previously i believe it was java 1.3 on the windows 2000 platform??

PC has windows service pack 3 installed

My account has read & execute permissions on the files.

SVG Vier Error:

access denied (java.io.FilePermission \S:\EIR Libraries\batik-squiggle.jar read)

with detail:
Java.security.AccessControlException: access denied (java.io.FilePermission \S:\EIR Libraries\batik-squiggle.jar read)
	at java.security.AccessControlContext.checkPermission(Unknown Source)
	at java.security.AccessController.checkPermission(Unknown Source)
	at java.lang.SecurityManager.checkPermission(Unknown Source)
	at java.lang.SecurityManager.checkRead(Unknown Source)
	at sun.net.www.protocol.jar.JarFileFactory.getCachedJarFile(Unknown Source)
	at sun.net.www.protocol.jar.JarFileFactory.get(Unknown Source)
	at sun.net.www.protocol.jar.JarURLConnection.connect(Unknown Source)
	at sun.net.www.protocol.jar.JarURLConnection.getInputStream(Unknown Source)
	at org.apache.batik.util.ParsedURLData.openStreamInternal(ParsedURLData.java:547)
	at org.apache.batik.util.ParsedURLData.openStream(ParsedURLData.java:471)
	at org.apache.batik.util.ParsedURL.openStream(ParsedURL.java:417)
	at org.apache.batik.dom.svg.SAXSVGDocumentFactory.createDocument(SAXSVGDocumentFactory.java:158)
	at org.apache.batik.dom.svg.SAXSVGDocumentFactory.createSVGDocument(SAXSVGDocumentFactory.java:124)
	at org.apache.batik.bridge.DocumentLoader.loadDocument(DocumentLoader.java:106)
	at org.apache.batik.swing.svg.SVGDocumentLoader.run(SVGDocumentLoader.java:84)
Comment 1 Helder Magalhães 2009-08-26 01:33:01 UTC
(In reply to comment #0)
> Since upgrading to XP [...] PC has Java 1.6.0_13-b03 installed.
[...]
> PC has windows service pack 3 installed

My usual environment is similar to this one and everything works as expected.

> access denied (java.io.FilePermission \S:\EIR Libraries\batik-squiggle.jar
> read)

Are you sure about that left slash before the drive letter? That seems invalid. Also, embedded spaces in paths are a known cause for issues. Please add double quotes when using those.

Try "S:\EIR Libraries\batik-squiggle.jar" instead and, if this works, please report back and/or mark this issue accordingly (I'd suggest closing as invalid). If it doesn't work, please provide more information on how you are executing Squiggle (command line or shortcut used to run it), if you have administrative privileges, etc.

Another tip: My shortcut to start Squiggle (Batik 1.7) is something like:
 * Target: %windir%\system32\javaw.exe -jar batik-squiggle.jar
 * Start in: "%ProgramFiles%\batik-1.7"
Note the double quotes in the path as embedded spaces are used (I've deployed it into program files directory, which usually contains spaces (in my case, the variable will expand to "C:\Program Files").
Comment 2 Andrew Screen 2009-08-26 16:24:18 UTC
Created attachment 24173 [details]
SVG Browser Policy

note sure where this comes from but i assume it part of the batik libaries??
Comment 3 Andrew Screen 2009-08-26 16:26:33 UTC
Created attachment 24174 [details]
script file that is uesd for running the svg viewer
Comment 4 Andrew Screen 2009-08-26 16:32:28 UTC
in reply to Helder's comments.  

I'm not sure where the \ at the front is comming from, it just appears. i'm executing in a script as follows :

 commandtoRun = "C:\\new/batik/batik-squiggle.jar" ;

  commandParams = "http://enet.agl.com.au/Business%20Teams/IT/System%20Architect/" + svgfile ;

  oShell.ShellExecute(commandtoRun,commandParams);

Note the production implementation has the libaries on a shared network drive.  I've moved the libaries onto my desktop as i thought it may be something to do with permissions.  In this case the slash still appears.  I don't have adminstrative privellges on my pc.  I'll see if i can get someone to log on with these privilages to see if it make a difference! I suspect it is something to do with our environment but it's determining what that is which is proving difficult!

Note the error i get is the same if i just run the jar file so i don't think it's to do with the scripting.  
i.e. access denied (java.io.FilePermission \C:\new\batik\batik-squiggle.jar read)

i've attached a policy file  that i've noticed on my desktop which i assume is created as part of the batik deployment??  Also i've attached the script file that is in use for viewing the svg files!

Regards,

Andrew
Comment 5 Andrew Screen 2010-02-17 04:09:51 UTC
Created attachment 25005 [details]
creation of Home directory

showing setup of home directory
Comment 6 Andrew Screen 2010-02-17 04:13:31 UTC
We have performed moe testing to narrow down what the issue is and we have determined that if the Home direcoty is setup using the window OOTB functionality (see attachment) the libaries don't work.  If i manually map the directory the libaries work.  I've noticed that when it works both the policy document and the XML preferences document is creatred in the My document/.batik dir.  When it doesn't only the policy document is created?
Comment 7 Andrew Screen 2010-02-17 04:28:01 UTC
Created attachment 25006 [details]
preferences file

preferences document created. (i had to change to .txt extentions to be able to upload it.  it's actually a XML file!  Note this is found in the c:\documents & setting\A348802A directory not the My Document directory as indicated in the comment just added. The "My Documents" directory on our setup is actually linked to a virtual directory on another server but sync'd with the  c:\documents & setting\A348802A directory.  Could the batik libaries be getting confused as to where these files are being placed or something like that?