2

I have installed fuseki version 1.0.2 and I can successfully run it using -->

./fuseki-server --update --loc=/home/mytdbs/tdb /ds

and query it on http://localhost:3030/sparql.tpl. I have a tdb and I want to update it using java. To do so I am trying to get the model using:

public static void main(String args[]){
    DatasetAccessor dataAccessor = datasetAccessorFactory.createHTTP("http://localhost:3030/ds/data");

    Model model = dataAccessor.getModel();
}

However when I am running this command I will get the following exception:

java.lang.NoSuchFieldError: serviceContext at org.apache.jena.atlas.web.auth.ServiceAuthenticator.getServiceContextMap(ServiceAuthenticator.java:95) at org.apache.jena.atlas.web.auth.ServiceAuthenticator.getCredentials(ServiceAuthenticator.java:101) at org.apache.jena.atlas.web.auth.ServiceAuthenticator.getCredentials(ServiceAuthenticator.java:38) at org.apache.jena.atlas.web.auth.AbstractScopedAuthenticator.findCredentials(AbstractScopedAuthenticator.java:107) at org.apache.jena.atlas.web.auth.AbstractScopedAuthenticator.getUserName(AbstractScopedAuthenticator.java:50) at org.apache.jena.atlas.web.auth.AbstractScopedAuthenticator.hasUserName(AbstractScopedAuthenticator.java:60) at org.apache.jena.atlas.web.auth.AbstractCredentialsAuthenticator.apply(AbstractCredentialsAuthenticator.java:41) at org.apache.jena.riot.web.HttpOp.applyAuthentication(HttpOp.java:1226) at org.apache.jena.riot.web.HttpOp.exec(HttpOp.java:1108) at org.apache.jena.riot.web.HttpOp.execHttpGet(HttpOp.java:384) at org.apache.jena.riot.web.HttpOp.execHttpGet(HttpOp.java:353) at org.apache.jena.web.DatasetGraphAccessorHTTP.doGet(DatasetGraphAccessorHTTP.java:134) at org.apache.jena.web.DatasetGraphAccessorHTTP.httpGet(DatasetGraphAccessorHTTP.java:123) at org.apache.jena.web.DatasetAdapter.getModel(DatasetAdapter.java:39)

I am using java 1.6 and Jena 2.11.2. I am very new to jena so I am not sure what other information might be useful. Any help/hint is much appreciated.

Bahar
  • 770
  • 5
  • 18
  • 1
    java.lang.NoSuchFieldError is a java error. It suggests the classpath is set up wrongly. – AndyS Mar 19 '15 at 11:09

0 Answers0