Return-Path: X-Original-To: apmail-clerezza-dev-archive@www.apache.org Delivered-To: apmail-clerezza-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 082321086E for ; Wed, 18 Dec 2013 11:17:12 +0000 (UTC) Received: (qmail 96710 invoked by uid 500); 18 Dec 2013 11:17:11 -0000 Delivered-To: apmail-clerezza-dev-archive@clerezza.apache.org Received: (qmail 96404 invoked by uid 500); 18 Dec 2013 11:17:08 -0000 Mailing-List: contact dev-help@clerezza.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@clerezza.apache.org Delivered-To: mailing list dev@clerezza.apache.org Received: (qmail 96372 invoked by uid 99); 18 Dec 2013 11:17:06 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Dec 2013 11:17:06 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of andy.seaborne.apache@gmail.com designates 74.125.83.43 as permitted sender) Received: from [74.125.83.43] (HELO mail-ee0-f43.google.com) (74.125.83.43) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Dec 2013 11:16:55 +0000 Received: by mail-ee0-f43.google.com with SMTP id c13so3449989eek.2 for ; Wed, 18 Dec 2013 03:16:35 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=PBFp5hhy20JaPAiN5hWCLE9SxIVWABpc9s3QXFBu308=; b=AJ7TIB/+rgDXalqNVpQyhFYVCe/5BcTfTu/OurRb/ZuRkZmjsnffD0v35uWWuIVpNV 6U014MoT+lQHgF7F/3HRTxGT9bf93UkfMAt+5kt6LB1MW1kTSBtiEoauLlyDye6jdUr/ 3+Lt4c/YA7lGeARqTJi/NUyQ0j9z1x+3Q7KJfui41nPtO1wU9tqJ4P4M3FmAxMJtMm8q b8twOOnzW5gFuBsAgXaJZb5Uh1smQjS3ofCe2BiiwKKM6m6w/cmBSfJs+pvGpfzqJXZZ QKBGfhPFc/UCItnPfuZHFgXKNpuDawv3uvlonrW87shM1YJsNpDCAPIWILCoaICoMWas gNrQ== X-Received: by 10.15.44.4 with SMTP id y4mr27907383eev.71.1387365395365; Wed, 18 Dec 2013 03:16:35 -0800 (PST) Received: from [192.168.1.63] (82-69-1-248.dsl.in-addr.zen.co.uk. [82.69.1.248]) by mx.google.com with ESMTPSA id e3sm61508487eeg.11.2013.12.18.03.16.33 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 18 Dec 2013 03:16:34 -0800 (PST) Message-ID: <52B1840F.9090609@apache.org> Date: Wed, 18 Dec 2013 11:16:31 +0000 From: Andy Seaborne User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: dev@clerezza.apache.org, dev@stanbol.apache.org Subject: Re: Clerezza/Jena SPARQL initialization fails due to a SecurityException References: <52B02410.2050003@apache.org> <52B05E04.7030402@salzburgresearch.at> <52B095FE.9070107@apache.org> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org 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. Andy 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(){ > 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 >> > > >