clerezza-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rupert Westenthaler <>
Subject Clerezza/Jena SPARQL initialization fails due to a SecurityException
Date Tue, 17 Dec 2013 08:35:17 GMT
Hi Clerezza & Stanbol Community

This morning I looked into the last two integration tests failing in
the trunk version. One of those was related to the SPARQL endpoint of
the Stanbol Enhancer that allows to perform SPARQL queries on the
Enhancer configuration.

First I throughout this was caused by some classpath problems related
to Xerces in the Jena TDB bundle as I was getting

    Caused by: java.lang.NoClassDefFoundError: Could not initialize
class com.hp.hpl.jena.sparql.expr.NodeValue
        at com.hp.hpl.jena.sparql.expr.ExprVar.eval(
        at org.apache.clerezza.rdf.jena.sparql.ResultSetWrapper.<init>(
        at org.apache.clerezza.rdf.jena.sparql.JenaSparqlEngine.execute(
        at org.apache.stanbol.enhancer.jersey.resource.EnhancerRootResource$EnhancerResource.sparql(

However when you restart Stanbol so that this error appears the first
time you can see a completely different stack trace:

    Caused by: org.glassfish.jersey.server.ContainerException:
        at org.glassfish.jersey.servlet.internal.ResponseWriter.rethrow(
    Caused by: java.lang.ExceptionInInitializerError
        at com.hp.hpl.jena.sparql.expr.ExprVar.eval(
    Caused by: access denied
        at java.lang.SecurityManager.checkPermission(
        at java.lang.SecurityManager.checkRead(
        at com.hp.hpl.jena.sparql.expr.NodeValue.getDatatypeFactory(
        at com.hp.hpl.jena.sparql.expr.NodeValue.<clinit>(

Based on that it is clearly caused by a missing permission or privileged block.

In Stanbol I can fix this by adding such a privileged block over the
call to the Clerezza query engine, but this should clearly be fixed in
the actual implementation of Clerezza.

In Stanbol this is the actual cause for STANBOL-1188, but this might
also need an Issue for Clerezza.


| Rupert Westenthaler   
| Bodenlehenstra├če 11                             ++43-699-11108907
| A-5500 Bischofshofen

View raw message