K
Ken Kast
The following is a snippet from a method in an applet RSSTree:
private Document getOPMLFile(String OPMLFileName) {
Document OPMLFile = null;
try {
URL u = new URL(getCodeBase(), OPMLFileName);
try {
BufferedReader br = new BufferedReader(new
InputStreamReader(u.openStream()));
if (br != null) {
try {
Builder parser = new Builder();
OPMLFile = parser.build(br);
}
..
..
..
This method is called out of RSSTree.start(). Document & Builder are
classes in the open source XML processor com.nu.xom. I get the following
error when parser.build(br) is executed:
java.lang.ExceptionInInitializerError
at RSSTree.getOPMLFile(RSSTree.java:63)
at RSSTree.start(RSSTree.java:31)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.security.AccessControlException: access denied
(java.util.PropertyPermission
org.apache.xerces.xni.parser.XMLParserConfiguration write)
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.System.setProperty(Unknown Source)
at nu.xom.Builder.<clinit>(Unknown Source)
If I replace the bad line with a loop to read the the stream myself and
write out the lines, I get the XML I expect.
Without seeing the source for XOM can someone give me an idea as to why I
have an access problem when going through XOM but don't when the applet
reads directly?
Thanks.
Ken
private Document getOPMLFile(String OPMLFileName) {
Document OPMLFile = null;
try {
URL u = new URL(getCodeBase(), OPMLFileName);
try {
BufferedReader br = new BufferedReader(new
InputStreamReader(u.openStream()));
if (br != null) {
try {
Builder parser = new Builder();
OPMLFile = parser.build(br);
}
..
..
..
This method is called out of RSSTree.start(). Document & Builder are
classes in the open source XML processor com.nu.xom. I get the following
error when parser.build(br) is executed:
java.lang.ExceptionInInitializerError
at RSSTree.getOPMLFile(RSSTree.java:63)
at RSSTree.start(RSSTree.java:31)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.security.AccessControlException: access denied
(java.util.PropertyPermission
org.apache.xerces.xni.parser.XMLParserConfiguration write)
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.System.setProperty(Unknown Source)
at nu.xom.Builder.<clinit>(Unknown Source)
If I replace the bad line with a loop to read the the stream myself and
write out the lines, I get the XML I expect.
Without seeing the source for XOM can someone give me an idea as to why I
have an access problem when going through XOM but don't when the applet
reads directly?
Thanks.
Ken