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(ExprVar.java:65)
[..]
at
org.apache.clerezza.rdf.jena.sparql.ResultSetWrapper.<init>(ResultSetWrapper.java:40)
at
org.apache.clerezza.rdf.jena.sparql.JenaSparqlEngine.execute(JenaSparqlEngine.java:84)
at
org.apache.stanbol.enhancer.jersey.resource.EnhancerRootResource$EnhancerResource.sparql(EnhancerRootResource.java:160)
[..]
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:
java.lang.ExceptionInInitializerError
at
org.glassfish.jersey.servlet.internal.ResponseWriter.rethrow(ResponseWriter.java:230)
[..]
Caused by: java.lang.ExceptionInInitializerError
at com.hp.hpl.jena.sparql.expr.ExprVar.eval(ExprVar.java:65)
[..]
Caused by: java.security.AccessControlException: access denied
("java.io.FilePermission"
"/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre:lib:jaxp.properties"
"read")
at
java.security.AccessControlContext.checkPermission(AccessControlContext.java:372)
at
java.security.AccessController.checkPermission(AccessController.java:559)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
at java.lang.SecurityManager.checkRead(SecurityManager.java:888)
at java.io.File.exists(File.java:808)
at
com.hp.hpl.jena.sparql.expr.NodeValue.getDatatypeFactory(NodeValue.java:211)
at com.hp.hpl.jena.sparql.expr.NodeValue.<clinit>(NodeValue.java:186)
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.
best
Rupert
--
| Rupert Westenthaler [email protected]
| Bodenlehenstraße 11 ++43-699-11108907
| A-5500 Bischofshofen