Hi,
I would appreciate any help for this problem:
I want to import rdf data into tdb dataset.
To do this, I use following code:
InputStream in = new FileInputStream(new File(filename)); // filename
is a big file 500MB of rdf data
Dataset ds = TDBFactory.createDataset("data\\"); // store new data
here
model = ds.getDefaultModel() ;
model.read(in, null); // start converting rdf -> tdb...
in.close();
model.commit();
jena tdb then starts converting old 500MB big rdf file into new datset data\
It is clear that it works, as files under data\ keep growing...
But shortly after a while an exception is thrown, which states:
Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap
space
at java.nio.HeapByteBuffer.<init>(Unknown Source)
at java.nio.ByteBuffer.allocate(Unknown Source)
at
com.hp.hpl.jena.tdb.base.block.BlockMgrDirect.allocateBuffer(BlockMgrDirect.java:35)
at
com.hp.hpl.jena.tdb.base.block.BlockMgrDirect.getByteBuffer(BlockMgrDirect.java:52)
at
com.hp.hpl.jena.tdb.base.block.BlockMgrDirect.get(BlockMgrDirect.java:46)
at com.hp.hpl.jena.tdb.base.block.BlockMgrSync.get(BlockMgrSync.java:46)
at
com.hp.hpl.jena.tdb.base.block.BlockMgrCache.get(BlockMgrCache.java:106)
at
com.hp.hpl.jena.tdb.base.block.BlockConverter.get(BlockConverter.java:62)
at
com.hp.hpl.jena.tdb.base.recordfile.RecordBufferPageMgr.get(RecordBufferPageMgr.java:45)
at
com.hp.hpl.jena.tdb.index.bplustree.BPTreeRecordsMgr.get(BPTreeRecordsMgr.java:32)
at
com.hp.hpl.jena.tdb.index.bplustree.BPTreeNode.get(BPTreeNode.java:125)
at
com.hp.hpl.jena.tdb.index.bplustree.BPTreeNode.internalInsert(BPTreeNode.java:379)
at
com.hp.hpl.jena.tdb.index.bplustree.BPTreeNode.internalInsert(BPTreeNode.java:399)
at
com.hp.hpl.jena.tdb.index.bplustree.BPTreeNode.insert(BPTreeNode.java:167)
at
com.hp.hpl.jena.tdb.index.bplustree.BPlusTree.addAndReturnOld(BPlusTree.java:297)
at com.hp.hpl.jena.tdb.index.bplustree.BPlusTree.add(BPlusTree.java:289)
at
com.hp.hpl.jena.tdb.nodetable.NodeTableNative.accessIndex(NodeTableNative.java:133)
at
com.hp.hpl.jena.tdb.nodetable.NodeTableNative._idForNode(NodeTableNative.java:98)
at
com.hp.hpl.jena.tdb.nodetable.NodeTableNative.getAllocateNodeId(NodeTableNative.java:67)
at
com.hp.hpl.jena.tdb.nodetable.NodeTableCache._idForNode(NodeTableCache.java:108)
at
com.hp.hpl.jena.tdb.nodetable.NodeTableCache.getAllocateNodeId(NodeTableCache.java:67)
at
com.hp.hpl.jena.tdb.nodetable.NodeTableWrapper.getAllocateNodeId(NodeTableWrapper.java:32)
at
com.hp.hpl.jena.tdb.nodetable.NodeTableInline.getAllocateNodeId(NodeTableInline.java:39)
at
com.hp.hpl.jena.tdb.nodetable.NodeTupleTableConcrete.addRow(NodeTupleTableConcrete.java:72)
at com.hp.hpl.jena.tdb.store.TripleTable.add(TripleTable.java:53)
at com.hp.hpl.jena.tdb.store.TripleTable.add(TripleTable.java:48)
at
com.hp.hpl.jena.tdb.store.GraphTriplesTDB._performAdd(GraphTriplesTDB.java:45)
at
com.hp.hpl.jena.tdb.store.GraphTDBBase.performAdd(GraphTDBBase.java:80)
at
com.hp.hpl.jena.graph.impl.SimpleBulkUpdateHandler.add(SimpleBulkUpdateHandler.java:39)
at com.hp.hpl.jena.rdf.arp.JenaHandler.bulkUpdate(JenaHandler.java:83)
at com.hp.hpl.jena.rdf.arp.JenaHandler.statement(JenaHandler.java:67)
at com.hp.hpl.jena.rdf.arp.impl.XMLHandler.triple(XMLHandler.java:98)
I though that jena tdb use disk as storare with minimum memory ussage.
Should I now increase java heap space? Or my PC is a way too weak to handle
memory requirements?
Please reply.
Thanks very much,
Jan Mojzis