You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@xml.apache.org by ashish ranjan <ar...@cs.fiu.edu> on 2001/12/27 02:21:28 UTC

Please help, applet security exception

Hi all,
       I downloaded everything required to make apache client for a web
service. I am using "xerces" which is a JAXP compatible xml parser.

I developed a standalone application and it is working fine but when i
test an applet with same functionality something goes wrong.

When my applet is loaded it gives an exception given below

How does the program know about the xml parser i am using?
Where is it registered???
The Xmlparserutil is not able to find the xml parser it seems!!


Please......Help!!!!

om.ms.security.SecurityExceptionEx[soipapplet.start]: cannot access file
C:\WINNT\Java\lib\jaxp.properties
	at com/ms/security/permissions/FileIOPermission.check
	at com/ms/security/PolicyEngine.deepCheck
	at com/ms/security/PolicyEngine.checkPermission
	at com/ms/security/StandardSJcurityManager.chk
	at com/ms/security/StandardSecurityManager.checkRead
	tt java/io/File.exists
	at javax/xml/parsers/FactoryFinder.find
	at javax/xml/parsers/DocumentBuilderFactory.newInstance
/at org/apache/soap/util/xml/XMLParserUtils.refreshDocumentBuilderFactory
	at org/apache/soap/util/xml/XMLParserUtils.<clinit>
	at org/apache/soap/util/xml/XMLParserUtils.getXMLDocBuilder
	at org/apache/soap/rpc/Call.<init>
	at org/apache/soap/rpc/Call.<init>
	at org/apache/soap/rpc/Call.<init>
	at soapapplet.start
	at com/ms/applet/AppletPanel.securedCall0
	at com/ms/applet/AppletPanel.securedCall
	at com/ms/applet/AppletPanel.processSentEvent
	at com/ms/applet/AppletPanel.run
	at java/lang/Thread.run


RE: Please help, applet security exception

Posted by Robert Finneran <ro...@digitalskyscrapers.com>.
It sound to me like a usual applet security issue. Applets do not ordinarly
have access to files on the user's machine. To allow access would leave your
machine open to attack by malicous code downloaded from the Internet. If you
really want to allow file access via a servlet, here is a snipit from the
README.txt file located in the JAVA_HOME/demo/sound directory. Although this
is for the sound API's, it should give you the idea. Again, I don't
recommend accessing files via applets.

---- snip ----
When running the Java Sound demo as an applet these permissions
are necessary in order to load/save files and record audio :

grant {
  permission java.io.FilePermission "<<ALL FILES>>", "read, write";
  permission javax.sound.sampled.AudioPermission "record";
  permission java.util.PropertyPermission "user.dir", "read";
};

The permissions need to be added to the .java.policy file.
---- snip ----

You can however create a signed applet that will be allowed more access when
the user accepts it's download and intallation as a trusted applet.

Cheers!

-----Original Message-----
From: ashish ranjan [mailto:aranja01@cs.fiu.edu]
Sent: Wednesday, December 26, 2001 5:21 PM
To: soap-user@xml.apache.org
Subject: Please help, applet security exception


Hi all,
       I downloaded everything required to make apache client for a web
service. I am using "xerces" which is a JAXP compatible xml parser.

I developed a standalone application and it is working fine but when i
test an applet with same functionality something goes wrong.

When my applet is loaded it gives an exception given below

How does the program know about the xml parser i am using?
Where is it registered???
The Xmlparserutil is not able to find the xml parser it seems!!


Please......Help!!!!

om.ms.security.SecurityExceptionEx[soipapplet.start]: cannot access file
C:\WINNT\Java\lib\jaxp.properties
	at com/ms/security/permissions/FileIOPermission.check
	at com/ms/security/PolicyEngine.deepCheck
	at com/ms/security/PolicyEngine.checkPermission
	at com/ms/security/StandardSJcurityManager.chk
	at com/ms/security/StandardSecurityManager.checkRead
	tt java/io/File.exists
	at javax/xml/parsers/FactoryFinder.find
	at javax/xml/parsers/DocumentBuilderFactory.newInstance
/at org/apache/soap/util/xml/XMLParserUtils.refreshDocumentBuilderFactory
	at org/apache/soap/util/xml/XMLParserUtils.<clinit>
	at org/apache/soap/util/xml/XMLParserUtils.getXMLDocBuilder
	at org/apache/soap/rpc/Call.<init>
	at org/apache/soap/rpc/Call.<init>
	at org/apache/soap/rpc/Call.<init>
	at soapapplet.start
	at com/ms/applet/AppletPanel.securedCall0
	at com/ms/applet/AppletPanel.securedCall
	at com/ms/applet/AppletPanel.processSentEvent
	at com/ms/applet/AppletPanel.run
	at java/lang/Thread.run



RE: Please help, applet security exception

Posted by Robert Finneran <ro...@digitalskyscrapers.com>.
It sound to me like a usual applet security issue. Applets do not ordinarly
have access to files on the user's machine. To allow access would leave your
machine open to attack by malicous code downloaded from the Internet. If you
really want to allow file access via a servlet, here is a snipit from the
README.txt file located in the JAVA_HOME/demo/sound directory. Although this
is for the sound API's, it should give you the idea. Again, I don't
recommend accessing files via applets.

---- snip ----
When running the Java Sound demo as an applet these permissions
are necessary in order to load/save files and record audio :

grant {
  permission java.io.FilePermission "<<ALL FILES>>", "read, write";
  permission javax.sound.sampled.AudioPermission "record";
  permission java.util.PropertyPermission "user.dir", "read";
};

The permissions need to be added to the .java.policy file.
---- snip ----

You can however create a signed applet that will be allowed more access when
the user accepts it's download and intallation as a trusted applet.

Cheers!

-----Original Message-----
From: ashish ranjan [mailto:aranja01@cs.fiu.edu]
Sent: Wednesday, December 26, 2001 5:21 PM
To: soap-user@xml.apache.org
Subject: Please help, applet security exception


Hi all,
       I downloaded everything required to make apache client for a web
service. I am using "xerces" which is a JAXP compatible xml parser.

I developed a standalone application and it is working fine but when i
test an applet with same functionality something goes wrong.

When my applet is loaded it gives an exception given below

How does the program know about the xml parser i am using?
Where is it registered???
The Xmlparserutil is not able to find the xml parser it seems!!


Please......Help!!!!

om.ms.security.SecurityExceptionEx[soipapplet.start]: cannot access file
C:\WINNT\Java\lib\jaxp.properties
	at com/ms/security/permissions/FileIOPermission.check
	at com/ms/security/PolicyEngine.deepCheck
	at com/ms/security/PolicyEngine.checkPermission
	at com/ms/security/StandardSJcurityManager.chk
	at com/ms/security/StandardSecurityManager.checkRead
	tt java/io/File.exists
	at javax/xml/parsers/FactoryFinder.find
	at javax/xml/parsers/DocumentBuilderFactory.newInstance
/at org/apache/soap/util/xml/XMLParserUtils.refreshDocumentBuilderFactory
	at org/apache/soap/util/xml/XMLParserUtils.<clinit>
	at org/apache/soap/util/xml/XMLParserUtils.getXMLDocBuilder
	at org/apache/soap/rpc/Call.<init>
	at org/apache/soap/rpc/Call.<init>
	at org/apache/soap/rpc/Call.<init>
	at soapapplet.start
	at com/ms/applet/AppletPanel.securedCall0
	at com/ms/applet/AppletPanel.securedCall
	at com/ms/applet/AppletPanel.processSentEvent
	at com/ms/applet/AppletPanel.run
	at java/lang/Thread.run