[jdom-interest] Help! SAXParserFactory causing Securityexception in Microsoft Java VM

Jason Hunter jhunter at acm.org
Fri Jan 25 17:05:55 PST 2002


Alexander Hvostov wrote:
> 
> On Thu, 2002-01-10 at 14:02, Jake Latham wrote:
> > Hiya all, I'm really hoping you can offer me a hand with this problem.
> >
> > I'm having a problem with SAXParserFactory causing a security exception in
> > Microsoft Internet Explorer, using JDOM b7.
> >
> > here is the error string it spits out:
> >
> > String...com.ms.security.SecurityExceptionEx[javax/xml/parsers/SAXParserFact
> > ory.newInstance]: Unable to access system property:
> > javax.xml.parsers.SAXParserFactory
> >  at com/ms/security/permissions/PropertyPermission.check
> > (PropertyPermission.java)
> >  at com/ms/security/PolicyEngine.shallowCheck (PolicyEngine.java)
> >  at com/ms/security/PolicyEngine.checkCallersPermission (PolicyEngine.java)
> >  at com/ms/security/StandardSecurityManager.chk
> > (StandardSecurityManager.java)
> >  at com/ms/security/StandardSecurityManager.checkPropertyAccess
> > (StandardSecurityManager.java)
> >  at java/lang/System.getProperty (System.java)
> >  at javax/xml/parsers/SAXParserFactory.newInstance
> > (SAXParserFactory.java:139)
> >  at java/lang/reflect/Method.invoke (Method.java)
> >  at org/jdom/input/SAXBuilder.createParser (SAXBuilder.java)
> >  at org/jdom/input/SAXBuilder.build (SAXBuilder.java)
> >  at org/jdom/input/SAXBuilder.build (SAXBuilder.java)
> >  at aim/AIMPanel.parseXML (AIMPanel.java:673)
> >  at aim/AIMPanel.serverCall (AIMPanel.java:486)
> >  at aim/LogicalAIM.<init> (LogicalAIM.java:62)
> >  at aim/AIMPanel.customInitialize (AIMPanel.java:1595)
> >  at shout3d/Shout3DPanel.n (Shout3DPanel.java)
> >  at shout3d/Shout3DPanel.run (Shout3DPanel.java)
> >  at java/lang/Thread.run (Thread.java)
> >
> > Using Microsoft's 5.0.0.3802 VM, this error results in a NullPointer
> > Exception further down, causing the app to quit.
> >
> > in 5.0.0.3310, it reports the error but continues to run.
> >
> > in 5.0.0.3234, no errors are reported at all.
> >
> > Do you guys have any idea what's going on and why, and what I might be able
> > to do to correct this?
> >
> > Any help is greatly appreciated...
> 
> Shouldn't SAXParserFactory wrap system property accesses in try/catch
> blocks to catch these exceptions?
> 
> Regards,
> 
> Alex.

Well, what would we do with a caught security exception?  We catch some
exceptions in taht area, like a ClassNotFoundException so if JAXP
doesn't exist we can revert to the default parser.  I'm not sure a
security exception should be silently ignored while we choose the
default parser.  We could wrap it with a JDOMException but I don't see
much advantage here.  Do you have a specific idea, Alex?

-jh-



More information about the jdom-interest mailing list