Hello I created a model in main method like:
OntModel model=ModelFactory.createOntologyModel(OntModelSpec.OWL_DL_MEM); InputStream in = FileManager.get().open("C:/Users/Desktop/vehicle.owl"); if (in==null) { throw new IllegalArgumentException( "File: " + " not found "); } model.read(in, ""); sparqltest(); ________________________________________ In sparqltest() method I used Sparql query and Query query = QueryFactory.create(queryString); QueryExecution qe = QueryExecutionFactory.create( query,model); The model argument in "QueryExecutionFactory.create( query,model);" gives me error. I know it is a local variable in main() method but how can we remove this error ? regards