I am using the version tdb 0.9.4 and jena 2.7.4 and also I use transactions in my code.
On 19 March 2013 16:29, Andy Seaborne <[email protected]> wrote: > On 19/03/13 15:25, Jie wrote: >> >> Hello, everyone, >> > > Which version are you running? > > >> when I call the following method: >> ontmodel_.write(new FileOutputStream(new File(path+filename))); >> >> I have got an error as following several times, if anyone can tell me >> what is the possible reason for this? thank you very much. > > > The node table is corrupt. This is usually caused by not closing the > database down cleanly when used non-transactionally. In old versions, some > concurrency problems could also cause thsi as well, but this is now presumed > fixed. > > Andy > > >> >> Caused by: com.hp.hpl.jena.tdb.base.file.FileException: >> >> ObjectFileStorage.read[nodes.dat](30957333)[filesize=31344403][file.size()=31344403]: >> Impossibly large object : 4537448 bytes > >> filesize-(loc+SizeOfInt)=387066 >> at >> com.hp.hpl.jena.tdb.base.objectfile.ObjectFileStorage.read(ObjectFileStorage.java:346) >> at com.hp.hpl.jena.tdb.lib.NodeLib.fetchDecode(NodeLib.java:78) >> at >> com.hp.hpl.jena.tdb.nodetable.NodeTableNative.readNodeFromTable(NodeTableNative.java:178) >> at >> com.hp.hpl.jena.tdb.nodetable.NodeTableNative._retrieveNodeByNodeId(NodeTableNative.java:103) >> at >> com.hp.hpl.jena.tdb.nodetable.NodeTableNative.getNodeForNodeId(NodeTableNative.java:74) >> at >> com.hp.hpl.jena.tdb.nodetable.NodeTableCache._retrieveNodeByNodeId(NodeTableCache.java:103) >> at >> com.hp.hpl.jena.tdb.nodetable.NodeTableCache.getNodeForNodeId(NodeTableCache.java:74) >> at >> com.hp.hpl.jena.tdb.nodetable.NodeTableWrapper.getNodeForNodeId(NodeTableWrapper.java:55) >> at >> com.hp.hpl.jena.tdb.nodetable.NodeTableInline.getNodeForNodeId(NodeTableInline.java:67) >> at >> com.hp.hpl.jena.tdb.nodetable.NodeTableWrapper.getNodeForNodeId(NodeTableWrapper.java:55) >> at com.hp.hpl.jena.tdb.lib.TupleLib.quad(TupleLib.java:161) >> at com.hp.hpl.jena.tdb.lib.TupleLib.quad(TupleLib.java:153) >> at com.hp.hpl.jena.tdb.lib.TupleLib.access$100(TupleLib.java:45) >> at com.hp.hpl.jena.tdb.lib.TupleLib$4.convert(TupleLib.java:87) >> at com.hp.hpl.jena.tdb.lib.TupleLib$4.convert(TupleLib.java:83) >> at org.openjena.atlas.iterator.Iter$4.next(Iter.java:301) >> at >> com.hp.hpl.jena.tdb.store.GraphTDBBase$ProjectQuadsToTriples.next(GraphTDBBase.java:178) >> at >> com.hp.hpl.jena.tdb.store.GraphTDBBase$ProjectQuadsToTriples.next(GraphTDBBase.java:166) >> at >> com.hp.hpl.jena.util.iterator.WrappedIterator.next(WrappedIterator.java:80) >> at >> com.hp.hpl.jena.util.iterator.NiceIterator$1.next(NiceIterator.java:120) >> at >> com.hp.hpl.jena.util.iterator.NiceIterator$1.next(NiceIterator.java:120) >> at >> com.hp.hpl.jena.graph.query.SimpleQueryHandler.predicatesFor(SimpleQueryHandler.java:86) >> at >> com.hp.hpl.jena.graph.query.SimpleQueryHandler.predicatesFor(SimpleQueryHandler.java:64) >> at >> com.hp.hpl.jena.rdf.model.impl.ModelCom.listPredicates(ModelCom.java:889) >> at >> com.hp.hpl.jena.rdf.model.impl.ModelCom.listNameSpaces(ModelCom.java:902) >> at >> com.hp.hpl.jena.xmloutput.impl.BaseXMLWriter.addNameSpaces(BaseXMLWriter.java:243) >> at >> com.hp.hpl.jena.xmloutput.impl.BaseXMLWriter.setupNamespaces(BaseXMLWriter.java:502) >> at >> com.hp.hpl.jena.xmloutput.impl.BaseXMLWriter.write(BaseXMLWriter.java:484) >> at >> com.hp.hpl.jena.xmloutput.impl.BaseXMLWriter.write(BaseXMLWriter.java:472) >> at >> com.hp.hpl.jena.rdf.model.impl.ModelCom.write(ModelCom.java:320) >> >
