On 08/05/13 21:02, David Jordan wrote:
What is the typical cause for the following exception?
Some kind of write action inside a read transaction. Read transactions
really are "read only" and it's enforced.
Here, it looks like it's the setNsPrefix of a prefix. That's fine if the
profix already exists so it does not in this case.
Do you have a complete, minimal example? TDBFactory has a method to
make an in-memory dataset that behaves exactly liek a disk-backed one
(it uses a crude "RAM disk"). Good for testing and portable examples.
Andy
[java] Exception in thread "main" com.hp.hpl.jena.tdb.TDBException:
Allocation attempt on NodeTableReadonly
[java] at
com.hp.hpl.jena.tdb.nodetable.NodeTableReadonly.getAllocateNodeId(NodeTableReadonly.java:37)
[java] at
com.hp.hpl.jena.tdb.nodetable.NodeTupleTableConcrete.addRow(NodeTupleTableConcrete.java:84)
[java] at
com.hp.hpl.jena.tdb.store.DatasetPrefixesTDB.insertPrefix(DatasetPrefixesTDB.java:122)
[java] at
com.hp.hpl.jena.sparql.graph.GraphPrefixesProjection.set(GraphPrefixesProjection.java:84)
[java] at
com.hp.hpl.jena.shared.impl.PrefixMappingImpl.setNsPrefix(PrefixMappingImpl.java:70)
[java] at
com.hp.hpl.jena.graph.compose.PolyadicPrefixMappingImpl.setNsPrefix(PolyadicPrefixMappingImpl.java:52)
[java] at
com.hp.hpl.jena.rdf.model.impl.ModelCom.setNsPrefix(ModelCom.java:975)
[java] at
com.hp.hpl.jena.ontology.impl.OntModelImpl.<init>(OntModelImpl.java:159)
[java] at
com.hp.hpl.jena.ontology.impl.OntModelImpl.<init>(OntModelImpl.java:123)
[java] at
com.hp.hpl.jena.rdf.model.ModelFactory.createOntologyModel(ModelFactory.java:370)
[java] at
com.sas.ta.om.ListClassesAndNumInstances.main(ListClassesAndNumInstances.java:26)
David Jordan
Senior Software Developer
SAS Institute Inc.
Health & Life Sciences, Research & Development
Bldg R ▪ Office 4467
600 Research Drive ▪ Cary, NC 27513
Tel: 919 531 1233 ▪ [email protected]<mailto:[email protected]>
www.sas.com<http://www.sas.com/>
SAS® … THE POWER TO KNOW®