The classes that are in the stack trace don't explicitly invoke the
SecurityManager. They just seem to do ordinary stuff. I have a few
questions:
1. Does your JNLP file specify an application-desc element? If possible,
can you send your JNLP file?
2. Does your security element specify <all-permissions/>?
3. Does your Xalan application run okay from the command line (ie not in
the Web Start environment)?
4. If you add the following to one of your initial classes:
System.err.println("SecurityManager = " +
System.getSecurityManager());
what does it show?
This seems more like a JNLP problem than a Xalan problem but I confess that
I am no JNLP guru. However, depending on the answers to the above
questions, it seems like you are not getting the Web Start to launch in the
application environment but just in an applet-type sandbox environment.
Please let me know the answers to the above questions and I will try to help
from there.
Gary
> -----Original Message-----
> From: Guy McArthur [mailto:[EMAIL PROTECTED]
> Sent: Friday, August 19, 2005 10:14 AM
> To: [email protected]
> Subject: security exception when in web start
>
> Greetings, I've having trouble debugging a peculiar issue.
>
> I'm developing a Java Web Start application that makes
> extensive use of
> XSLT. My XSL templates are packaged in a Jar file with the
> application.
> I'm testing with Java 1.5.0_04, though the app should work in
> Java 1.4
> and higher. All the Jars distributed with the application are signed,
> and the JNLP specifies to give the application all permissions.
>
> So far, so good. However, when performing a particular XSL transform
> (which happens to be particularly large), I get a security
> exception. Is
> there a workaround? The exception is:
>
> com.sun.org.apache.xalan.internal.xsltc.TransletException:
> java.security.AccessControlException: access denied
> (java.io.FilePermission C:\Documents and Settings\guym\Application
> Data\Sun\Java\Deployment\cache\javaws\http\Dgrs.lpl.arizona.ed
> u\P80\DMgrs2001\DMsw\DMpds\RMarchiver.jar
> read)
>
> All my transforms are done like this:
>
> URL xsl = getClass().getResource(template);
>
> InputStream is = xsl.openStream();
> Source source = new StreamSource(is, xsl.toExternalForm());
> TransformerFactory factory =
> TransformerFactory.newInstance();
> Transformer trans = factory.newTransformer(source);
> trans.transform(new DOMSource(document), new
> StreamResult(output));
>
> Here is the stack trace:
>
> RROR: 'java.security.AccessControlException: access denied
> (java.io.FilePermission C:\Documents and Settings\guym\Application
> Data\Sun\Java\Deployment\cache\javaws\http\Dgrs.lpl.arizona.ed
> u\P80\DMgrs2001\DMsw\DMpds\RMarchiver.jar
> read)'
> javax.xml.transform.TransformerException:
> com.sun.org.apache.xalan.internal.xsltc.TransletException:
> java.security.AccessControlException: access denied
> (java.io.FilePermission C:\Documents and Settings\guym\Application
> Data\Sun\Java\Deployment\cache\javaws\http\Dgrs.lpl.arizona.ed
> u\P80\DMgrs2001\DMsw\DMpds\RMarchiver.jar
> read)
> at
> com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.t
> ransform(Unknown
> Source)
> at
> com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.t
> ransform(Unknown
> Source)
> at grs.apps.pdsdriver.PdsArchiver.label(PdsArchiver.java:388)
> at grs.apps.pdsdriver.EdrArchiver.archive(EdrArchiver.java:591)
> at grs.apps.pdsdriver.PdsArchiverApp$5.run(PdsArchiverApp.java:236)
> Caused by: com.sun.org.apache.xalan.internal.xsltc.TransletException:
> java.security.AccessControlException: access denied
> (java.io.FilePermission C:\Documents and Settings\guym\Application
> Data\Sun\Java\Deployment\cache\javaws\http\Dgrs.lpl.arizona.ed
> u\P80\DMgrs2001\DMsw\DMpds\RMarchiver.jar
> read)
> at
> com.sun.org.apache.xalan.internal.xsltc.dom.LoadDocument.docum
> entF(Unknown
> Source)
> at chan_data.template$dot$0()
> at chan_data.applyTemplates()
> at chan_data.applyTemplates()
> at chan_data.transform()
> at
> com.sun.org.apache.xalan.internal.xsltc.runtime.AbstractTransl
> et.transform(Unknown
> Source)
> ... 5 more
> ---------
> com.sun.org.apache.xalan.internal.xsltc.TransletException:
> java.security.AccessControlException: access denied
> (java.io.FilePermission C:\Documents and Settings\guym\Application
> Data\Sun\Java\Deployment\cache\javaws\http\Dgrs.lpl.arizona.ed
> u\P80\DMgrs2001\DMsw\DMpds\RMarchiver.jar
> read)
> at
> com.sun.org.apache.xalan.internal.xsltc.dom.LoadDocument.docum
> entF(Unknown
> Source)
> at chan_data.template$dot$0()
> at chan_data.applyTemplates()
> at chan_data.applyTemplates()
> at chan_data.transform()
> at
> com.sun.org.apache.xalan.internal.xsltc.runtime.AbstractTransl
> et.transform(Unknown
> Source)
> at
> com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.t
> ransform(Unknown
> Source)
> at
> com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.t
> ransform(Unknown
> Source)
> at grs.apps.pdsdriver.PdsArchiver.label(PdsArchiver.java:388)
> at grs.apps.pdsdriver.EdrArchiver.archive(EdrArchiver.java:591)
> at grs.apps.pdsdriver.PdsArchiverApp$5.run(PdsArchiverApp.java:236)
>
>
>