Thanks Thomas. I didn't know I could restrict the permission to only the
Batik jars (I have found an example of how to do this now). I think this
will address my concerns.

Cheers,
Vicki

--------------------------------------- 
Vicki Bell
Avenida Technologies Ltd
[EMAIL PROTECTED]
Tel: +44 (0)2476 430462
 

-----Original Message-----
From: Thomas E Deweese [mailto:[EMAIL PROTECTED]] 
Sent: 20 May 2002 12:32
To: Batik Users
Subject: J2EE AccessControlException using Batik transcoder

>>>>> "VB" == Vicki Bell <[EMAIL PROTECTED]> writes:

VB> I am trying to use the Batik transcoder from a web component
VB> deployed in the J2EE reference environment (version
VB> 1.3.1). However, when I attempt to transcode an SVG to a JPEG with
VB> size adjustment (see attached code fragment) I get the following
VB> AccessControlException from the J2EE container:
 
VB> java.security.AccessControlException: access denied
VB> (java.lang.RuntimePermission modifyThreadGroup) at

VB> java.lang.Thread.<init>(Thread.java:330) at

VB> org.apache.batik.util.SoftReferenceCache$1.<init>(Unknown Source)

VB> I believe I could get round this by modifying the J2EE
VB> server.policy file to grant permission to modifythreadgroup
VB> (haven't tried it yet).  Has anyone else encountered this
VB> problem? Anyone know of a way round it without compromising the
VB> security of the J2EE application in the real world?

    The problem is that we start some background threads to manage
some soft reference caches.  I can't think of a clean way to manage
these without the background threads.  I'm a bit surprised that J2EE
doesn't allow code to start threads as this is a really fundamental
tool of Java.

    Perhaps someone that knows more about J2EE can suggest how this
issue is normally delt with in J2EE applications.

    I don't know how well you know policy files but in case you didn't
know you can limit the ability to create threads to just the Batik
jars, which might help some with your security concerns.

    Good luck, and I hope this helps.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to