on which line do you exactly get the error? have you traced your code? BO
________________________________ From: Meraj A. Khan <[email protected]> To: [email protected] Sent: Wednesday, 22 May 2013 1:11 PM Subject: Apache Jena Unsupported Operation Exception Hello there I get the following exception when I run the code below. I use the maven dependency for Jena apache-jena-libs:2.10.1 : pom WARNING: Exception java.lang.UnsupportedOperationException INFO: ERROR: nodecfcd208495d565ef66e7dff9f98764da is not a URI node: The following code causes this error. Statement statement = null; com.hp.hpl.jena.graph.Node s = Utils.convertToJena(nodes[0]); com.hp.hpl.jena.graph.Node p = Utils.convertToJena(nodes[1]); com.hp.hpl.jena.graph.Node o = Utils.convertToJena(nodes[2]); Resource s1 = model.createResource(s.getURI()); Property p1 = model.createProperty(p.getURI()); if(o.isURI()) { Resource o1 = model.createResource(o.getURI()); statement = ResourceFactory.createStatement(s1,p1,o1); } else if(o.isLiteral()) { Literal l1 = model.createLiteral(o.getLiteralLexicalForm()); statement = ResourceFactory.createStatement(s1,p1,l1); } else if(o.isBlank()) { Resource o1 = model.createResource(o.getBlankNodeId()); statement = ResourceFactory.createStatement(s1,p1,o1); } model.add(statement); Any help would be appreciated. Thanks.
