clerezza-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andy Seaborne <>
Subject Re: Clerezza/Jena SPARQL initialization fails due to a SecurityException
Date Wed, 18 Dec 2013 11:16:31 GMT
Hi Rupert,

No - Jena does not do anything systematic about SecurityManagers etc. (I 
found one usage when getting system properties).

As a library, we have generally seen it as being for the environment to 
take care of that, each environment being slightly different with 
different needs ...  That maybe a bit simplistic a stance.  If there is 
anything that Jena can do to make it easier then do let us know.

I have put an exception catcher around that code in NodeValue so it 
least it tries to recover - it is just trying to get the XML datatype 
factory but that seems to get rather complicated with JAXP and external 
providers.  For Jena use, the now-required JRE javax one is fine.

Another area that comes up occassionally is JMX - ARQ keeps and provides 
JMX stats.  If JMX can't be started, it just ignores further requests.


On 17/12/13 20:04, Rupert Westenthaler wrote:
> Hi Andy,
> Does Jena support running with active SecurityManager? If this is the
> case you can wrap calls like that in a
>      AccessController.doPrivileged(
>          new PrivilegedAction<Object>(){
>             public Object run(){
>                 /* the privileged code*/
>                 return value; //or null if not needed
>             }
>          }
>         );
> If Jena is not concerned about a SecurityManager nothing need to be
> changed. In that case other calling it need to care. As Clerezza does
> care about this it should be done in the JenaSparqlEngine.
> For now I have fixed the issue in Stanbol by wrapping my call in an
> doPrivileged block as mentioned above.
> best
> Rupert
> On Tue, Dec 17, 2013 at 7:20 PM, Andy Seaborne <> wrote:
>> On 17/12/13 14:21, Sergio Fernández wrote:
>>> On 17/12/13 11:14, Andy Seaborne wrote:
>>>> Jena version? (Just so line numbers line up - the code hasn't changed in
>>>> a while around here.)
>>> Pretty old... Jena 2.6.5 from Clerezza 0.5-incubating.
>>> Andy, never mind, not a Jena issue, but a Clerezza one.
>> Works for me :-)
>> I'm still like to know what the right thing (tm) to get to XML datatype
>> factory is. We'll armour the code anyway but that's merely stopping the
>> exception propagating unhelpfully and attempt emergency repairs which may or
>> may not work.
>>          Andy

View raw message