Hi Jeff, I doubt it has anything to do with SPIN specifically, but rather looks like something has closed the TDB connection (and we have seen similar NullPointers with TDB in the past, always able to track it back to closed databases.
Thanks Holger On Jul 29, 2011, at 12:49 AM, Schmitz, Jeffrey A wrote: > Hello, > I recently changed how I was storing my queries to use the spin:query > property, instead of the sparql:query property. Now, when running the below > code to retrieve those queries, I am sometimes (but not always) getting the > below exception. As a work around I can move the queries back to use the > sparql:query property where it is stored as a string literal. No big deal > since I have a work around, but wanted to let you know what I’m seeing. > > LIBRARY VERSIONS: > Arq-2.8.8 > Jena-2.6.4 > Spin-1.2.0 > Spin-base-1.2.0 > Tdb-0.8.10 > > CODE TO RETRIEVE QUERY: > > org.topbraid.spin.model.Query spinQuery = SPINFactory > .asQuery(spinQueryRes); > StringBuilder queryBldr = new StringBuilder(); > > StringPrintContext printCntxt = > newStringPrintContext(queryBldr); > printCntxt.setPrintPrefixes(false); > spinQuery.print(printCntxt); > this.sparql = ResourceFactory.createTypedLiteral(queryBldr > .toString(), XSDDatatype.XSDstring); > > EXCEPTION: > > java.lang.NullPointerException > at > com.hp.hpl.jena.tdb.store.GraphTDBBase.graphBaseFindWorker(GraphTDBBase.java:131) > at > com.hp.hpl.jena.tdb.store.GraphNamedTDB.graphBaseFind(GraphNamedTDB.java:105) > at > com.hp.hpl.jena.sparql.graph.GraphBase2.find(GraphBase2.java:232) > at > com.hp.hpl.jena.sparql.core.Reifier2.findExposed(Reifier2.java:189) > at > com.hp.hpl.jena.graph.impl.GraphBase.reifierTriples(GraphBase.java:318) > at > com.hp.hpl.jena.graph.impl.GraphBase.find(GraphBase.java:240) > at > com.hp.hpl.jena.graph.impl.GraphBase.graphBaseFind(GraphBase.java:260) > at > com.hp.hpl.jena.graph.impl.GraphBase.find(GraphBase.java:257) > at > com.hp.hpl.jena.rdf.model.impl.ModelCom.listStatements(ModelCom.java:378) > at > com.hp.hpl.jena.rdf.model.impl.ModelCom.listStatements(ModelCom.java:383) > at > com.hp.hpl.jena.rdf.model.impl.ModelCom.getProperty(ModelCom.java:1003) > at > com.hp.hpl.jena.rdf.model.impl.ResourceImpl.getProperty(ResourceImpl.java:154) > at > org.topbraid.spin.model.impl.FunctionCallImpl.getSymbol(FunctionCallImpl.java:156) > at > org.topbraid.spin.model.impl.FunctionCallImpl.print(FunctionCallImpl.java:174) > at > org.topbraid.spin.util.SPINExpressions.printExpressionString(SPINExpressions.java:189) > at > org.topbraid.spin.model.impl.AbstractSPINResourceImpl.printNestedExpressionString(AbstractSPINResourceImpl.java:146) > at > org.topbraid.spin.model.impl.FilterImpl.print(FilterImpl.java:46) > at > org.topbraid.spin.model.impl.ElementListImpl.print(ElementListImpl.java:139) > at > org.topbraid.spin.model.impl.AbstractSPINResourceImpl.printNestedElementList(AbstractSPINResourceImpl.java:132) > at > org.topbraid.spin.model.impl.QueryImpl.printWhere(QueryImpl.java:177) > at > org.topbraid.spin.model.impl.SelectImpl.print(SelectImpl.java:99) > at > com.boeing.sparqlflow.QueryInfo.setQueryInfo(QueryInfo.java:69) > > -- > You received this message because you are subscribed to the Google > Group "TopBraid Suite Users", the topics of which include TopBraid Composer, > TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN. > To post to this group, send email to > [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/topbraid-users?hl=en -- You received this message because you are subscribed to the Google Group "TopBraid Suite Users", the topics of which include TopBraid Composer, TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/topbraid-users?hl=en
